/* SwiftPick theme helpers: toggle button, site-wide widgets, and hand-written light-mode fixes.
   Loaded on every page just before the generated #sp-light block (see scripts/gen-light-theme.py). */

/* ---- Theme toggle (both themes) ---- */
.sp-theme-slot{display:inline-flex;align-items:center;flex:0 0 auto}
.sp-theme-toggle{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;padding:0;margin:0;border-radius:999px;border:1px solid rgba(59,242,143,.35);background:rgba(59,242,143,.08);color:#3bf28f;cursor:pointer;line-height:0;transition:background .2s ease,border-color .2s ease,transform .2s ease;-webkit-tap-highlight-color:transparent;box-shadow:none}
.sp-theme-toggle:hover{background:rgba(59,242,143,.16);transform:none}
.sp-theme-toggle:focus-visible{outline:2px solid #3bf28f;outline-offset:2px}
.sp-theme-toggle svg{display:block}
.sp-theme-toggle .sp-ti-moon{display:none}
html[data-theme="light"] .sp-theme-toggle{border-color:rgba(9,129,64,.35);background:#fff;color:#0a5c33;box-shadow:0 1px 3px rgba(10,40,25,.12)}
html[data-theme="light"] .sp-theme-toggle:hover{background:#e8f5ee}
html[data-theme="light"] .sp-theme-toggle:focus-visible{outline-color:#087a41}
html[data-theme="light"] .sp-theme-toggle .sp-ti-sun{display:none}
html[data-theme="light"] .sp-theme-toggle .sp-ti-moon{display:block}
.sp-header .sp-theme-slot{margin-left:auto}
.sp-legal-right,.sp-topbar-right{display:inline-flex;align-items:center;gap:14px}
.sp-theme-corner{position:fixed;top:14px;right:14px;z-index:60}

/* ---- Site footer + install banner from sp-site.js ---- */
.sp-legal-footer{max-width:1180px;margin:32px auto 0;padding:18px 16px 28px;border-top:1px solid rgba(59,242,143,.18);font:13px/1.7 Manrope,system-ui,sans-serif;color:#9fbfb0;text-align:center}
.sp-legal-footer a{color:#9fe9c1;text-decoration:none}
.sp-legal-footer nav a{margin:0 8px}
#spInstall{position:fixed;left:12px;right:12px;bottom:12px;max-width:420px;margin:0 auto;z-index:2147483000;display:flex;gap:10px;align-items:center;padding:12px 14px;border-radius:14px;background:#0d1f18;border:1px solid rgba(59,242,143,.35);box-shadow:0 12px 40px rgba(0,0,0,.4);color:#e8fff3;font:14px/1.4 Manrope,system-ui,sans-serif}
#spInstall .sp-install-text{flex:1}
#spInstall .sp-install-text span{color:#9fbfb0}
#spInstallYes{background:#3bf28f;color:#04140c;border:0;border-radius:10px;padding:8px 12px;font-weight:800;cursor:pointer}
#spInstallNo{background:none;border:0;color:#9fbfb0;font-size:20px;cursor:pointer;padding:0 4px}
html[data-theme="light"] .sp-legal-footer{border-top-color:rgba(9,129,64,.2);color:#43594e}
html[data-theme="light"] .sp-legal-footer a{color:#08703c}
html[data-theme="light"] #spInstall{background:#fff;border-color:rgba(9,129,64,.35);box-shadow:0 12px 40px rgba(10,40,25,.18);color:#10231a}
html[data-theme="light"] #spInstall .sp-install-text span,html[data-theme="light"] #spInstallNo{color:#4b5f56}
html[data-theme="light"] #spInstallYes{background:#19d879}

/* ---- Light mode base ---- */
html[data-theme="light"]{
  color-scheme:light;
  --sp-page:#f2f7f4;--sp-surface:#ffffff;--sp-on-accent:#04140c;
  --sp-text:#10231a;--sp-text-2:#4b5f56;--sp-link:#08703c;
}
/* Solid blue buttons: a touch darker so white text passes AA on light pages. */
html[data-theme="light"]:root{--primary-color-bg:#1a5fd6;--sp-blue-bg:#1a5fd6}
html[data-theme="light"]:root body{background:var(--sp-page)!important}
html[data-theme="light"]:root body::after{opacity:.35!important}
html[data-theme="light"] ::placeholder{color:#6b7f75!important;opacity:1}
html[data-theme="light"] select option{background:#fff;color:#10231a}

/* Inline style="" colours written for the dark theme (in HTML and in JS templates). */
html[data-theme="light"] [style*="color: #C0C0FF" i],html[data-theme="light"] [style*="color:#C0C0FF" i],
html[data-theme="light"] [style*="color: #A9B6CC" i],html[data-theme="light"] [style*="color:#9aa7bd" i],
html[data-theme="light"] [style*="color: #9AA7BD" i],html[data-theme="light"] [style*="color:#9fbfb0" i],
html[data-theme="light"] [style*="color:#93b3a4" i],html[data-theme="light"] [style*="color:#a8c9b9" i]{color:#4b5f56!important}
html[data-theme="light"] [style*="color: #00D9FF" i],html[data-theme="light"] [style*="color:#00D9FF" i]{color:#00697f!important}
html[data-theme="light"] [style*="color:#dfffee" i],html[data-theme="light"] [style*="color: #E0E6ED" i],
html[data-theme="light"] [style*="color:#e0e6ed" i],html[data-theme="light"] [style*="color:#eafff2" i],
html[data-theme="light"] [style*="color: #E6EDF6" i],html[data-theme="light"] [style*="color:#e6edf6" i]{color:#10231a!important}
html[data-theme="light"] [style*="color:#bfffdc" i],html[data-theme="light"] [style*="color: #3BF28F" i],
html[data-theme="light"] [style*="color:#3bf28f" i],html[data-theme="light"] [style*="color:#7dffb0" i],
html[data-theme="light"] [style*="color: #39FF14" i],html[data-theme="light"] [style*="color:#39ff14" i],
html[data-theme="light"] [style*="color: #4cb050" i],html[data-theme="light"] [style*="color:#4cb050" i]{color:#08703c!important}
html[data-theme="light"] [style*="color:#ffd970" i],html[data-theme="light"] [style*="color: #ffc107" i],
html[data-theme="light"] [style*="color:#f0b429" i],html[data-theme="light"] [style*="color:#ffcf7d" i],
html[data-theme="light"] [style*="color: #FF8C00" i]{color:#8a5a00!important}
html[data-theme="light"] [style*="color: #FF1A1A" i],html[data-theme="light"] [style*="color:#ff8b8b" i],html[data-theme="light"] [style*="color:#ff9b9b" i],
html[data-theme="light"] [style*="color: #ff6b6b" i],html[data-theme="light"] [style*="color:#ff6b6b" i]{color:#b42318!important}
html[data-theme="light"] [style*="color: #4285F4" i]{color:#1a56c4!important}
html[data-theme="light"] [style*="background:#0a0e27" i]{background:#fff!important;color:#10231a!important}
html[data-theme="light"] [style*="background: rgba(0,0,0,0.3)" i]{background:rgba(10,40,25,.07)!important}

/* In-page <header> blocks that are titles, not top bars: no frosted panel in light mode. */
html[data-theme="light"] header.header,html[data-theme="light"] header.topbar{background:transparent!important;box-shadow:none!important}

/* ui.js: toast pop-ups and the shared dialog (styles injected at runtime) */
html[data-theme="light"] .swiftpick-popup{background:#fff!important;color:#10231a!important;box-shadow:0 8px 30px rgba(10,40,25,.18)!important}
html[data-theme="light"] #swiftpick-global-modal{background:rgba(16,35,26,.45)}
html[data-theme="light"] #swiftpick-global-modal .modal-content{background:#fff!important;border-color:#0b7a9a!important;box-shadow:0 20px 60px rgba(10,40,25,.25)!important;color:#10231a}
html[data-theme="light"] #swiftpick-global-modal .modal-header{border-bottom-color:#0b7a9a}
html[data-theme="light"] #swiftpick-global-modal .modal-header h2{color:#00697f!important;text-shadow:none!important}
html[data-theme="light"] #swiftpick-global-modal #swiftpick-modal-body,html[data-theme="light"] #swiftpick-global-modal p{color:#10231a}
html[data-theme="light"] #swiftpick-global-modal .close-btn{color:#b4235a}
html[data-theme="light"] #swiftpick-global-modal .btn-secondary{background:#e3ebe7;color:#10231a}
html[data-theme="light"] #swiftpick-global-modal .btn-primary{color:#04140c}
html[data-theme="light"] [style*="rgba(8, 13, 30, 0.8)"]{background:#fff!important;border-color:rgba(10,60,35,.22)!important}
html[data-theme="light"] [style*="background: rgba(255, 255, 255, 0.04)"]{background:rgba(10,60,35,.04)!important}
/* Seller order-board stage headers */
html[data-theme="light"] [style*="background: rgba(255, 193, 7, 0.2)"]{background:#fdf3d0!important;border-left-color:#c58f00!important}
html[data-theme="light"] [style*="background: rgba(31, 111, 255, 0.2)"]{background:#e3ecfb!important}
html[data-theme="light"] [style*="background: rgba(59, 242, 143, 0.15)"]{background:#dff5e8!important}
html[data-theme="light"] [style*="background: rgba(76, 175, 80, 0.15)"]{background:#e2f1e3!important;border-left-color:#2e7d32!important}
html[data-theme="light"] [style*="border-color:rgba(255,196,0,.5)"]{border-color:#c58f00!important}
