/* Общий контейнер */
.sb-reviews {
  max-width: 880px;
  margin: 40px auto;
  padding: 0 16px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #111827;
}

/* Заголовок с общей оценкой */
.sb-reviews-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.sb-score {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sb-score-number {
  font-size: 32px;
  font-weight: 600;
}

.sb-score-text {
  font-size: 14px;
  color: #4b5563;
}

/* Звёзды Trustpilot (в блоке со средним рейтингом и в отзывах) */
.sb-stars {
  display: flex;
  gap: 3px;
}

/* Один зелёный блок */
.sb-star,
.sb-star-filled {
  width: 22px;
  height: 22px;
  background-color: #00B67A;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Белая звездочка внутри */
.sb-star::before,
.sb-star-filled::before {
  content: "★";
  font-size: 16px;
  color: #ffffff;
  line-height: 1;
}

/* Карточка отзыва */
.sb-review-card {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 16px 18px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  margin-bottom: 24px;
}

.sb-review-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.sb-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #9ca3af;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
}

.sb-review-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sb-review-name {
  font-size: 14px;
  font-weight: 600;
}

.sb-review-date {
  font-size: 12px;
  color: #6b7280;
}

.sb-review-rating {
  margin: 10px 0 6px;
}

.sb-review-title {
  font-size: 16px;
  font-weight: 600;
  margin: 4px 0 8px;
}

.sb-review-body {
  font-size: 14px;
  line-height: 1.6;
  color: #111827;
}

/* Форма */
.sb-review-form-wrap {
  border-top: 1px solid #e5e7eb;
  padding-top: 24px;
  margin-top: 8px;
}

.sb-form-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
}

.sb-form-subtitle {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 16px;
}

.sb-review-form {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #ffffff;
  padding: 16px 18px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.sb-form-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 14px;
  gap: 6px;
}

.sb-form-row label,
.sb-label {
  font-size: 14px;
  font-weight: 500;
}

.sb-form-row input[type="text"],
.sb-form-row textarea {
  border-radius: 4px;
  border: 1px solid #d1d5db;
  padding: 8px 10px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sb-form-row input[type="text"]:focus,
.sb-form-row textarea:focus {
  outline: none;
  border-color: #00b67a;
  box-shadow: 0 0 0 1px rgba(0, 182, 122, 0.2);
}

/* Рейтинг во входной форме (radio + звезды) */

/* скрываем радио */
.sb-rating-input input[type="radio"] {
  display: none;
}

/* ВАЖНО: row-reverse + порядок input/label от 5 к 1 в HTML */
.sb-rating-input {
  display: flex;
  flex-direction: row-reverse;
  gap: 6px;
}

/* Базовое состояние: серый блок + серая звезда */
.sb-rating-input label {
  width: 28px;
  height: 28px;
  border-radius: 3px;
  background-color: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.sb-rating-input label::before {
  content: "★";
  font-size: 18px;
  color: #9ca3af;
}

/* HOVER: подсвечиваем текущую и все "последующие" по DOM,
   которые визуально находятся слева из-за row-reverse */
.sb-rating-input label:hover,
.sb-rating-input label:hover ~ label {
  background-color: #00B67A;
}

.sb-rating-input label:hover::before,
.sb-rating-input label:hover ~ label::before {
  color: #ffffff;
}

/* CHECKED: выбранная + все "последующие" по DOM (визуально слева) */
.sb-rating-input input[type="radio"]:checked + label,
.sb-rating-input input[type="radio"]:checked + label ~ label {
  background-color: #00B67A;
}

.sb-rating-input input[type="radio"]:checked + label::before,
.sb-rating-input input[type="radio"]:checked + label ~ label::before {
  color: #ffffff;
}

/* Чекбокс согласия */
.sb-form-row-inline {
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
}

.sb-form-row-inline input[type="checkbox"] {
  margin-top: 3px;
}

.sb-approve-label {
  font-size: 13px;
  color: #4b5563;
}

/* Кнопка */
.sb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border-radius: 4px;
  border: none;
  background: #00b67a;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}

.sb-btn:hover {
  background: #019463;
}

.sb-btn:active {
  transform: translateY(1px);
}

/* Адаптив */
@media (max-width: 640px) {
  .sb-reviews-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .sb-review-card,
  .sb-review-form {
    padding: 14px 12px;
  }
}
