/* ============================================================
   bts-theme.css  -  Break To Survive brand theme for CardVault
   deploy-v:20261031-1
   Load AFTER app-bundle.css. Overrides colour/type tokens plus the
   rules that hardcode the old F1 red, so a rebuild of
   app-bundle.css cannot wipe the theme.
   Palette verbatim from breaktosurvive.com/includes/bts-brand-colors.css
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;600;700;800;900&family=Orbitron:wght@400;700;900&display=swap');

/* ---------- 1. Brand tokens ---------- */
:root {
  --gold: #d4a84b;
  --gold-dark: #a8782a;
  --gold-light: #e8c98e;
  --gold-deep: #b08a3a;
  --cream: #f0e8d8;

  --accent: #d4a84b;
  --accent-hover: #e8c98e;
  --accent-glow: rgba(212, 168, 75, 0.25);
  --accent-subtle: rgba(212, 168, 75, 0.08);

  --bg: #000000;
  --bg-elevated: #0a0a0a;
  --bg-card: #111111;
  --bg-input: #1a1a1a;
  --bg-hover: #1f1f1f;
  --border: #282828;
  --border-subtle: #1b1b1b;

  --text: #f2efe9;
  --text-secondary: #a8a39a;
  --text-muted: #7a756c;

  --font-display: 'Barlow Condensed', 'Outfit', -apple-system, sans-serif;
  --font-brand: 'Orbitron', 'Barlow Condensed', sans-serif;

  /* To match the main site body font exactly, uncomment:
     --font: 'Barlow', 'Outfit', -apple-system, sans-serif; */
}

/* Light theme: bright gold fails contrast on white */
[data-theme="light"] {
  --accent: #a8782a;
  --accent-hover: #8c6322;
  --accent-glow: rgba(168, 120, 42, 0.22);
  --accent-subtle: rgba(212, 168, 75, 0.12);
  --bg: #faf8f4;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-input: #f3f0ea;
  --bg-hover: #ece7dd;
  --border: #ddd6c8;
  --border-subtle: #e8e2d6;
  --text: #15130f;
  --text-secondary: #55504a;
  --text-muted: #86807a;
}

/* ---------- 2. Brand lockup and display type ---------- */
h1, h2, h3,
.page-title, .section-title, .card-title {
  font-family: var(--font-display);
  letter-spacing: 0.01em;
}

.sidebar-brand, .brand, .logo-text,
#chat-sidebar-brand .chat-brand-name {
  font-family: var(--font-brand);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand span, .logo-text span,
.sidebar-brand span { color: var(--gold); }

/* ---------- 3. Rules that hardcoded rgb(225,6,0) ---------- */
body {
  background-image: radial-gradient(ellipse at 50% 0%, rgba(212, 168, 75, 0.045) 0%, transparent 60%);
}

::selection { background: rgba(212, 168, 75, 0.3); color: inherit; }

.badge.numbered { background: rgba(212, 168, 75, 0.92); color: #140f04; }

.toast.error { background: #2a1405; border: 1px solid var(--gold-dark); color: #ffb4a8; }

.mobile-bottom-nav button.mobile-nav-scan {
  color: #140f04;
  box-shadow: 0 4px 16px rgba(212, 168, 75, 0.4);
}

.filter-pill:focus,
.filter-bar select:focus { box-shadow: 0 0 0 3px rgba(212, 168, 75, 0.18); }

.notif-item.unread { background: rgba(212, 168, 75, 0.06); }

#dashboard-quick-actions > :nth-child(2):hover,
#dashboard-quick-actions > :nth-child(3):hover,
#dashboard-quick-actions > :nth-child(4):hover {
  border-color: var(--accent) !important;
  background: rgba(212, 168, 75, 0.08) !important;
}

#grow-collection-prompt {
  background: linear-gradient(135deg, rgba(212, 168, 75, 0.08) 0%, rgba(168, 120, 42, 0.05) 100%);
  border: 1px solid rgba(212, 168, 75, 0.2);
}

/* Gold is light: primary buttons need dark ink */
#grow-collection-prompt .grow-btn-primary,
.cv-section-empty-state .empty-cta,
.cv-empty-page .cv-btn-primary,
#cv-card-lightbox .lightbox-actions .lb-primary,
.celeb-actions .celeb-save,
.dup-actions .dup-add-copy,
.sri-save-btn,
.btn-primary, .cv-btn-primary {
  background: var(--gold);
  color: #140f04;
  border-color: var(--gold);
  font-weight: 700;
}

