/* ==========================================================================
   DIM Electrical: customer review funnel (reviews.dimelectrical.com)
   Self contained styles. Reuses the design tokens from main.css.
   Mobile first: this is opened from an invoice link on a phone.
   ========================================================================== */

.rv-body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(168deg, #FFEFD6 0%, #FFF7EF 42%, var(--wash) 100%);
}

.rv-header {
  padding: 18px var(--gutter);
  display: flex;
  justify-content: center;
}
.rv-brand img { height: 42px; width: auto; display: block; }

.rv-main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 8px var(--gutter) 40px;
}

.rv-card {
  width: 100%;
  max-width: 520px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: clamp(24px, 6vw, 40px);
}

.rv-screen { animation: rvIn 320ms var(--ease) both; }
/* [hidden] must win over the .btn/.rv-actions display rules below */
[hidden] { display: none !important; }
@keyframes rvIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .rv-screen { animation: none; } }

.rv-eyebrow {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange-hover);
  margin-bottom: 12px;
}
.rv-card h1 { font-size: clamp(1.7rem, 6vw, 2.3rem); }
.rv-card h2 { font-size: clamp(1.45rem, 5vw, 1.9rem); }
.rv-lede { color: var(--muted); font-size: 1.05rem; margin-bottom: 22px; }
.rv-lede strong { color: var(--ink); }

/* Star rating: native radios styled as stars, filled up to the active one --- */

.rv-stars-form { margin-top: 8px; }
.rv-stars {
  border: 0;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row-reverse;
  justify-content: center;
  gap: clamp(4px, 2vw, 10px);
}
.rv-stars input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.rv-stars label {
  cursor: pointer;
  color: #E3DDD8;
  padding: 4px;
  line-height: 0;
  transition: color 140ms var(--ease), transform 140ms var(--ease);
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.rv-stars label svg {
  width: clamp(38px, 11vw, 54px);
  height: clamp(38px, 11vw, 54px);
  fill: currentColor;
  stroke: none;
}
/* fill the hovered/checked star and every star after it in the DOM
   (which sits to its left because the row is reversed) */
.rv-stars input:checked ~ label,
.rv-stars label:hover,
.rv-stars label:hover ~ label { color: var(--orange); }
.rv-stars label:active { transform: scale(0.9); }
.rv-stars input:focus-visible + label {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
  border-radius: 8px;
}

.rv-stars-hint {
  text-align: center;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.92rem;
  margin-top: 14px;
  min-height: 1.4em;
}

/* Emoji / status mark ------------------------------------------------------- */
.rv-emoji {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--tint);
  color: var(--orange-hover);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.rv-emoji svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Actions + forms ----------------------------------------------------------- */
.rv-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.rv-full { width: 100%; }
.rv-optional { color: var(--muted); font-weight: 500; }
.rv-form .field:last-of-type { margin-bottom: 20px; }
.rv-form textarea { min-height: 120px; }
.rv-form-status { margin-top: 14px; font-weight: 600; font-size: 0.92rem; color: var(--muted); }
.rv-form-status.is-error { color: #B3261E; }
.rv-invite-note { color: var(--muted); font-size: 0.95rem; margin: 18px 0 6px; }

/* Voucher card -------------------------------------------------------------- */
.rv-voucher {
  position: relative;
  margin-top: 24px;
  border-radius: var(--radius);
  padding: 22px 24px;
  color: var(--white);
  background: linear-gradient(135deg, var(--orange), var(--orange-hover));
  box-shadow: 0 10px 26px rgba(224, 119, 37, 0.28);
  overflow: hidden;
}
.rv-voucher::before {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}
.rv-voucher__tag {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.9;
}
.rv-voucher__amount {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.2rem, 9vw, 3rem);
  line-height: 1;
  margin: 6px 0 2px;
}
.rv-voucher__desc { font-weight: 600; margin-bottom: 12px; }
.rv-voucher__how { font-size: 0.9rem; color: rgba(255, 255, 255, 0.9); margin: 0; position: relative; }

/* Fine print + footer ------------------------------------------------------- */
.rv-fineprint {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--muted);
}
.rv-footer {
  text-align: center;
  padding: 0 var(--gutter) 28px;
  font-size: 0.85rem;
  color: var(--muted);
}
.rv-footer a { font-weight: 700; }
