/* Відгуки покупців у вкладці «ВІДГУКІВ / ПИТАНЬ» на сторінці товару. */

.lr-reviews {
  --lr-red: var(--red, #c61717);
  --lr-star: #f5a623;
  --lr-surface: #f2f2f2;
  --lr-muted: #7a7a7a;
  --lr-line: #dedede;

  max-width: 780px;
  margin: 0 auto;
  /* Меню вкладок у шаблоні — sticky, тож лишаємо запас зверху, щоб воно не накривало заголовок. */
  padding: 56px 16px 40px;
  color: #111;
  font-family: Inter, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

.lr-reviews__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--lr-red);
}

.lr-reviews__title-wrap {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.lr-reviews__title {
  margin: 0;
  font-size: 26px;
  font-weight: 400;
  line-height: 1.2;
}

.lr-reviews__count {
  color: var(--lr-muted);
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.lr-reviews__notice {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-left: 3px solid var(--lr-red);
  background: #fdf3f3;
  font-size: 13px;
}

.lr-reviews__empty {
  margin: 32px 0;
  color: var(--lr-muted);
  font-style: italic;
  text-align: center;
}

/* Кнопки */

.lr-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid var(--lr-red);
  border-radius: 3px;
  background: #fff;
  color: var(--lr-red);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color .15s, color .15s, opacity .15s;
}

.lr-btn:hover {
  background: var(--lr-red);
  color: #fff;
}

.lr-btn:disabled {
  cursor: default;
  opacity: .55;
}

.lr-btn:disabled:hover {
  background: #fff;
  color: var(--lr-red);
}

.lr-btn--solid {
  background: var(--lr-red);
  color: #fff;
}

.lr-btn--solid:hover {
  background: #a91313;
  color: #fff;
}

.lr-btn--solid:disabled:hover {
  background: var(--lr-red);
  color: #fff;
}

.lr-btn--ghost {
  border-color: var(--lr-line);
  color: #555;
}

.lr-btn--ghost:hover {
  background: #ebebeb;
  color: #111;
}

.lr-btn--ghost:disabled:hover {
  background: #fff;
  color: #555;
}

.lr-btn--sm {
  padding: 8px 14px;
  font-size: 11px;
}

.lr-btn__icon {
  width: 14px;
  height: 14px;
  flex: none;
}

/* Зірки */

.lr-stars {
  display: inline-flex;
  gap: 1px;
  color: var(--lr-star);
  line-height: 0;
}

.lr-star {
  width: 13px;
  height: 13px;
}

.lr-stars--md .lr-star {
  width: 16px;
  height: 16px;
}

/* Зведення */

.lr-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px;
  margin-top: 24px;
  padding: 20px 24px;
  border-left: 4px solid var(--lr-red);
  background: var(--lr-surface);
}

