/* ZupaBilling: light theme, custom icons, graffiti loader, store tabs, agent mark. Loaded after styles.css. */

/* ---------- light theme: same brand, re-tuned for contrast (lime is never text on cream) ---------- */
:root { --accent-text: var(--lime); }
:root[data-theme="light"] {
  --bg: #F6F3EA; --bg-2: #FBF9F3; --card: #FFFFFF; --card-2: #FFFFFF;
  --line: rgba(11,11,16,.08); --line-2: rgba(11,11,16,.15);
  --text: #0B0B10; --muted: rgba(11,11,16,.66); --faint: rgba(11,11,16,.45);
  --lilac: #5B3FD6; --accent-text: #3F5A00;
  --green: #047857; --green-bg: #ECFDF5; --green-line: #A7F3D0;
  --amber: #B45309; --amber-bg: #FFFBEB; --amber-line: #FDE68A;
  --coral: #BE123C; --coral-bg: #FFF1F2; --coral-line: #FECDD3;
}
:root[data-theme="light"] body {
  background: radial-gradient(1200px 600px at 70% -10%, rgba(91,63,214,.08), transparent 60%),
              radial-gradient(900px 500px at 10% 110%, rgba(215,255,61,.30), transparent 60%), var(--bg);
}
:root[data-theme="light"] body::after { opacity: .035; }
:root[data-theme="light"] .top { background: rgba(246,243,234,.8); }
:root[data-theme="light"] .chat { background: rgba(255,255,255,.6); }
:root[data-theme="light"] .card { box-shadow: 0 24px 60px rgba(11,11,16,.10); }
:root[data-theme="light"] .sticker { border-color: #0B0B10; }
:root[data-theme="light"] .sticker.blocked { color: #fff; }
:root[data-theme="light"] .scrim.open { background: rgba(11,11,16,.25); }
:root[data-theme="light"] .composer input:focus { border-color: #0B0B10; }
:root[data-theme="light"] .bar { background: rgba(11,11,16,.08); }
:root[data-theme="light"] .bar i { background: #0B0B10; }
:root[data-theme="light"] .source.live::before { background: #3F5A00; box-shadow: 0 0 0 4px rgba(63,90,0,.15); }
:root[data-theme="light"] .product img { border: 1px solid var(--line); }
.link, .ev a, .ev-meta.live, .stat b { color: var(--accent-text); }

.top-right { display: flex; align-items: center; gap: 14px; }
.theme-btn { border: 1px solid var(--line-2); background: var(--card); color: var(--text); width: 36px; height: 36px;
  border-radius: 12px; display: grid; place-items: center; }

/* ---------- custom icons (inline SVG, 24px grid, stroke = currentColor) ---------- */
.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; }
.engines span { display: inline-flex; align-items: center; gap: 6px; }
.ev-name { display: inline-flex; align-items: center; gap: 8px; }
.ev-name .i { color: var(--lilac); }

/* ---------- AI shopping agent mark ---------- */
.agent-avatar { width: 42px; height: 42px; border-radius: 14px; padding: 0; background: none; position: relative; }
.agent-avatar svg { width: 42px; height: 42px; display: block; }
.agent-avatar::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--lime); border: 2px solid var(--bg); }
.agent-name { display: flex; align-items: center; gap: 8px; }
.agent-tag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: rgba(184,166,255,.16);
  color: var(--lilac); letter-spacing: .02em; }

/* ---------- store tabs: brand cards, not generic pills ---------- */
.chips { gap: 10px; }
.chip { gap: 10px; padding: 6px 12px 6px 6px; border-radius: 14px; background: var(--card); border: 1px solid var(--line-2);
  color: var(--text); font-weight: 600; transition: transform .15s ease, border-color .15s ease; }
.chip:hover { transform: translateY(-1px); }
.chip .mono-av { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font: 800 13px/1 var(--display);
  background: var(--card-2); border: 1px solid var(--line-2); color: var(--muted); }
.chip .meta { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.chip .meta small { font-size: 11px; font-weight: 500; color: var(--muted); }
.chip.countersigned .mono-av { background: var(--lime); color: var(--lime-ink); border-color: transparent; }
.chip.blocked .mono-av { background: var(--coral); color: #1a0b0f; border-color: transparent; }
.chip.warn .mono-av { background: var(--amber); color: #1a1205; border-color: transparent; }
.chip.checking .mono-av { animation: breathe 1.2s ease-in-out infinite; }
.chip.active { border-color: var(--text); box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.chip .dot { display: none; }

/* ---------- graffiti loader: ZUPA sprayed on, with drips ---------- */
.graffiti { display: flex; align-items: center; gap: 16px; margin-top: 18px; }
.graffiti svg { width: 150px; height: 72px; flex: none; overflow: visible; }
.graffiti text { font-family: "Sedgwick Ave Display", "Permanent Marker", var(--display); font-size: 54px; }
.graffiti .outline { fill: none; stroke: var(--lilac); stroke-width: 2.5; stroke-dasharray: 420; stroke-dashoffset: 420;
  animation: spray 2.4s ease-in-out infinite; }
.graffiti .fill { fill: var(--lime); opacity: 0; animation: fillin 2.4s ease-in-out infinite; }
.graffiti .drip { fill: var(--lime); transform-box: fill-box; transform-origin: top; animation: drip 2.4s ease-in infinite; }
.graffiti .mist { fill: var(--lilac); opacity: 0; animation: mist 2.4s ease-out infinite; }
:root[data-theme="light"] .graffiti .fill, :root[data-theme="light"] .graffiti .drip { fill: #0B0B10; }
.graffiti-text { flex: 1; min-width: 0; }
@keyframes spray { 0% { stroke-dashoffset: 420; } 55%, 100% { stroke-dashoffset: 0; } }
@keyframes fillin { 0%, 45% { opacity: 0; } 65%, 90% { opacity: 1; } 100% { opacity: 0; } }
@keyframes drip { 0%, 55% { transform: scaleY(0); } 85% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
@keyframes mist { 0% { opacity: 0; } 20% { opacity: .5; } 60% { opacity: 0; } }

/* ---------- score meter (shows the score is graded, not just pass/fail) ---------- */
.meter { margin-top: 14px; }
.meter-track { position: relative; height: 8px; border-radius: 999px;
  background: linear-gradient(90deg, var(--coral) 0 45%, var(--amber) 45% 75%, var(--green) 75% 100%); opacity: .9; }
.meter-pin { position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%; background: var(--text);
  border: 3px solid var(--card); transform: translate(-50%, -50%); box-shadow: 0 2px 8px rgba(0,0,0,.3); transition: left .5s ease; }
.meter-legend { display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); margin-top: 6px; }

/* money-mouth moment (protection off): Apple/system colour emoji */
.money-row { display: flex; align-items: center; gap: 14px; }
.money-face { font-size: 44px; line-height: 1; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  animation: wobble 1.4s ease-in-out 2; }
@keyframes wobble { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-10deg) scale(1.08); } 75% { transform: rotate(8deg); } }

/* ---------- reasons with expandable proof, sources row, investigation steps ---------- */
.reasons { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.reason { border: 1px solid var(--line); border-radius: 12px; padding: 0; background: rgba(127,127,127,.04); }
.reason summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; font-size: 15px; }
.reason summary::-webkit-details-marker { display: none; }
.reason summary::after { content: "›"; margin-left: auto; color: var(--faint); transition: transform .15s; }
.reason[open] summary::after { transform: rotate(90deg); }
.reason .rh { flex: 1; }
.src-mini { display: inline-flex; gap: 4px; color: var(--lilac); }
.src-mini .i { width: 14px; height: 14px; }
.proof { padding: 0 12px 12px 44px; display: flex; flex-direction: column; gap: 10px; }
.proof-row { display: grid; grid-template-columns: 18px 1fr; gap: 8px; font-size: 13px; color: var(--muted); }
.proof-row b { color: var(--text); font-weight: 600; }
.proof-row .i { color: var(--lilac); margin-top: 2px; }
.proof-row a { color: var(--accent-text); text-decoration: none; font-size: 12px; }
.sources { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; }
.src-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 4px 9px; border-radius: 999px;
  border: 1px solid var(--line-2); color: var(--muted); }
.src-pill .i { width: 13px; height: 13px; color: var(--lilac); }
.src-pill.stop { border-color: rgba(52,211,153,.35); color: var(--green); }
.step-now { margin-top: 8px; font-size: 13px; color: var(--muted); }
.step-now b { color: var(--text); }
.timeline { margin: 0 0 4px; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.timeline li span { display: block; color: var(--muted); font-size: 13px; }