#grow-collection-prompt .grow-btn-primary:hover,
.cv-empty-page .cv-btn-primary:hover,
#cv-card-lightbox .lightbox-actions .lb-primary:hover,
.btn-primary:hover, .cv-btn-primary:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  color: #140f04;
}

#chat-sidebar-brand { background: linear-gradient(135deg, rgba(212, 168, 75, 0.1) 0%, transparent 70%); }

.chat-brand-icon {
  background: linear-gradient(135deg, #d4a84b, #a8782a);
  color: #140f04;
  box-shadow: 0 4px 12px rgba(212, 168, 75, 0.35);
}

.chat-ch-btn.active {
  background: linear-gradient(135deg, rgba(212, 168, 75, 0.14), rgba(212, 168, 75, 0.07));
  box-shadow: inset 0 0 0 1px rgba(212, 168, 75, 0.18);
}

#chat-messages {
  background:
    radial-gradient(ellipse at 15% 0%, rgba(212, 168, 75, 0.02) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 100%, rgba(59, 130, 246, 0.015) 0%, transparent 50%);
}

#chat-input-wrap:focus-within {
  border-color: rgba(212, 168, 75, 0.35);
  box-shadow: 0 0 0 3px rgba(212, 168, 75, 0.08), 0 4px 16px rgba(0, 0, 0, 0.3);
}

.chat-send-btn:hover { box-shadow: 0 2px 10px rgba(212, 168, 75, 0.35); }

#page-scan [style*="border:2px dashed"]:hover,
#page-scan [style*="border: 2px dashed"]:hover,
#page-scan .upload-zone:hover {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 4px rgba(212, 168, 75, 0.12), inset 0 0 20px rgba(212, 168, 75, 0.04) !important;
  background: rgba(212, 168, 75, 0.03) !important;
}

.scan-workspace::before {
  background:
    radial-gradient(ellipse 55% 45% at 50% 38%, rgba(212, 168, 75, 0.06) 0%, transparent 65%),
    repeating-linear-gradient(0deg, transparent, transparent 47px, rgba(255, 255, 255, .016) 47px, rgba(255, 255, 255, .016) 48px),
    repeating-linear-gradient(90deg, transparent, transparent 47px, rgba(255, 255, 255, .016) 47px, rgba(255, 255, 255, .016) 48px);
}

.scan-card-slot:hover {
  border-color: rgba(212, 168, 75, 0.4);
  box-shadow: 0 0 0 1px rgba(212, 168, 75, 0.1), 0 16px 40px rgba(0, 0, 0, .35);
}

.scan-card-slot:hover .scan-slot-corner { border-color: rgba(212, 168, 75, 0.5); }
.scan-extras-zone:hover { border-color: rgba(212, 168, 75, 0.34); }

.scan-hint-field select:focus,
.scan-hint-field input:focus { border-color: rgba(212, 168, 75, 0.5); }

.sri-hero { background: linear-gradient(135deg, rgba(212, 168, 75, 0.08) 0%, transparent 60%); }
.sri-save-btn { box-shadow: 0 4px 16px rgba(212, 168, 75, 0.3); }
.sri-save-btn:hover { box-shadow: 0 6px 24px rgba(212, 168, 75, 0.42); }
.sri-thumb-active { box-shadow: 0 0 0 2px rgba(212, 168, 75, 0.35); }

.scan-photo-btns::after { background: linear-gradient(90deg, transparent, rgba(212, 168, 75, .6), transparent); }
.scan-photo-btn:hover { background: rgba(212, 168, 75, .18); }
.scan-photo-btn:active { background: rgba(212, 168, 75, .3); }

.scan-beam-line {
  background: linear-gradient(90deg, transparent, rgba(212, 168, 75, .5) 30%, var(--accent) 50%, rgba(212, 168, 75, .5) 70%, transparent);
}
.scan-beam-glow { background: linear-gradient(to bottom, rgba(212, 168, 75, .09), transparent); }
.scan-lstep.active { background: rgba(212, 168, 75, .07); }

