/* =====================================================
   OLADAY V3 — REVIEW CAPTURE
   The "Rate us" trigger and the review form modal.
   Uses the V3 palette tokens defined in home.css.
   ===================================================== */

/* ---- trigger, below the review deck ---- */
.proof-actions {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}
.review-open-btn {
  flex: 0 0 auto;
  padding: 11px 22px;
  border-radius: 999px;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.review-open-btn:hover,
.review-open-btn:focus-visible {
  background: var(--gold);
  color: var(--ink);
}

/* ---- modal ---- */
.review-modal {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  background: rgba(8, 8, 10, 0.74);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.review-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}
body.review-modal-open {
  overflow: hidden;
}

.review-modal__panel {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: var(--ink-2);
  border: 1px solid var(--line-dark);
  border-radius: 20px;
  padding: 28px 24px 24px;
  color: #fffdf8;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.review-modal.is-open .review-modal__panel {
  transform: none;
}

.review-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-dark);
  background: transparent;
  color: #fffdf8;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.review-modal__close:hover {
  background: rgba(255, 255, 255, 0.08);
}

.review-modal__head {
  margin-bottom: 18px;
}
.review-modal__head h2 {
  margin: 0 0 6px;
  font-size: 22px;
  color: var(--gold-2);
}
.review-modal__head p {
  margin: 0;
  font-size: 13px;
  color: var(--muted-dark);
}

/* ---- star input ----
   Inputs are in reverse order (5..1) so the general sibling combinator
   can light every star to the LEFT of the hovered or checked one. */
.review-stars-input {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 4px;
  border: 0;
  margin: 0 0 18px;
  padding: 0;
}
.review-stars-input input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.review-stars-input label {
  font-size: 30px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.22);
  cursor: pointer;
  transition: color 0.15s ease, transform 0.15s ease;
}
/* Fill is driven by reviews.js rather than `input:checked ~ label`.
   The sibling approach depends on source order being reversed, which is
   fragile and did not resolve reliably in testing; an explicit class is
   deterministic and behaves the same for mouse, touch and keyboard. */
.review-stars-input label.is-filled {
  color: var(--gold);
}
.review-stars-input label.is-hovered {
  transform: scale(1.12);
}
.review-stars-input input:focus-visible + label {
  outline: 2px solid var(--gold-2);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---- fields ---- */
.review-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.review-field {
  display: block;
  margin-bottom: 14px;
}
.review-field > span {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted-dark);
}
.review-field input,
.review-field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line-dark);
  background: var(--ink-3);
  color: #fffdf8;
  font: inherit;
  font-size: 14px;
  resize: vertical;
}
.review-field input:focus,
.review-field textarea:focus {
  outline: none;
  border-color: var(--gold);
}
.review-field input:invalid:not(:placeholder-shown),
.review-field textarea:invalid:not(:placeholder-shown) {
  border-color: #ff6b6b;
}

/* Live word counter. Turns red past 100 — the server rejects there. */
.review-wordcount {
  display: block;
  margin-top: 6px;
  text-align: right;
  font-size: 11px;
  color: var(--muted-dark);
}
.review-wordcount.is-over {
  color: #ff6b6b;
  font-weight: 700;
}

.review-submit-btn {
  width: 100%;
  margin-top: 6px;
  padding: 14px 20px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.review-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* ---- thank-you state ---- */
.review-thanks {
  text-align: center;
  padding: 30px 10px 10px;
}
.review-thanks h2 {
  margin: 0 0 10px;
  font-size: 24px;
  color: #25d366;
}
.review-thanks p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted-dark);
}
.review-thanks__close {
  margin-top: 24px;
  padding: 12px 30px;
  border: none;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 520px) {
  .review-field-grid {
    grid-template-columns: 1fr;
  }
  .review-modal {
    padding: 12px;
    align-items: flex-end;
  }
  .review-modal__panel {
    padding: 24px 18px 20px;
    border-radius: 20px 20px 14px 14px;
  }
  .review-stars-input label {
    font-size: 26px;
  }
}
