/* Dyenamic Designs: Google reviews (home page band, js/reviews.js) and the dashboard Reviews screen + review QR card (js/admin/views-reviews.js).
   Colors come only from the variables in site.css. Cards are dark ink with yellow stars so they read on the light section and on the dashboard alike. */

/* ---------- stars ---------- */
.rv-stars { position: relative; display: inline-block; line-height: 0; white-space: nowrap; vertical-align: middle; }
.rv-st-bg, .rv-st-on { display: inline-flex; gap: 2px; }
.rv-st-on { position: absolute; left: 0; top: 0; overflow: hidden; }
.rv-stars svg { width: 20px; height: 20px; flex: none; }
.rv-st-bg svg { fill: rgba(255, 255, 255, 0.24); }
.rv-st-on svg { fill: var(--c-yellow); }
.rv-stars.rv-lg svg { width: 30px; height: 30px; }
.rv-stars.rv-onlight .rv-st-bg svg { fill: var(--line-l); }
.rv-stars.rv-onlight .rv-st-on svg { fill: var(--c-black); }

/* ---------- cards ---------- */
.rv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.rv-card { --focus: var(--c-yellow); --link: var(--c-white); --muted: var(--c-gray-d); position: relative; display: flex; flex-direction: column; gap: 12px; padding: 22px 22px 20px; background: var(--c-ink); color: var(--c-white); border-radius: var(--r); border-top: 4px solid var(--c-yellow); min-width: 0; }
.rv-top { display: flex; align-items: center; gap: 12px; }
.rv-av { position: relative; flex: none; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: var(--c-yellow); color: var(--c-black); }
.rv-ini { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; font-size: 1.5rem; line-height: 1; }
.rv-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rv-who { display: grid; min-width: 0; line-height: 1.25; }
.rv-who b { font-size: 1.1rem; overflow-wrap: anywhere; }
.rv-when { color: var(--muted); font-size: 0.95rem; }
.rv-text { margin: 0; flex: 1; }
.rv-text p { margin: 0; font-size: 1.05rem; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-line; }
.rv-clamp:not(.rv-open) p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; line-clamp: 5; overflow: hidden; }
.rv-more { align-self: flex-start; background: none; border: 0; padding: 4px 0; color: var(--c-yellow); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.rv-src { margin-top: 2px; font-size: 0.95rem; font-weight: 600; color: var(--c-gray-d); }
a.rv-src { color: var(--c-white); }
.rv-src, .rv-more { display: inline-flex; align-items: center; min-height: 44px; }   /* tap targets: at least 44px */
.rv-src { align-self: flex-start; }
.rv-feature .rv-text p { font-size: clamp(1.25rem, 2.4vw, 1.55rem); line-height: 1.45; }
.rv-feature::before { content: "\201C"; position: absolute; right: 18px; top: 4px; font-family: var(--font-head); font-weight: 800; font-size: 7rem; line-height: 1; color: var(--c-yellow); opacity: 0.9; pointer-events: none; }

/* dark panels inside the light band go back to the dark-surface button colors (site.css 'html.rs' flips --c-blue to black on light sections) */
html.rs .rv-sum, html.rs .rv-card { --c-blue: #ffffff; --c-blue-glow: #ffffff; --on-blue: #000000; }

/* ---------- summary panel ---------- */
.rv-sum { padding: 26px 26px 28px; border-radius: var(--r); }
.rv-big { font-family: var(--font-head); font-weight: 800; font-style: italic; font-size: clamp(4.5rem, 12vw, 7.2rem); line-height: 0.85; color: var(--c-yellow); margin-bottom: 12px; }
.rv-sumline { margin: 8px 0 0; font-size: 1.15rem; color: var(--c-gray-d); }
.rv-sumline b { color: var(--c-white); }
.rv-sum h3 { margin: 22px 0 8px; color: var(--c-white); font-size: clamp(1.9rem, 4vw, 2.4rem); }
.rv-sum p { max-width: 46ch; }
.rv-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.rv-sum-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; margin-bottom: 22px; }
.rv-sum-row .rv-actions { margin-top: 0; }
.rv-sum-l { display: flex; align-items: center; gap: 22px; }
.rv-sum-row .rv-big { margin: 0; }
.rv-sample { text-align: center; margin: -18px 0 18px; font-weight: 700; color: var(--c-err-l); }
.rv-1 .rv-grid1 { display: grid; gap: 20px; }
.rv-list1 { display: grid; }
.rv-list1 .rv-card { height: 100%; justify-content: center; padding: clamp(24px, 4vw, 40px); }
.rv-compact .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; }
.rv-compact { padding-block: clamp(30px, 4vw, 48px); }
.rv-compact h2 { font-size: clamp(2rem, 4.4vw, 2.8rem); margin-bottom: 0.15em; }
.rv-compact p { margin: 0; color: var(--muted); }
.rv-compact .rv-actions { margin: 0; }

