/* Google Reviews page — builds on multi2.css (Instrument Cluster tokens, header, panels, print). */
.rv-mode { color: #ffd100; font-size: 13px; font-weight: 800; text-decoration: none; border: 1px solid #5a4d10; border-radius: 8px; padding: 9px 12px; align-self: flex-end; }
.rv-mode:hover { background: #2a2408; }
.rv-mode:focus-visible { outline: 2px solid #ffd100; outline-offset: 2px; }
.rv-note { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--warn); border-radius: 8px; padding: 10px 14px; font-size: 14px; color: var(--muted); }
.rv-note b { color: var(--ink); }

/* ---------- totals ---------- */
.rv-tiles { display: grid; grid-template-columns: 1.15fr 1.15fr repeat(4, minmax(0, 1fr)); gap: 12px; }
.rv-tiles:has(> :nth-child(7)) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rv-tile { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; min-width: 0; display: grid; gap: 4px; align-content: start; }
.rv-tile .v { font-family: var(--font-display); font-weight: 700; font-size: 34px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.rv-tile .s { font-size: 12.5px; color: var(--muted); }
.rv-tile.hero { background: radial-gradient(130% 130% at 0% 0%, rgba(255, 209, 0, .12), transparent 60%), var(--panel); }
.rv-tile.period .v { color: var(--good); }
.rv-tile.period .v.zero { color: var(--muted); }

/* ---------- stars ---------- */
.rv-stars { display: inline-flex; gap: 2px; vertical-align: -2px; }
.rv-stars i { width: 15px; height: 15px; display: block; background: linear-gradient(90deg, #fbbc04 var(--f), var(--star-empty, #474c55) var(--f));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l2.9 6.9 7.1.6-5.4 4.7 1.6 7.1L12 17.6 5.8 21.3l1.6-7.1L2 9.5l7.1-.6z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l2.9 6.9 7.1.6-5.4 4.7 1.6 7.1L12 17.6 5.8 21.3l1.6-7.1L2 9.5l7.1-.6z'/%3E%3C/svg%3E") center / contain no-repeat; }
.rv-stars.lg i { width: 20px; height: 20px; }
:root { --star-empty: #474c55; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --star-empty: #cfd3d9; } }
:root[data-theme="light"] { --star-empty: #cfd3d9; }

/* ---------- AI report ---------- */
.rv-ai { display: grid; gap: 14px; }
.rv-ai-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.rv-ai-head h3 { margin: 4px 0 0; font-size: 20px; font-weight: 800; text-wrap: balance; max-width: 70ch; }
.rv-ai-sum { margin: 0; color: var(--muted); max-width: 90ch; }
.rv-ai-meta { font-size: 12px; color: var(--muted); }
.rv-ai-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.rv-ai-col { background: var(--panel-2); border-radius: 8px; padding: 12px 14px; border-top: 3px solid var(--line); min-width: 0; }
.rv-ai-col.good { border-top-color: var(--good); } .rv-ai-col.bad { border-top-color: var(--bad); } .rv-ai-col.act { border-top-color: var(--accent); }
.rv-ai-col ul, .rv-ai-col ol { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; }
.rv-ai-col li b { display: block; }
.rv-ai-col li span { color: var(--muted); font-size: 13px; }
.rv-watch { display: flex; gap: 8px; flex-wrap: wrap; }
.rv-watch button { font: inherit; font-size: 13px; text-align: left; background: var(--panel-2); color: var(--ink); border: 1px solid var(--bad); border-radius: 8px; padding: 8px 10px; cursor: pointer; max-width: 420px; }
.rv-watch button b { color: var(--bad); }
.rv-watch button:hover { background: var(--panel); }
.rv-watch button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rv-btn { font: inherit; font-weight: 700; font-size: 13px; color: var(--ink); background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; cursor: pointer; }
.rv-btn:hover { border-color: var(--accent); }
.rv-btn:disabled { opacity: .5; cursor: wait; }
.rv-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rv-empty { color: var(--muted); font-size: 14px; margin: 0; }

/* ---------- table ---------- */
.rv-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.rv-search { font: inherit; font-size: 14px; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; min-width: 240px; }
.rv-search:focus { outline: none; border-color: var(--accent); }
.rv-table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
table.rv-table { width: 100%; border-collapse: collapse; min-width: 980px; font-variant-numeric: tabular-nums; font-size: 14px; }
.rv-table th, .rv-table td { padding: 10px 10px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.rv-table th { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; position: sticky; top: 0; background: var(--panel); }
.rv-table th button { all: unset; cursor: pointer; }
.rv-table th button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rv-table th[aria-sort] button { color: var(--ink); }
.rv-table th.l, .rv-table td.l { text-align: left; }
.rv-table tbody tr { cursor: pointer; }
.rv-table tbody tr:hover td, .rv-table tbody tr:focus-visible td { background: var(--panel-2); }
.rv-table tbody tr:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.rv-store b { display: block; font-size: 14.5px; }
.rv-store small { color: var(--muted); font-size: 12px; white-space: normal; }
.rv-rate { display: inline-flex; gap: 8px; align-items: center; justify-content: flex-end; }
.rv-rate b { font-size: 16px; }
.rv-num.up { color: var(--good); font-weight: 800; } .rv-num.zero { color: var(--muted); }
.rv-num small { display: block; font-size: 10.5px; color: var(--muted); font-weight: 500; }
.rv-chip { display: inline-block; font-size: 11.5px; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: var(--panel-2); color: var(--muted); text-transform: capitalize; }
.rv-chip.positive { color: var(--good); background: rgba(52, 210, 123, .14); }
.rv-chip.mixed { color: var(--warn); background: rgba(255, 176, 32, .14); }
.rv-chip.negative { color: var(--bad); background: rgba(255, 90, 79, .14); }
.rv-spark { width: 110px; height: 30px; display: block; margin-left: auto; }
.rv-table tfoot td { font-weight: 800; border-top: 2px solid var(--ink); border-bottom: 0; }
.rv-err { color: var(--warn); font-size: 12px; white-space: normal; }

/* ---------- drawer ---------- */
.rv-drawer { position: fixed; inset: 0; z-index: 50; }
.rv-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); }
.rv-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(760px, 100%); background: var(--bg); border-left: 1px solid var(--line); overflow-y: auto; padding: 22px 22px calc(28px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 16px; align-content: start; animation: rvIn .22s ease-out; }
@keyframes rvIn { from { transform: translateX(30px); opacity: .4; } to { transform: none; opacity: 1; } }
.rv-close { position: sticky; top: 0; justify-self: end; font: inherit; font-size: 26px; line-height: 1; width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; z-index: 2; }
.rv-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rv-dh { display: grid; gap: 4px; margin-top: -44px; padding-right: 54px; }
.rv-dh h2 { font-family: var(--font-display); font-size: 30px; margin: 0; text-transform: uppercase; line-height: 1.05; }
.rv-dh .addr { color: var(--muted); font-size: 14px; }
.rv-links { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13.5px; font-weight: 700; }
.rv-links a { color: var(--ink); text-underline-offset: 3px; }
.rv-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rv-kpis .rv-tile .v { font-size: 26px; }
.rv-range { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.rv-range button { font: inherit; font-size: 12.5px; font-weight: 700; background: transparent; color: var(--muted); border: 0; padding: 6px 10px; cursor: pointer; }
.rv-range button[aria-pressed="true"] { background: var(--accent); color: #000; }
.rv-range button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.rv-chart-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.rv-revs { display: grid; gap: 10px; }
.rv-rev { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; display: grid; gap: 6px; }
.rv-rev-top { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.rv-rev p { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.rv-ai-store { display: grid; gap: 8px; }
.rv-ai-store .row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rv-ai-store ul { margin: 4px 0 0; padding-left: 18px; font-size: 13.5px; display: grid; gap: 4px; }
.rv-ai-store .act { background: var(--panel-2); border-left: 3px solid var(--accent); border-radius: 6px; padding: 10px 12px; font-size: 14px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) { .rv-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .rv-ai-cols { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 620px) {
  .rv-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rv-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rv-ai-store .row { grid-template-columns: minmax(0, 1fr); }
  .rv-search { min-width: 0; width: 100%; }
  .rv-panel { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { .rv-panel { animation: none; } }

/* ---------- print ---------- */
@media print {
  :root { --star-empty: #d5d8dd; }
  .rv-drawer, .rv-mode, .rv-tools input, .rv-btn { display: none !important; }
  .rv-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .rv-ai-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rv-table-wrap { overflow: visible; }
  table.rv-table { min-width: 0; font-size: 11px; }
  .rv-table th, .rv-table td { padding: 5px 6px; }
  .rv-table th { position: static; }
  .rv-spark { width: 80px; height: 22px; }
}
/* Qualtrics feed: reply status */
.rv-num.warn, .rv-tile .v.warn { color: var(--warn); font-weight: 800; }
.rv-rep { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; border-radius: 999px; padding: 2px 8px; margin: 2px 0 6px; }
.rv-rep.yes { color: var(--good); background: rgba(46, 204, 113, .12); }
.rv-rep.no { color: var(--warn); background: rgba(255, 176, 32, .14); }
/* Quick glance: 30-day star mix + newest review in the stores table */
.rv-table td.rv-st { min-width: 150px; }
.rv-sbar { display: flex; height: 10px; border-radius: 3px; overflow: hidden; background: var(--line); width: 150px; margin-left: auto; gap: 1px; }
.rv-sbar i { display: block; min-width: 3px; }
.rv-sbar.wide { width: 100%; height: 8px; margin-top: 8px; }
.rv-skey { display: flex; flex-wrap: wrap; gap: 2px 8px; margin-top: 6px; font-size: 11px; color: var(--muted); }
.rv-skey em { display: inline-block; width: 7px; height: 7px; border-radius: 2px; margin-right: 3px; }
.rv-st-line { font-size: 12px; color: var(--muted); margin-top: 4px; }
.rv-st-line b { color: var(--ink); }
.rv-st-line .bad { color: var(--warn); font-weight: 700; }
.rv-table td.rv-new { white-space: normal; min-width: 210px; max-width: 280px; }
.rv-new-top { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.rv-new-top .rv-stars i { width: 11px; height: 11px; }
.rv-new-no { color: var(--warn); font-weight: 700; }
.rv-new-txt { font-size: 12.5px; line-height: 1.35; margin-top: 3px; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rv-new.low .rv-new-txt { color: var(--bad); }
.rv-table th, .rv-table td { padding: 9px 8px; }
.rv-chip.sm { font-size: 10px; padding: 1px 7px; margin-left: 4px; vertical-align: 1px; }
.rv-table td.rv-new { min-width: 190px; max-width: 250px; }
.rv-sbar { width: 130px; }
.rv-table td.rv-st { min-width: 130px; }
/* Store view: review history */
.rv-hist { display: grid; gap: 10px; }
.rv-hist-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.rv-rf { justify-self: start; }
.rv-hist-sum { font-size: 13px; color: var(--muted); }
.rv-hist-line b { color: var(--ink); } .rv-hist-line .warn { color: var(--warn); font-weight: 700; }
.rv-hist-sum .rv-sbar.wide { margin-top: 8px; height: 9px; }
.rv-rev.low { border-left: 3px solid var(--bad); }
.rv-rev-top b { color: var(--ink); font-weight: 700; }
.rv-more { justify-self: center; width: 100%; }
.rv-hist-end { text-align: center; font-size: 12px; color: var(--muted); margin: 4px 0 0; }
.rv-hist-head { padding-right: 56px; }
