/* Invola: the review form on a business's website (live round 37,
   src/Website/lib/review-form.php). Loaded only while the form is switched
   on, on the home page, the Reviews page and the form's own page. In the
   template's own colour (--accent) or Standard's (--forest), its fonts and
   its buttons. */
.rv-form, .rv-dialog, .rv-page { --rv-accent: var(--accent, var(--forest, #1a5c52)); --rv-ink: #1d2327; --rv-mid: #4a5560; --rv-line: #c7ced6; --rv-gold: #e8a317; }
.rv-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.rv-home { margin: 24px 0 0; display: flex; justify-content: flex-start; }
.rv-home a, .rv-btns a { text-decoration: none; }
.rv-home-grid { margin-top: 0; display: flex; }
.wd-rv-home { margin-top: 28px; justify-content: center; }
.rv-open .fi, .rv-open i { margin-right: 2px; }
.rv-sec { padding: clamp(32px, 6vw, 72px) 0; }
.rv-page { max-width: 640px; margin: 0 auto; color: var(--rv-ink); }
.rv-h { font-size: clamp(1.5rem, 4vw, 2rem); line-height: 1.2; margin: 0 0 8px; color: var(--rv-ink); }
.rv-intro { margin: 0 0 20px; color: var(--rv-mid); }
.rv-form { display: grid; gap: 18px; text-align: left; color: var(--rv-ink); }
.rv-field { display: grid; gap: 6px; }
.rv-field label, .rv-stars legend { font-weight: 700; font-size: 1rem; color: var(--rv-ink); }
.rv-opt { font-weight: 400; color: var(--rv-mid); }
.rv-form input[type="text"], .rv-form textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 1rem; color: var(--rv-ink); background: #ffffff; border: 1.5px solid var(--rv-line); border-radius: 10px; padding: 12px 14px; min-height: 48px; }
.rv-form textarea { min-height: 130px; resize: vertical; line-height: 1.5; }
.rv-form input[type="text"]:focus, .rv-form textarea:focus { outline: 3px solid color-mix(in srgb, var(--rv-accent) 35%, transparent); outline-offset: 1px; border-color: var(--rv-accent); }
.rv-stars { border: 0; margin: 0; padding: 0; min-width: 0; }
.rv-stars legend { padding: 0; margin-bottom: 6px; }
.rv-star-row { display: flex; gap: 4px; }
.rv-star { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 10px; cursor: pointer; color: var(--rv-line); font-size: 2rem; }
.rv-star .fi, .rv-star i { width: 36px; height: 36px; font-size: 2rem; transition: color .12s, transform .12s; }
.rv-star input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.rv-star:has(input:focus-visible) { outline: 3px solid var(--rv-accent); outline-offset: 1px; }
.rv-star-row .rv-star.rv-on, .rv-star-row:has(input[value="1"]:checked) .rv-star:nth-child(-n+1), .rv-star-row:has(input[value="2"]:checked) .rv-star:nth-child(-n+2),
.rv-star-row:has(input[value="3"]:checked) .rv-star:nth-child(-n+3), .rv-star-row:has(input[value="4"]:checked) .rv-star:nth-child(-n+4),
.rv-star-row:has(input[value="5"]:checked) .rv-star:nth-child(-n+5) { color: var(--rv-gold); }
.rv-star:hover .fi, .rv-star:hover i { transform: scale(1.08); }
.rv-stars-said { margin: 4px 0 0; min-height: 1.3em; color: var(--rv-mid); font-size: .95rem; }
.rv-sr, .rv-trap { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.rv-consent { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; line-height: 1.45; }
.rv-consent input { width: 22px; height: 22px; flex: 0 0 22px; margin: 1px 0 0; accent-color: var(--rv-accent); }
.rv-msg { margin: 0; padding: 12px 14px; border-radius: 10px; background: #fdecea; color: #8a1c13; font-weight: 600; }
.rv-msg[hidden] { display: none; }
.rv-send { justify-self: start; min-height: 48px; }
.rv-send[disabled] { opacity: .7; cursor: wait; }
.rv-small { margin: -6px 0 0; font-size: .88rem; color: var(--rv-mid); }
.rv-done-p { font-size: 1.1rem; font-weight: 700; color: var(--rv-ink); margin: 8px 0 20px; }
.rv-done[hidden] { display: none; }
.rv-ts:empty { display: none; }
.rv-dialog { width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 16px; background: #ffffff; color: var(--rv-ink); box-shadow: 0 24px 60px rgba(0,0,0,.3); overflow: auto; }
.rv-dialog::backdrop { background: rgba(10,14,18,.6); }
.rv-dialog-in { position: relative; padding: 28px 24px 24px; }
.rv-dialog .rv-h { padding-right: 44px; }
.rv-close { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #f0f2f4; color: var(--rv-ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.rv-close:focus-visible { outline: 3px solid var(--rv-accent); outline-offset: 2px; }
@media (max-width: 560px) {
  .rv-dialog { width: 100vw; max-width: 100vw; max-height: 94vh; max-height: 94dvh; margin: auto 0 0; border-radius: 16px 16px 0 0; }
  .rv-dialog-in { padding: 22px 16px 20px; }
  .rv-star { width: 50px; height: 50px; }
  .rv-send { justify-self: stretch; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .rv-star .fi, .rv-star i { transition: none; } .rv-star:hover .fi, .rv-star:hover i { transform: none; } }