/* ---------- layouts: phone = scroll-snap row, tablet = two columns, desktop = a six-column grid ---------- */
@media (max-width: 599px) {
    .rv-many .rv-list { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; margin-inline: calc(var(--gut) * -1); padding: 4px var(--gut) 14px; -webkit-overflow-scrolling: touch; }
    .rv-many .rv-card { flex: 0 0 min(86%, 340px); scroll-snap-align: center; }
    .rv-sum-l { flex-wrap: wrap; gap: 12px 18px; }
    .rv-actions .btn { flex: 1 1 100%; }
}
@media (min-width: 600px) and (max-width: 899px) {
    .rv-many .rv-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rv-many .rv-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (min-width: 900px) {
    .rv-many .rv-list { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .rv-many .rv-card { grid-column: span 2; }
    .rv-many .rv-n2 .rv-card, .rv-many .rv-n4 .rv-card, .rv-many .rv-n5 .rv-card:nth-child(n+4) { grid-column: span 3; }
}
@media (min-width: 860px) {
    .rv-1 .rv-grid1 { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: stretch; }
}
@media (prefers-reduced-motion: no-preference) {
    .rv-many .rv-list { scroll-behavior: smooth; }
    .rv-card { transition: transform 0.2s ease, box-shadow 0.2s ease; }
    .rv-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px var(--shade-1); }
}

/* ---------- dashboard: Reviews screen and the review QR card ---------- */
.rv-admin .rv-list { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.rv-admin .toolbar { margin-top: 4px; }
.rv-note { color: var(--muted); margin: 0 0 14px; }
.rv-adm-h { margin: 28px 0 10px; font-size: 1.9rem; }
.rv-empty { padding: 18px 20px; background: var(--c-white); border: 1px solid var(--line-l); border-left: 6px solid var(--c-yellow); border-radius: var(--r); }
.rv-empty p { margin: 0 0 6px; }
.qr-wrap { display: grid; gap: 22px; grid-template-columns: minmax(0, 330px) minmax(0, 1fr); align-items: start; }
.qr-prev { width: 100%; max-width: 330px; height: auto; display: block; border: 1px solid var(--line-l); border-radius: var(--r); background: var(--c-white); box-shadow: 0 6px 18px var(--shade-1); }
.qr-side p { margin: 0 0 12px; max-width: 56ch; }
.qr-url { font-size: 0.9rem; color: var(--muted); overflow-wrap: anywhere; }
.qr-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
@media (max-width: 700px) { .qr-wrap { grid-template-columns: minmax(0, 1fr); } }

/* the printable sheet is built on demand (4 cards on a letter page) and shown only while printing */
#qrSheet { display: none; }
@page { size: letter; margin: 0.25in; }
@media print {
    body.printing-qr > *:not(#qrSheet) { display: none !important; }
    body.printing-qr { background: #fff !important; }
    body.printing-qr #qrSheet { display: grid; grid-template-columns: 4in 4in; grid-auto-rows: 5.2in; justify-content: center; gap: 0; }
    body.printing-qr #qrSheet img { width: 4in; height: 5.2in; display: block; outline: 1px dashed #999; outline-offset: -1px; }
}
/* 2026-11-08: a rating with no written reviews yet: one full-width bar, rating left, the ask right. */
.rv-0 .rv-sum-row { margin-bottom: 0; padding: clamp(22px, 3vw, 36px); }
.rv-sum-r { max-width: 52ch; }
.rv-sum-r h3 { margin: 0 0 6px; }
.rv-sum-r p { margin: 0; }
.rv-sum-r .rv-actions { margin-top: 16px; }
