/* =====================================================================
   /review — the review submission form, and the review blocks that appear
   on product pages and the order-success page.

   Mobile-first. Every rule here is the phone layout; the media queries only
   ADD the wider-screen behaviour, so nothing can look right on desktop and
   broken at 375px. Touch targets on the star picker are 44px minimum.
   ===================================================================== */
.mppx { --gold-ink:#8E7312; --star:#C67C00; }

/* ---------- shared: star row ---------- */
.rv-stars { display:block; flex:none; }
.rv-rate-line { display:flex; align-items:center; gap:9px; flex-wrap:wrap; }
.rv-rate-num { font:800 15px/1 var(--font-body); color:var(--ink); }
.rv-rate-count { font:14px/1 var(--font-body); color:var(--tx); }
.rv-rate-count a { color:var(--blue); font-weight:600; }
.rv-rate-count a:hover { text-decoration:underline; }

/* =====================================================================
   1. The form page
   ===================================================================== */
.rv-sec { padding:44px 0 72px; }
.rv-head { text-align:center; max-width:640px; margin:0 auto 32px; }
.rv-kicker { font:800 12px/1 var(--font-body); letter-spacing:.09em; text-transform:uppercase; color:var(--gold-ink); margin-bottom:10px; }
.rv-h1 { font-family:var(--font-display,serif); font-weight:800; color:var(--ink); font-size:clamp(30px,7vw,48px); line-height:1.04; letter-spacing:-.02em; margin:0 0 14px; }
.rv-lead { font-size:clamp(15px,3.8vw,17px); line-height:1.6; color:var(--tx); margin:0; }
.rv-lead a { color:var(--blue); font-weight:600; }

.rv-grid { display:grid; grid-template-columns:1fr; gap:20px; max-width:960px; margin:0 auto; }
.rv-card { background:#fff; border:1px solid var(--line); border-radius:20px; padding:22px 18px; box-shadow:0 18px 44px rgba(12,21,56,.09); }
.rv-hp { position:absolute !important; left:-9999px !important; width:1px; height:1px; opacity:0; }

.rv-fields { display:flex; flex-direction:column; gap:18px; }
.rv-field > label, .rv-legend { display:block; padding:0; font:700 13px/1.35 var(--font-body); color:var(--ink); margin-bottom:8px; }
.rv-hint { display:block; font:400 12.5px/1.45 var(--font-body); color:#6B7488; margin-top:6px; }
.rv-opt { font-weight:400; color:#6B7488; }

.rv-card input[type=text], .rv-card input[type=email], .rv-card textarea, .rv-card select {
  width:100%; box-sizing:border-box; padding:14px 15px; border-radius:11px;
  border:1px solid rgba(11,20,87,.16); background:#fff; color:#0B1457;
  font:15px/1.45 var(--font-body,system-ui,sans-serif); outline:none;
  transition:border-color .15s ease, box-shadow .15s ease;
}
.rv-card select { appearance:none; padding-right:42px; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%230B1457' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 16px center; }
.rv-card input::placeholder, .rv-card textarea::placeholder { color:#8A93AD; }
.rv-card textarea { min-height:150px; resize:vertical; }
.rv-card input:focus, .rv-card textarea:focus, .rv-card select:focus { border-color:var(--gold); box-shadow:0 0 0 3px rgba(240,195,31,.28); }

/* ---- locked product chip (arrived from a per-product link) ---- */
.rv-product { display:flex; align-items:center; gap:13px; padding:12px; border:1px solid var(--line); border-radius:14px; background:#F7F9FD; }
.rv-product img { flex:none; width:52px; height:52px; border-radius:9px; object-fit:cover; background:#fff; border:1px solid var(--line); }
.rv-product-t { min-width:0; }
.rv-product-name { font:700 14.5px/1.35 var(--font-body); color:var(--ink); }
.rv-product-sub { font:12.5px/1.4 var(--font-body); color:#6B7488; margin-top:3px; }
.rv-swap { appearance:none; border:0; background:none; padding:0; margin-top:9px; cursor:pointer; font:600 13px/1 var(--font-body); color:var(--blue); text-decoration:underline; }

/* ---- star picker: real radios, styled as buttons. Fill state is driven by a
   tiny bit of JS (an .on class) rather than a sibling-selector trick, so hover,
   keyboard focus, and touch all behave the same and nothing depends on the
   stars being laid out in reverse DOM order. ---- */
.rv-starpick { border:0; padding:0; margin:0; min-width:0; }
.rv-starpick-row { display:flex; align-items:center; gap:2px; flex-wrap:wrap; }
.rv-starpick input { position:absolute; opacity:0; width:1px; height:1px; }
.rv-starpick label { display:grid; place-items:center; width:46px; height:46px; cursor:pointer; border-radius:10px; color:#D9DEEA; transition:color .12s ease, background .12s ease; }
.rv-starpick label svg { width:30px; height:30px; display:block; fill:currentColor; }
.rv-starpick label.on { color:var(--star); }
.rv-starpick input:focus-visible + label { background:rgba(240,195,31,.22); box-shadow:0 0 0 2px var(--gold); }
.rv-starword { font:700 14px/1 var(--font-body); color:var(--ink); margin-left:8px; min-height:1em; }

/* ---- consent ---- */
.rv-check { display:flex; gap:11px; align-items:flex-start; }
.rv-check input { flex:none; width:20px; height:20px; margin:1px 0 0; accent-color:var(--blue); }
.rv-check span { font:13.5px/1.5 var(--font-body); color:var(--tx); }

.rv-btn { appearance:none; border:0; cursor:pointer; width:100%; margin-top:2px; padding:16px 18px; border-radius:12px; background:var(--gold); color:#0B1457; font:800 16px/1 var(--font-body); box-shadow:0 10px 24px rgba(240,195,31,.32); transition:filter .15s ease, transform .07s ease; }
.rv-btn:hover { filter:brightness(1.05); }
.rv-btn:active { transform:translateY(1px); }
.rv-btn:disabled { opacity:.6; cursor:default; }

.rv-msg { margin:14px 0 0; font:14px/1.5 var(--font-body); min-height:1em; text-align:center; }
.rv-msg.err { color:#D63B57; }
.rv-msg.ok { color:#149063; font-weight:600; }
.rv-form.is-done .rv-fields { display:none; }

/* ---- aside: how reviews work ---- */
.rv-aside-card { background:#fff; border:1px solid var(--line); border-radius:20px; padding:22px 18px; box-shadow:0 12px 30px rgba(12,21,56,.07); }
.rv-aside-t { font-family:var(--font-display,serif); font-weight:800; font-size:19px; color:var(--ink); margin:0 0 10px; }
.rv-aside-p { font:14.5px/1.65 var(--font-body); color:var(--tx); margin:0 0 16px; }
.rv-aside-list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:12px; }
.rv-aside-row { display:flex; gap:10px; align-items:flex-start; font:14px/1.55 var(--font-body); color:var(--tx); }
.rv-aside-row svg { flex:none; margin-top:3px; color:var(--blue); }

/* =====================================================================
   2. Reviews ON a product page
   ===================================================================== */
.rvb-summary { display:flex; flex-direction:column; align-items:center; gap:8px; text-align:center; margin-bottom:26px; }
.rvb-avg { font-family:var(--font-display,serif); font-weight:800; font-size:44px; line-height:1; color:var(--ink); }
.rvb-of { font:600 14px/1 var(--font-body); color:#6B7488; }
.rvb-count { font:15px/1.5 var(--font-body); color:var(--tx); margin:0; }

.rvb-list { display:grid; grid-template-columns:1fr; gap:16px; }
.rvb-item { background:#fff; border:1px solid var(--line); border-radius:16px; padding:20px 18px; }
.rvb-item-top { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:11px; }
.rvb-verified { display:inline-flex; align-items:center; gap:5px; font:800 10.5px/1 var(--font-body); letter-spacing:.05em; text-transform:uppercase; color:#0F6B4F; background:#E4F5EE; padding:5px 9px; border-radius:999px; }
.rvb-title { font-family:var(--font-display,serif); font-weight:800; font-size:17px; line-height:1.3; color:var(--ink); margin:0 0 7px; }
.rvb-body { font:15px/1.65 var(--font-body); color:var(--tx); margin:0 0 14px; }
.rvb-who { font:700 14px/1.4 var(--font-body); color:var(--ink); }
.rvb-role { font:13px/1.45 var(--font-body); color:#6B7488; margin-top:2px; }
.rvb-date { font:13px/1.45 var(--font-body); color:#8A93AD; margin-top:2px; }

/* the "leave a review" prompt, shown with or without existing reviews */
.rvb-ask { margin:26px auto 0; max-width:620px; text-align:center; background:#fff; border:1px solid var(--line); border-radius:16px; padding:22px 18px; }
.rvb-ask-t { font-family:var(--font-display,serif); font-weight:800; font-size:18px; color:var(--ink); margin:0 0 7px; }
.rvb-ask-p { font:14.5px/1.6 var(--font-body); color:var(--tx); margin:0 0 16px; }
.rvb-ask-btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; background:var(--nav); color:#fff; text-decoration:none; font:700 15px/1 var(--font-body); padding:14px 22px; border-radius:11px; }
.rvb-ask-btn:hover { filter:brightness(1.12); }

/* =====================================================================
   3. Review prompt on /order/success
   ===================================================================== */
.rvo { margin:26px 0 0; background:#fff; border:1px solid var(--line); border-radius:18px; padding:22px 18px; text-align:center; }
.rvo-h { font-family:var(--font-display,serif); font-weight:800; font-size:20px; color:var(--ink); margin:0 0 8px; }
.rvo-p { font:15px/1.65 var(--font-body); color:var(--tx); margin:0 0 18px; }
.rvo-links { display:flex; flex-direction:column; gap:10px; align-items:stretch; }
.rvo-link { display:flex; align-items:center; justify-content:center; gap:9px; text-align:center; background:#F7F9FD; border:1px solid var(--line); border-radius:12px; padding:14px 16px; text-decoration:none; color:var(--ink); font:700 14.5px/1.35 var(--font-body); }
.rvo-link:hover { border-color:var(--gold); background:#FFFCF2; }
.rvo-link svg { flex:none; color:var(--star); }

/* =====================================================================
   Wider screens
   ===================================================================== */
@media (min-width:640px) {
  .rv-card, .rv-aside-card { padding:26px 24px; }
  .rvb-item { padding:24px 22px; }
  .rvb-ask { padding:26px 24px; }
  .rvo { padding:26px 24px; }
  .rvo-links { flex-direction:row; flex-wrap:wrap; justify-content:center; }
  .rvo-link { flex:0 1 auto; }
  .rv-btn { width:auto; min-width:220px; align-self:flex-start; }
  /* Two review cards side by side from tablet width up: one 720px-wide card in
     a single column reads as a stretched banner, not a review. */
  .rvb-list { grid-template-columns:repeat(2, minmax(0,1fr)); }
  .rvb-summary { flex-direction:row; justify-content:center; align-items:baseline; gap:14px; text-align:left; }
  .rvb-summary .rv-stars { align-self:center; }
}
@media (min-width:820px) {
  .rv-sec { padding:56px 0 84px; }
  .rv-grid { grid-template-columns:1.35fr .85fr; gap:24px; align-items:start; }
}
@media (min-width:1100px) {
  .rvb-list { grid-template-columns:repeat(3, minmax(0,1fr)); }
}

/* Visually-hidden text. Duplicated here (it also lives in shop.css) because
   each page loads only the stylesheets it needs, and the star picker's labels
   depend on it for their accessible names. */
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
