/* ===========================================
   HERTSBUILD — REVIEWS
   SVG star display + accessible star selector, rating summary,
   empty/neutral state and inline success state.
   Loaded only on /reviews/, /leave-a-review/ and the homepage block.
   Builds on .review-grid / .review-card / .review-meta in components.css.
   =========================================== */

/* ----- SVG star display (overrides the text-based .review-stars) ----- */
.review-stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  line-height: 0;
  margin-bottom: 12px;
  letter-spacing: normal;
}
.review-stars svg { width: 18px; height: 18px; }
.review-stars .star-on  { fill: var(--c-amber); }
.review-stars .star-off { fill: none; stroke: var(--c-amber); stroke-width: 1.5; opacity: 0.45; }

/* ----- Rating summary header ----- */
.reviews-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0 0 2rem;
}
.reviews-summary .rating-num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--c-slate);
}
.reviews-summary .review-stars { margin-bottom: 0; }
.reviews-summary .review-stars svg { width: 22px; height: 22px; }
.reviews-summary .rating-meta { color: var(--c-mid); font-size: 0.95rem; }

/* ----- Empty / neutral state ----- */
.reviews-empty {
  color: var(--c-mid);
  font-size: 1.08rem;
  margin: 0;
}

/* ----- Homepage reviews block ----- */
.home-reviews { background: var(--c-sand); }
.home-reviews .section-head { text-align: center; margin-bottom: 0.5rem; }
.home-reviews .reviews-summary { justify-content: center; }

/* ----- Star selector (review form) ----- */
.star-select { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.star-select legend {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--c-slate);
  letter-spacing: 0.01em;
  margin-bottom: 6px;
  padding: 0;
}
.star-input-row {
  display: inline-flex;
  gap: 6px;
}
.star-input-row .star {
  position: relative;
  display: inline-flex;
  cursor: pointer;
  line-height: 0;
}
/* Visually hide the radio but keep it focusable/operable */
.star-input-row .star input {
  position: absolute;
  width: 100%;
  height: 100%;
  margin: 0;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.star-input-row .star svg {
  width: 40px;
  height: 40px;
  fill: none;
  stroke: var(--c-amber);
  stroke-width: 1.4;
  transition: fill 0.12s ease, transform 0.12s ease;
}
.star-input-row .star.is-on svg { fill: var(--c-amber); }
.star-input-row .star:hover svg { transform: scale(1.08); }
.star-input-row .star input:focus-visible + svg {
  outline: 2px solid var(--c-amber);
  outline-offset: 3px;
}
.star-select.is-invalid .star-input-row .star svg { stroke: var(--c-error); }

/* ----- Honeypot (spam trap) — visually removed, off-screen ----- */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ----- Inline success state ----- */
.review-success {
  display: none;
  background: var(--c-white);
  border-top: 4px solid var(--c-success);
  padding: 44px 36px;
  text-align: center;
}
.review-success.is-visible { display: block; }
.review-success .success-mark {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  color: var(--c-success);
  stroke: var(--c-success);
}
.review-success h2 { margin-top: 0; }
.review-success p { color: var(--c-mid); margin-bottom: 0; }

/* Form-level message (errors) */
.review-form-wrap .form-message {
  margin: 12px 0 0;
  font-size: 0.92rem;
  font-weight: 600;
}
