/* Product page reviews (otzyvyproducts/js/reviews.js).
   Review cards, stars and the swipe row reuse the home page classes (.hrv-*) from
   static/front/css/style.css; this file lays out the section and styles the form. */
.zc-reviews-wrap {
  margin-top: 48px;
  margin-bottom: 40px;
}

.zc-reviews {
  color: #1f2a24;
}

.zc-reviews__head {
  max-width: 720px;
  margin: 0 auto 28px;
  text-align: center;
}

.zc-reviews .zc-reviews__title {
  margin: 0 0 14px;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-wrap: balance;
}

.zc-reviews .zc-reviews__lead {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: #5c6862;
  text-wrap: pretty;
}

.zc-reviews__summary {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-align: left;
}

.zc-reviews__score {
  font-size: 44px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #1f2a24;
}

.zc-reviews__meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.zc-reviews__count {
  font-size: 14px;
  line-height: 1.4;
  color: #5c6862;
}

/* Cards in the same swipe row as on the home page, the form centred below them. */
.zc-reviews__body {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.zc-reviews__cards {
  min-width: 0;
}

.zc-reviews__aside {
  align-self: center;
  width: 100%;
  max-width: 560px;
}

/* Long reviews: «Читать полностью» lifts the 7–8 line clamp from style.css. */
.zc-reviews .hrv-card.is-expanded .hrv-card__text {
  display: block;
  overflow: visible;
  -webkit-line-clamp: none;
  line-clamp: none;
}

.zc-reviews__more {
  align-self: flex-start;
  min-height: 40px;
  margin: -12px 0 -8px;
  padding: 0;
  border: 0;
  background: none;
  color: #2f6b4f;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
}

.zc-reviews__more[hidden] {
  display: none;
}

.zc-reviews__more:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.zc-reviews__more:focus-visible {
  outline: 2px solid #2f6b4f;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Form */
.zc-reviews__form,
.zc-reviews__thanks {
  padding: 24px;
  background: #fff;
  border: 1px solid rgba(31, 61, 45, 0.08);
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(16, 40, 28, 0.05);
}

.zc-reviews .zc-reviews__form-title {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
  color: #1f2a24;
}

.zc-reviews__rating {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.zc-reviews__rating legend {
  float: none;
  width: auto;
  margin: 0 0 6px;
  padding: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: #1f2a24;
}

.zc-reviews__req {
  color: #c62828;
}

/* Radios stay in the tab order: arrow keys pick a rating, the star shows focus. */
/* DOM order is 5…1; right-to-left puts 1 first and lets :checked ~ label fill to the left. */
.zc-reviews__stars-input {
  position: relative;
  display: flex;
  direction: rtl;
  justify-content: flex-end;
  gap: 2px;
  width: fit-content;
}

.zc-reviews__stars-input input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.zc-reviews__stars-input label {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0;
  border-radius: 8px;
  font-size: 32px;
  line-height: 1;
  color: #dfe3e1 !important;
  cursor: pointer;
  transition: color 0.15s ease, transform 0.15s ease;
}

.zc-reviews__stars-input label:hover {
  transform: scale(1.08);
}

.zc-reviews__stars-input input:checked ~ label,
.zc-reviews__stars-input label:hover,
.zc-reviews__stars-input label:hover ~ label {
  color: #f5b301 !important;
}

.zc-reviews__stars-input input:focus-visible + label {
  outline: 2px solid #2f6b4f;
  outline-offset: 0;
}

.zc-reviews__field {
  margin-top: 14px;
}

.zc-reviews__field label {
  display: block;
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: #1f2a24;
}

.zc-reviews__opt {
  font-weight: 400;
  color: #7a857f;
}

.zc-reviews__form input[type="text"],
.zc-reviews__form textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #d5ddd8;
  border-radius: 12px;
  background: #fff;
  box-sizing: border-box;
  font: inherit;
  /* 16px keeps iOS Safari from zooming into the field. */
  font-size: 16px;
  line-height: 1.4;
  color: #1f2a24;
  box-shadow: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.zc-reviews__form textarea {
  min-height: 112px;
  resize: vertical;
}

.zc-reviews__form input[type="text"]::placeholder,
.zc-reviews__form textarea::placeholder {
  color: #8a948f;
  opacity: 1;
}

.zc-reviews__form input[type="text"]:focus,
.zc-reviews__form textarea:focus {
  border-color: #2f6b4f;
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 107, 79, 0.15);
}

.zc-reviews__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  margin: 20px 0 0;
  padding: 12px 24px;
  border: 0;
  border-radius: 12px;
  background: #2f6b4f;
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.zc-reviews__submit:hover,
.zc-reviews__submit:focus-visible {
  background: #24533d;
}

.zc-reviews__submit:focus-visible {
  outline: 2px solid #2f6b4f;
  outline-offset: 2px;
}

.zc-reviews__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.zc-reviews__msg {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.45;
}

.zc-reviews__msg--ok {
  background: #e8f5e9;
  color: #1b5e20;
}

.zc-reviews__msg--err {
  background: #fdecea;
  color: #b3261e;
}

.zc-reviews__thanks {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  color: #1f2a24;
}

.zc-reviews__thanks-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e4efe8;
  color: #2f6b4f;
  font-size: 15px;
}

@media (max-width: 767.98px) {
  .zc-reviews-wrap {
    margin-top: 36px;
    margin-bottom: 28px;
  }
  .zc-reviews__head {
    margin-bottom: 20px;
  }
  .zc-reviews__summary {
    gap: 12px;
  }
  .zc-reviews__score {
    font-size: 40px;
  }
  .zc-reviews__count {
    font-size: 13px;
  }
  .zc-reviews__body {
    gap: 24px;
  }
  .zc-reviews__form,
  .zc-reviews__thanks {
    padding: 20px 16px;
  }
}
