/* reviews.html (A2, 7.11.2026). Loaded after tokens/base/components/page-hero.
   The sky opening (with the average + count only when there are reviews), the review cards, a calm
   empty state while there are none, and the "tell us" form card at the bottom (same card language as
   the contact form). Stars: amber with a darker outline so they keep 3:1 against white. */

.reviews-page > section + section { margin-top: var(--space-6); }
.reviews-page ::selection { background: #CFE2FB; color: var(--navy-900); }

/* ---------- Stars (reviews.js starsHtml) ---------- */
.stars { display: inline-flex; align-items: center; gap: 2px; line-height: 0; vertical-align: middle; }
.stars__star { width: 20px; height: 20px; flex: none; overflow: visible; }
.stars__bg { fill: #E4EAF3; stroke: #A3B1C6; stroke-width: 1.2; stroke-linejoin: round; }
.stars__fg { fill: #F5B301; stroke: #A86F00; stroke-width: 1.2; stroke-linejoin: round; }
/* a half star is filled on its right half: the start side in RTL */
.stars__star--half .stars__fg { clip-path: inset(0 0 0 50%); }
.stars--lg .stars__star { width: 26px; height: 26px; }
.stars--input { gap: 0; }
.stars--input .stars__star { width: 48px; height: 48px; padding: 4px; }
/* touch: each star is a 52px target (a second tap on the same star gives the half, reviews.js) */
@media (pointer: coarse) {
  .stars--input .stars__star { width: 52px; height: 52px; padding: 5px; }
}

/* ---------- Average + count (in the opening) ---------- */
.reviews-summary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-5);
  padding: 12px 24px 12px 28px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(15, 63, 140, .09);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
}
.reviews-summary__avg {
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1;
  color: var(--navy-900);
  font-variant-numeric: tabular-nums;
}
.reviews-summary__side { display: grid; justify-items: start; gap: 4px; }
.reviews-summary__count { color: #3E4E6A; font-size: .95rem; }

/* ---------- The cards ---------- */
.reviews-grid { display: grid; gap: var(--space-5); align-items: start; }
@media (min-width: 680px) {
  .reviews-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1040px) {
  .reviews-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.review-card {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-5);
  background: var(--white);
  border: 1px solid rgba(15, 63, 140, .09);
  border-radius: var(--radius-card, 20px);
  box-shadow: var(--shadow-soft);
}
.review-card__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3);
}
.review-card__avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 3px var(--white), 0 4px 12px rgba(15, 63, 140, .16);
}
.review-card__avatar--initials {
  display: grid;
  place-items: center;
  background: #E5EFFC;
  color: var(--navy-700);
  font-size: 1.35rem;
  font-weight: 700;
}
.review-card__who { min-width: 0; }
.review-card__name { font-size: 1.1rem; color: var(--navy-900); line-height: 1.3; overflow-wrap: anywhere; }
.review-card__city { color: var(--muted); font-size: .92rem; line-height: 1.4; }
.review-card__date { align-self: start; padding-top: 4px; color: var(--muted); font-size: .85rem; white-space: nowrap; }
.review-card__text { margin: 0; color: #22324D; line-height: 1.75; overflow-wrap: anywhere; }
.review-card__text p + p { margin-top: .6em; }
.review-card__source {
  padding-top: var(--space-3);
  border-top: 1px solid #E8EEF6;
  color: var(--muted);
  font-size: .85rem;
}

/* ---------- Empty state ---------- */
.reviews-empty {
  display: grid;
  justify-items: center;
  gap: var(--space-3);
  max-width: 760px;
  margin-inline: auto;
  padding: var(--space-6) var(--space-4);
  text-align: center;
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(15, 63, 140, .09);
  border-radius: var(--radius-card-lg, 24px);
  box-shadow: var(--shadow-soft);
}
@media (min-width: 640px) {
  .reviews-empty { padding: var(--space-7) var(--space-7); }
}
.reviews-empty__art { display: flex; align-items: flex-end; justify-content: center; gap: 6px; margin-bottom: var(--space-2); }
.reviews-empty__star {
  fill: #FFF6DA;
  stroke: #C98A00;
  stroke-width: 1.3;
  stroke-linejoin: round;
  stroke-dasharray: 2.6 2.2;
}
.reviews-empty__star--l { width: 64px; height: 64px; }
.reviews-empty__star--s { width: 40px; height: 40px; fill: #EEF4FC; stroke: #8EA4C4; }
.reviews-empty__star--s:first-child { transform: rotate(-12deg); }
.reviews-empty__star--s:last-child { transform: rotate(12deg); }
.reviews-empty__title { font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem); color: var(--navy-900); }
.reviews-empty__text { max-width: 34rem; color: #3E4E6A; font-size: 1.05rem; line-height: 1.7; text-wrap: pretty; }
.reviews-empty__btn { margin-top: var(--space-3); transition: background-color var(--transition), box-shadow var(--transition), transform 160ms cubic-bezier(0.23, 1, 0.32, 1); }
.reviews-empty__btn:active { transform: scale(.97); }

/* ---------- The form card ---------- */
.review-form-wrap { padding-bottom: var(--space-5); }
.review-form {
  position: relative;
  max-width: 760px;
  margin-inline: auto;
  padding: var(--space-5) var(--space-4) var(--space-5);
  background: var(--white);
  border: 1px solid rgba(15, 63, 140, .09);
  border-radius: var(--radius-card-lg, 24px);
  box-shadow: 0 18px 50px rgba(15, 63, 140, .12), 0 2px 8px rgba(15, 63, 140, .05);
  text-align: center;
  scroll-margin-top: calc(var(--header-h) + 16px);
}
@media (min-width: 640px) {
  .review-form { padding: var(--space-6) var(--space-7) var(--space-6); }
}
.review-form__badge {
  width: 68px; height: 68px;
  display: grid; place-items: center;
  margin: 0 auto var(--space-3);
  border-radius: 50%;
  background: #E5EFFC;
  color: var(--navy-700);
  box-shadow: 0 0 0 8px rgba(229, 239, 252, .55), 0 6px 16px rgba(15, 63, 140, .12);
}
.review-form__badge svg { width: 34px; height: 34px; }
.review-form__title { font-size: 1.75rem; color: var(--navy-900); margin-bottom: 4px; }
@media (min-width: 768px) {
  .review-form__title { font-size: 2rem; }
}
.review-form__lead { color: #4A5A75; margin: 0 auto var(--space-5); max-width: 32rem; text-wrap: balance; }
.review-form__fields { text-align: start; }
.review-form__demo { margin-bottom: var(--space-5); font-size: .92rem; line-height: 1.5; padding: 10px 14px; }
.review-form__demo svg { width: 20px; height: 20px; }
.review-form__demo a { text-decoration: underline; font-weight: 500; }
.review-form .field__label { font-weight: 700; color: var(--navy-900); }
.field__optional { font-weight: 400; color: var(--muted); }
.review-form textarea.input { min-height: 132px; }
.review-form__row { display: grid; gap: 0 var(--space-4); }
@media (min-width: 560px) {
  .review-form__row { grid-template-columns: 1fr 1fr; }
}

/* the star picker: the painted stars and 9 invisible half-star targets on top of them */
.rating-field { border: 0; padding: 0; margin: 0 0 var(--space-4); min-width: 0; }
.rating-field legend { padding: 0; margin-bottom: 6px; }
.rating-input {
  display: grid;
  grid-template-columns: 240px auto;
  justify-content: start;
  align-items: center;
  column-gap: var(--space-4);
  row-gap: 4px;
}
.rating-input__stars, .rating-input__hits { grid-area: 1 / 1; }
.rating-input__stars { border-radius: 10px; }
.rating-input__hits { display: grid; grid-template-columns: repeat(10, 24px); height: 48px; position: relative; }
@media (pointer: coarse) {
  .rating-input { grid-template-columns: 260px auto; }
  .rating-input__hits { grid-template-columns: repeat(10, 26px); height: 52px; }
}
.rating-input__hit { position: relative; cursor: pointer; }
.rating-input__hit input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.rating-input:has(input:focus-visible) .rating-input__stars {
  outline: 3px solid var(--blue-500);
  outline-offset: 4px;
}
.rating-input__value { grid-area: 1 / 2; color: var(--muted); font-size: .98rem; white-space: nowrap; }
.rating-input.has-value .rating-input__value { color: var(--navy-900); font-weight: 700; font-variant-numeric: tabular-nums; }
.rating-field.field--error .stars__bg { stroke: var(--red-600); }
/* phones: the readout goes under the stars, so the row never runs past the card */
@media (max-width: 479.98px) {
  .rating-input { grid-template-columns: max-content; }
  .rating-input__value { grid-area: 2 / 1; }
}
/* The keyboard tip is for keyboards; the touch tip is for fingers (design review 20). */
.touch-only { display: none; }
@media (pointer: coarse) {
  .kbd-only { display: none; }
  .touch-only { display: inline; }
}

/* the optional photo */
.photo-field__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.photo-field__preview img {
  width: 64px; height: 64px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 3px var(--white), 0 4px 12px rgba(15, 63, 140, .18);
}
.photo-field__pick { position: relative; }
.photo-field__pick:has(input:focus-visible) { outline: 3px solid var(--blue-500); outline-offset: 2px; }
.photo-field__pick.is-busy { opacity: .6; pointer-events: none; }
.photo-field__pick svg { width: 20px; height: 20px; }
.photo-field__remove { color: var(--red-cta-dark); }
.photo-field__remove:hover { background: var(--red-100); color: var(--red-cta-dark); }
.photo-field__error { display: block; }

.review-form__consent { line-height: 1.6; }
.review-form .field--error .checkbox--boxed { border-color: var(--red-600); }

.review-form__submit {
  min-height: 56px;
  margin-top: var(--space-2);
  border-radius: var(--radius-btn, 12px);
  font-size: 1.15rem;
  gap: 12px;
  transition: background-color var(--transition), box-shadow var(--transition), transform 140ms cubic-bezier(0.23, 1, 0.32, 1);
}
.review-form__submit:active { transform: scale(.98); }
.review-form__submit svg { width: 22px; height: 22px; transform: scaleX(-1); }   /* the plane flies "forward" in RTL */
.review-form__privacy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: var(--space-4);
  color: var(--muted);
  font-size: .92rem;
  text-align: center;
}
.review-form__privacy svg { width: 18px; height: 18px; flex: none; }
.review-form__privacy a { text-decoration: underline; }
.review-form__fail { margin-top: var(--space-4); }
.review-form__fail a { text-decoration: underline; font-weight: 500; }

/* after sending */
.review-form__done {
  display: grid;
  justify-items: center;
  gap: var(--space-2);
  padding: var(--space-4) 0 var(--space-2);
  outline: none;
  animation: review-done-in 260ms cubic-bezier(0.23, 1, 0.32, 1);
}
.review-form__done[hidden] { display: none; }
.review-form__done-icon {
  width: 64px; height: 64px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--ok-100);
  color: var(--ok);
  margin-bottom: var(--space-2);
}
.review-form__done-icon svg { width: 32px; height: 32px; }
.review-form__done-title { font-size: 1.35rem; color: var(--navy-900); }
.review-form__done-text { color: #3E4E6A; max-width: 28rem; margin-bottom: var(--space-3); }
@keyframes review-done-in {
  from { opacity: 0; transform: translateY(6px); filter: blur(2px); }
  to { opacity: 1; transform: none; filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  .review-form__done { animation: none; }
}

/* placeholders in this form: readable (4.6:1), still lighter than typed text */
.review-form .input::placeholder { color: #69778F; }
