/* ---------- components/customer-statement/customer-statement.css ---------- */
/* ===== public view =====
   The read-only statement a customer sees from the WhatsApp link. When the page is public the ledger itself is hidden. */
body.pub>*:not(#pub){display:none!important}
#pub{max-width:560px;width:100%;margin:0 auto;padding:20px 14px 40px}
#pub .phd{display:flex;align-items:center;justify-content:space-between;gap:14px;background:var(--card);border:1px solid var(--line);border-radius:16px;padding:16px 18px;margin-bottom:14px}   /* account name on the left; balance and its small graph on the right */
#pub .phd .pn{min-width:0}
#pub .phd .pbal{flex:none;text-align:right}
#pub .phd small{display:block;color:var(--mute);font-size:12px;text-transform:uppercase;letter-spacing:.06em}
#pub .phd h1{margin:2px 0 0;font-size:22px;overflow-wrap:anywhere}
#pub .pb{font-size:26px;line-height:1.15;font-weight:700;font-variant-numeric:tabular-nums}
#pub .pg{display:block;width:110px;height:30px;margin:6px 0 0 auto}   /* the balance trend line; takes the balance's green or red */
#pub .pos{color:var(--accent)}#pub .neg{color:var(--err)}
#pub .plist{background:var(--card);border:1px solid var(--line);border-radius:16px;overflow:hidden}
#pub .pr{display:flex;align-items:center;gap:12px;padding:8px 14px}
#pub .pr+.pr{border-top:1px solid var(--line)}
#pub .pm{flex:1;min-width:0}
/* date tile at the left of each entry (same look as the ledger's rows): green = money in, red = money out, text white */
#pub .dtile{width:40px;height:40px;flex:none;border-radius:10px;display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1.1;color:#fff;font-variant-numeric:tabular-nums}
#pub .dtile b{font-size:15px;font-weight:700}#pub .dtile small{font-size:11px;font-weight:500}
#pub .dtile.up{background:#1f7a58}#pub .dtile.dn{background:#c0392b}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) #pub .dtile.up{background:#1f6b4c}:root:not([data-theme="light"]) #pub .dtile.dn{background:#a33a2e}}
:root[data-theme="dark"] #pub .dtile.up{background:#1f6b4c}:root[data-theme="dark"] #pub .dtile.dn{background:#a33a2e}
#pub .pt{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#pub .pv{text-align:right;font-variant-numeric:tabular-nums}
#pub .pv b{display:block;font-size:15px}
#pub .pv small{display:block;font-size:11px;font-weight:600;color:var(--text)}
#pub .pmsg{padding:28px 14px;text-align:center;color:var(--mute)}
#pub .pfoot{margin-top:12px;text-align:center;font-size:12px;color:var(--mute)}
/* top bar: logo + name + version on the left, Read only badge on the right */
#pub .pbar{justify-content:flex-start;gap:12px;margin:0 0 16px;padding:0 2px 14px;border-top:0;border-bottom:1px solid var(--line)}
#pub .pbar .ft-t{flex:1}
#pub .pbar b{font-size:14px}
#pub .ptg{flex:none;width:32px;height:32px;padding:0;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--card);color:var(--text);border:1px solid var(--line);cursor:pointer}
#pub .ptg:hover{border-color:var(--mute)}
#pub .pro{display:inline-flex;align-items:center;gap:6px;flex:none;font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--accent);background:color-mix(in srgb,var(--accent) 12%,transparent);border-radius:99px;padding:5px 11px}
#pub .psr{margin:0}
/* frozen top: logo bar, balance card and search stay in place; only the entries scroll under them */
#pub .pfix{position:sticky;top:env(safe-area-inset-top,0px);z-index:5;background:var(--bg);margin:-20px -14px 12px;padding:20px 14px 10px}
#pub .psr input{display:block;width:100%;border:1px solid var(--line);background:var(--card);color:var(--text);border-radius:99px;padding:10px 16px;font:inherit;font-size:15px;min-width:0}
#pub .psr input:focus{outline:0;border-color:var(--accent)}
#pub .pc{font-size:12px;color:var(--mute);margin:6px 8px 0}
#pub .pc:empty{display:none}
#pub .pup{margin-top:4px;text-align:center;font-size:12px;color:var(--mute);font-variant-numeric:tabular-nums}
/* ---- balance trend: the glow (movement is in customer-statement.js, sparkFX). The glow sits on the whole small graph so it also shows on iPhones ---- */
#pub .pg.fx{filter:drop-shadow(0 0 calc(2px*var(--gk,1)) currentColor) drop-shadow(0 0 calc(6px*var(--gk,1)) currentColor)}
#pub .pg.fxb{animation:pgb 1.4s ease-in-out infinite alternate}   /* settled: the glow slowly fades in and out */
@keyframes pgb{from{filter:drop-shadow(0 0 0 currentColor) drop-shadow(0 0 1px currentColor)}to{filter:drop-shadow(0 0 3px currentColor) drop-shadow(0 0 9px currentColor)}}
@media (prefers-reduced-motion:reduce){#pub .pg.fxb{animation:none;filter:drop-shadow(0 0 2px currentColor) drop-shadow(0 0 6px currentColor)}}
/* a draft (no amount yet): yellow date tile, dark text, same yellow as the ledger's starred tile */
#pub .dtile.dr{background:#FFC83D;color:#4A3200}