.sc-creact-btn:hover { border-color: rgba(212, 168, 75, .4); background: rgba(212, 168, 75, .08); }
.sc-creact-btn.active { border-color: rgba(212, 168, 75, .45); background: rgba(212, 168, 75, .12); }

.support-nav-btn.active {
  background: rgba(212, 168, 75, .1) !important;
  border-color: rgba(212, 168, 75, .25) !important;
  color: var(--accent) !important;
  box-shadow: 0 2px 8px rgba(212, 168, 75, .1);
}
.faq-item:hover { border-color: rgba(212, 168, 75, .25) !important; }
.faq-item.open { border-color: rgba(212, 168, 75, .2) !important; }

#page-support input:focus,
#page-support select:focus,
#page-support textarea:focus { box-shadow: 0 0 0 3px rgba(212, 168, 75, .08); }

.st-tile.st-progress { border-color: rgba(212, 168, 75, .25); }
.queue-status.scanning { background: rgba(212, 168, 75, 0.85); color: #140f04; }
.cv-wishlist-btn:hover { background: rgba(212, 168, 75, 0.85); color: #140f04; }
.admin-dd-item.active { background: rgba(212, 168, 75, .14); }
#collection-pagination button:not([disabled]):hover { box-shadow: 0 4px 16px rgba(212, 168, 75, .25); }
#cv-card-lightbox .lightbox-actions button:hover {
  border-color: var(--accent);
  background: rgba(212, 168, 75, 0.08);
}
#cv-loading-bar {
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light), var(--gold), var(--gold-dark));
}

button:focus-visible, a:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent) !important;
}

/* down-trend reused the accent; gold would read as positive */
.cv-price-alert .alert-change.down,
.cv-engagement-card .eng-trend.down { color: #ff5247; }

/* ---------- 4. login.php ---------- */
body.login-page, .login-page body, body:has(.login-card) {
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(212, 168, 75, 0.07) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(212, 168, 75, 0.05) 0%, transparent 50%);
}

.error-msg {
  background: rgba(212, 168, 75, 0.1);
  border: 1px solid rgba(212, 168, 75, 0.3);
  color: var(--gold-light);
}

.tab.active { background: var(--gold); color: #140f04; font-weight: 700; }

/* ---------- 5. Inline style="" leftovers ---------- */
#pro-upsell-banner[style] { border-color: var(--gold) !important; }

[style*="drop-shadow(0 0 12px rgba(225,6,0"] {
  filter: drop-shadow(0 0 12px rgba(212, 168, 75, .3)) !important;
}

#card-of-day [style*="#e10600 50%"] {
  background: linear-gradient(90deg, #f59e0b 0%, #d4a84b 50%, #8b5cf6 100%) !important;
}

[style*="linear-gradient(135deg,#f59e0b,#e10600)"] {
  background: linear-gradient(135deg, #f59e0b, #d4a84b) !important;
}

#whats-new-badge { background: var(--gold) !important; color: #140f04 !important; }
#whats-new-body span[style*="color:#e10600"] { color: var(--gold) !important; }

#page-support [style*="rgba(225,6,0,.06)"] {
  background: linear-gradient(135deg, rgba(212, 168, 75, .07) 0%, rgba(59, 130, 246, .04) 50%, rgba(139, 92, 246, .06) 100%) !important;
}
#page-support [style*="rgba(225,6,0,.04)"] { background: rgba(212, 168, 75, .05) !important; }
#page-support [style*="rgba(225,6,0,.1)"] {
  background: rgba(212, 168, 75, .12) !important;
  border-color: rgba(212, 168, 75, .12) !important;
}

#condition-guide-modal [style*="rgba(225,6,0,0.06)"] {
  background: rgba(212, 168, 75, 0.07) !important;
  border-color: rgba(212, 168, 75, 0.18) !important;
}

/* PRO badges were amber-to-red inline gradients */
.nav-tag.pro-tag,
span[style*="linear-gradient(135deg,#f59e0b,#ef4444)"] {
  background: linear-gradient(135deg, #e8c98e, #a8782a) !important;
  color: #140f04 !important;
}

/* PWA install prompt button (inline red in the bundle) */
#cv-pwa-install-btn { background: var(--gold) !important; color: #140f04 !important; }