.lr-summary__score {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lr-summary__value {
  font-size: 46px;
  font-weight: 300;
  line-height: 1;
}

.lr-summary__score-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lr-summary__basis {
  color: var(--lr-muted);
  font-size: 11px;
}

.lr-summary__bars {
  flex: 1 1 260px;
  min-width: 220px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lr-summary__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  line-height: 1.6;
}

.lr-summary__bar-label {
  width: 8px;
  color: var(--lr-muted);
  text-align: right;
}

.lr-summary__bar-track {
  flex: 1;
  height: 7px;
  border-radius: 4px;
  background: #d9d9d9;
  overflow: hidden;
}

.lr-summary__bar-fill {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: var(--lr-red);
  transition: width .3s;
}

.lr-summary__bar-count {
  width: 20px;
  color: var(--lr-muted);
  text-align: right;
}

/* Список відгуків */

.lr-reviews__list {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.lr-review {
  padding: 18px 22px;
  border-left: 4px solid var(--lr-red);
  background: var(--lr-surface);
}

.lr-review + .lr-review {
  margin-top: 14px;
}

.lr-review__head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lr-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: none;
  background: #1a1a1a;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
}

.lr-avatar--sm {
  width: 24px;
  height: 24px;
  font-size: 10px;
}

.lr-review__meta {
  display: flex;
  flex-direction: column;
  margin-right: auto;
  min-width: 0;
}

.lr-review__name {
  font-weight: 600;
}

.lr-review__date {
  color: var(--lr-muted);
  font-size: 11px;
}

.lr-review__text {
  margin: 12px 0 0;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.lr-review__media {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.lr-review__media-item {
  display: block;
  width: 92px;
  height: 92px;
  border: 1px solid var(--lr-line);
  background: #fff;
  object-fit: cover;
}

.lr-review > .lr-btn {
  margin-top: 14px;
}

/* Відповіді */

.lr-review__replies {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.lr-reply {
  padding: 12px 16px;
  border-left: 3px solid #1a1a1a;
  background: #fff;
}

.lr-reply + .lr-reply {
  margin-top: 8px;
}

.lr-reply--seller {
  border-left-color: var(--lr-red);
}

.lr-reply__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.lr-reply__name {
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.lr-badge {
  padding: 3px 7px;
  background: var(--lr-red);
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.lr-reply__date {
  margin-left: auto;
  color: var(--lr-muted);
  font-size: 11px;
}

.lr-reply__text {
  margin: 8px 0 0;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

/* Форми */

.lr-form {
  margin-top: 20px;
  padding: 20px 22px;
  border: 1px solid var(--lr-line);
  background: #fff;
}

.lr-form--reply {
  margin-top: 14px;
  padding: 16px;
  background: #fafafa;
}

.lr-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.lr-form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
}

.lr-form__grid .lr-form__field {
  margin-top: 0;
}

.lr-form__row--rating {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.lr-form__label {
  color: var(--lr-muted);
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.lr-form__input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--lr-line);
  border-radius: 2px;
  background: #fff;
  color: #111;
  font: inherit;
}

.lr-form__input:focus {
  border-color: var(--lr-red);
  outline: none;
}

.lr-form__input--area {
  min-height: 96px;
  resize: vertical;
}

.lr-form__honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.lr-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.lr-form__note {
  margin: 12px 0 0;
  color: var(--lr-muted);
  font-size: 11px;
}

.lr-form__msg {
  margin: 14px 0 0;
  font-size: 13px;
}

.lr-form__msg--error {
  color: #b3261e;
}

.lr-form__msg--ok {
  color: #1c7c3c;
}

.lr-star-picker {
  display: inline-flex;
  gap: 4px;
}

.lr-star-picker__btn {
  padding: 2px;
  border: 0;
  background: none;
  color: #cfcfcf;
  line-height: 0;
  cursor: pointer;
}

.lr-star-picker__btn.is-on {
  color: var(--lr-star);
}

.lr-star-picker__btn .lr-star {
  width: 22px;
  height: 22px;
}

@media (max-width: 767px) {
  .lr-reviews {
    padding: 24px 12px 32px;
  }

  .lr-reviews__title {
    font-size: 21px;
  }

  .lr-summary {
    gap: 18px;
    padding: 16px;
  }

  .lr-review {
    padding: 14px 16px;
  }

  .lr-form__grid {
    grid-template-columns: 1fr;
  }

  .lr-reply__date {
    margin-left: 0;
    width: 100%;
  }
}

@media (max-width: 479px) {
  .lr-reviews {
    padding: 18px 8px 28px;
  }

  .lr-reviews__title {
    font-size: 18px;
  }

  .lr-reviews__head {
    gap: 10px;
  }

  .lr-summary {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 14px;
  }

  .lr-summary__value {
    font-size: 36px;
  }

  .lr-summary__bars {
    min-width: 0;
    width: 100%;
    flex: 1 1 auto;
  }

  .lr-review {
    padding: 12px;
  }

  .lr-btn {
    width: 100%;
    justify-content: center;
  }
}
