/*
 * bx-theme-v2-no2 — White & Red gradient theme
 * Clean white base with red gradient accents (inspired by index page)
 */

/* ── CSS VARIABLES ── */

:root {
  /* Core backgrounds — white / light pink */
  --theme-bg-deep:     #cfdbf8;                        /* deepest light bg */
  --theme-bg-main:     #f5f7fa;                        /* main page bg */
  --theme-bg-card:     rgba(255, 255, 255, 0.97);      /* glass card — white */
  --theme-bg-elevated: rgba(255, 248, 249, 0.96);      /* elevated surface */
  --theme-bg-input:    rgba(255, 255, 255, 0.92);      /* input field */

  /* Primary accent — Red */
  /* Default; overridden per-site from DB via partials/_theme-vars.ejs */
  --theme-gold:        #c41230;
  --theme-gold-bright: #e82340;               /* bright red */
  --theme-gold-shine:  #f8cfd6;               /* pale pink / rose */
  --theme-gold-dim:    rgba(196, 18, 48, 0.10);
  --theme-gold-border: rgba(196, 18, 48, 0.38);
  --theme-gold-glow:   rgba(196, 18, 48, 0.22);

  /* Secondary accent — Deep crimson */
  --theme-cyan:        #8b0000;               /* deep crimson */
  --theme-cyan-rgb:    139, 0, 0;             /* secondary rgb (for rgba() tints) */
  --theme-cyan-bright: #b00020;               /* bright crimson */
  --theme-cyan-dim:    rgba(139, 0, 0, 0.07);
  --theme-cyan-border: rgba(139, 0, 0, 0.22);
  --theme-cyan-glow:   rgba(139, 0, 0, 0.18);

  /* Neutral surface tone */
  --theme-blue:        #fce4e8;               /* light pink surface */
  --theme-blue-hover:  #f9c0c8;               /* hover pink */
  --theme-blue-subtle: rgba(196, 18, 48, 0.10); /* faint red fill (alerts / pill-rate bg) */

  /* Brand glossy buttons (betup168 style) — dashboard qcard / cat-tab / lotto pill */
  --theme-navy-rgb:          196, 18, 48;             /* accent shadow tint (= --theme-gold #c41230) */
  --theme-btn-blue-top:      #e0576b;                 /* button gradient — top */
  --theme-btn-blue-bot:      #b01a35;                 /* button gradient — bottom */
  --theme-btn-blue-top-h:    #e86a7d;                 /* hover — top */
  --theme-btn-blue-bot-h:    #c22240;                 /* hover — bottom */
  --theme-btn-blue-border:   rgba(242, 160, 172, 0.55);
  --theme-btn-blue-grad:       linear-gradient(180deg, var(--theme-btn-blue-top) 0%,   var(--theme-btn-blue-bot) 100%);
  --theme-btn-blue-grad-hover: linear-gradient(180deg, var(--theme-btn-blue-top-h) 0%, var(--theme-btn-blue-bot-h) 100%);
  --theme-pill-blue-top:     #ec5a70;                 /* lotto pill gradient — top */
  --theme-pill-blue-bot:     #d02f4f;                 /* lotto pill gradient — bottom */
  --theme-pill-blue-rgb:     208, 47, 79;             /* lotto pill shadow tint */

  /* Cream active-tab accent — dashboard cat-tab.on */
  --theme-tab-cream-top:     #fbf5e4;
  --theme-tab-cream-bot:     #efe2c1;
  --theme-tab-cream-border:  #d8c384;
  --theme-tab-cream-rgb:     216, 195, 132;            /* cream shadow tint */
  --theme-tab-cream-grad:    linear-gradient(180deg, var(--theme-tab-cream-top) 0%, var(--theme-tab-cream-bot) 100%);

  /* Status — semantic tokens (danger / success / warning) */
  --theme-red:         #ef4444;                /* danger */
  --theme-red-rgb:     239, 68, 68;
  --theme-red-subtle:  rgba(239, 68, 68, 0.10);
  --theme-green:       #16a34a;                /* success */
  --theme-green-rgb:   22, 163, 74;
  --theme-green-subtle: rgba(22, 163, 74, 0.10);
  --theme-amber:       #d4920c;                /* warning / highlight */
  --theme-amber-rgb:   212, 146, 12;
  --theme-amber-subtle: rgba(212, 146, 12, 0.12);

  /* Text — dark on light */
  --theme-text-primary:   #2d2d3a;
  --theme-text-secondary: #6b6b7d;
  --theme-text-muted:     rgba(45, 45, 58, 0.38);
  --theme-text-white:     #ffffff;            /* text on colored buttons */

  /* Borders */
  --theme-border-subtle: rgba(0, 0, 0, 0.07);
  --theme-border-mid:    rgba(0, 0, 0, 0.13);

  /* UI tokens */
  --theme-radius:     14px;
  --theme-radius-sm:  8px;
  --theme-radius-lg:  20px;
  --theme-transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --theme-font:       'Kanit', 'Sarabun', sans-serif;

  /* ── EXTENDED SEMANTIC PALETTE ──
     Shared status / accent colours used across member pages (statement, bank,
     affiliate, account-edit, lottery-result, yeekee-buy, promotion, index, …)
     and the government/stock board. Fixed-value tokens: pages reference them via
     var() so every shade is editable here in one place. */
  /* Danger — deeper reds than semantic --theme-red */
  --theme-danger:          #dc2626;
  --theme-danger-rgb:      220, 38, 38;
  --theme-danger-soft:     #ff6b6b;
  --theme-danger-soft-rgb: 255, 107, 107;
  --theme-danger-mid:      #e05252;
  --theme-danger-mid-rgb:  224, 82, 82;
  --theme-danger-light:    #f87171;
  --theme-danger-blood:    #bb0404;                      /* gov/stock deep red */
  --theme-danger-blood-rgb: 187, 4, 4;
  /* Info / link — red palette (legacy token names retained for compatibility) */
  --theme-info:            #c41230;
  --theme-info-rgb:        196, 18, 48;
  --theme-info-bright:     #e82340;
  --theme-info-bright-rgb: 232, 35, 64;
  --theme-info-gov:        #b01a35;                      /* gov/stock link red */
  --theme-sky:             #d92b47;                      /* deposit accent */
  --theme-navy-link:       #9f1239;                      /* deep red link */
  --theme-navy-blue:       #660f1f;                      /* gov/stock deep red */
  --theme-navy-blue2:      #8f1730;
  --theme-navy-blue-deep:  #7a1026;                      /* gov/stock */
  --theme-navy-blue-deep-rgb: 122, 16, 38;
  --theme-navy-indigo:     #560d1c;
  --theme-navy-indigo-rgb: 86, 13, 28;
  --theme-slate-900:       #2b1017;
  --theme-slate-900-rgb:   43, 16, 23;
  /* Amber / metallic gold — decorative (medals / VIP / rate pills) */
  --theme-amber-gold:      #b8860b;                      /* goldenrod */
  --theme-amber-gold-rgb:  184, 134, 11;
  --theme-amber-bright:    #f5c842;                      /* bright gold */
  --theme-amber-bright-rgb: 245, 200, 66;
  --theme-amber-warm:      #d4a017;                      /* dashboard gold */
  --theme-amber-warm-rgb:  212, 160, 23;
  --theme-amber-metallic:  #d4af37;
  --theme-amber-metallic-rgb: 212, 175, 55;
  --theme-amber-text:      #8b6914;                      /* dark gold text */
  --theme-amber-olive:     #856404;
  --theme-amber-ca:        #ca8a04;
  --theme-amber-yellow:    #ffc107;
  --theme-amber-518:       #f5c518;
  --theme-amber-518-rgb:   245, 197, 24;
  --theme-amber-pure:      #f5c800;
  --theme-amber-pure-rgb:  245, 200, 0;
  --theme-amber-tw:        #eab308;
  --theme-amber-tw-rgb:    234, 179, 8;
  --theme-amber-bronze:    #c9922b;
  --theme-amber-bronze-rgb: 201, 146, 43;
  --theme-amber-pale:      #fef3cd;                      /* pale amber bg */
  /* Success — extra green shades beyond --theme-green */
  --theme-success-bright:  #22c55e;
  --theme-success-bright-rgb: 34, 197, 94;
  --theme-success-deep:    #15803d;
  --theme-success-emerald: #2ecc71;
  --theme-success-forest:  #155724;
  --theme-success-pale:    #ccf6c7;                      /* pale green bg */
  /* Dark navy surfaces — government/stock board + member dark-mode blocks */
  --theme-navy-900:        #0f1923;
  --theme-navy-850:        #1a2735;
  --theme-navy-800:        #1e2d3d;
  --theme-navy-750:        #243447;
  --theme-navy-950:        #04263a;
  --theme-ink-950:         #1a1a2e;                      /* strong dark text */
  --theme-ink-brown:       #1a1714;                      /* gov/stock warm-dark */

}

html {
  scroll-behavior: auto;
  font-family: 'Kanit', sans-serif;
}

/* ── BODY ── */
body {
  background: linear-gradient(160deg, #fff0f2 0%, #faf5f6 50%, #ffffff 100%);
  background-attachment: fixed;
  color: var(--theme-text-primary);
  font-family: var(--theme-font);
}

/* ── AMBIENT GLOW OVERLAY ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%,   rgba(196, 18, 48, 0.07) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 80%,   rgba(196, 18, 48, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 10% 100%,  rgba(139, 0, 0, 0.03) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ── GLOBAL CARD STYLE ── */
.theme-card {
  background: var(--theme-bg-card);
  border: 1px solid var(--theme-border-subtle);
  border-radius: var(--theme-radius);
  backdrop-filter: blur(20px) saturate(110%);
  -webkit-backdrop-filter: blur(20px) saturate(110%);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.07);
  transition: var(--theme-transition);
}
.theme-card:hover {
  border-color: var(--theme-gold-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 0 24px var(--theme-gold-glow);
}

/* ── RED DIVIDER ── */
.theme-divider-gold {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--theme-gold-border) 30%, var(--theme-gold-bright) 50%, var(--theme-gold-border) 70%, transparent 100%);
  border: none;
  margin: 0;
}

/* ── BUTTONS ── */
.theme-btn-gold {
  background: linear-gradient(135deg, #a01028 0%, #e82340 50%, #a01028 100%);
  color: #ffffff;
  border: none;
  padding: 8px 22px;
  border-radius: 50px;
  font-family: var(--theme-font);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: var(--theme-transition);
  box-shadow: 0 4px 18px var(--theme-gold-glow), 0 1px 0 rgba(255, 255, 255, 0.15) inset;
  letter-spacing: 0.03em;
}
.theme-btn-gold:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 28px var(--theme-gold-glow), 0 0 16px var(--theme-gold-glow);
}

.theme-btn-cyan {
  background: linear-gradient(135deg, #6b0000, #a01028);
  color: #ffffff;
  border: none;
  padding: 8px 22px;
  border-radius: 50px;
  font-family: var(--theme-font);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--theme-transition);
  box-shadow: 0 4px 18px var(--theme-cyan-glow);
}
.theme-btn-cyan:hover {
  box-shadow: 0 6px 26px var(--theme-cyan-glow);
  filter: brightness(1.08);
}

.theme-btn-outline {
  background: rgba(0, 0, 0, 0.04);
  color: var(--theme-text-secondary);
  border: 1px solid var(--theme-border-mid);
  padding: 7px 18px;
  border-radius: 50px;
  font-family: var(--theme-font);
  font-size: 0.80rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--theme-transition);
}
.theme-btn-outline:hover {
  border-color: var(--theme-gold-border);
  color: var(--theme-gold);
  background: rgba(196, 18, 48, 0.08);
}

/* ── BADGE ── */
.theme-badge-hot {
  background: #ef4444;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}
.theme-badge-new {
  background: linear-gradient(135deg, #c41230, #e82340);
  color: #ffffff;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}
.theme-badge-live {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
  color: var(--theme-gold);
  font-size: 0.62rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 50px;
  border: 1px solid var(--theme-gold-border);
  letter-spacing: 0.05em;
}

/* ── SPINNER ── */
.theme-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(196, 18, 48, 0.15);
  border-top-color: var(--theme-gold-bright);
  border-radius: 50%;
  animation: theme-spin 0.85s linear infinite;
  flex-shrink: 0;
}
@keyframes theme-spin { to { transform: rotate(360deg); } }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.04); }
::-webkit-scrollbar-thumb { background: rgba(196, 18, 48, 0.30); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--theme-gold-bright); }

/* ── UTILITY ── */
.text-gold     { color: var(--theme-gold); }
.text-cyan     { color: var(--theme-cyan); }
.text-dim      { color: var(--theme-text-secondary); }
.text-muted    { color: var(--theme-text-muted); }
.bg-card       { background: var(--theme-bg-card); }
.border-gold   { border-color: var(--theme-gold-border) !important; }
.border-subtle { border-color: var(--theme-border-subtle) !important; }
.glow-gold     { box-shadow: 0 0 18px var(--theme-gold-glow); }
.glow-cyan     { box-shadow: 0 0 16px var(--theme-cyan-glow); }

/* ── TEXT ELEMENT DEFAULTS — dark text on light theme ── */
p   { color: var(--theme-text-secondary); }
li  { color: var(--theme-text-secondary); }
h1, h2, h3, h4, h5, h6 { color: var(--theme-text-primary); }
/* a:not(.btn):not([class*="text-"]):not([class*="nav-"]):not([class*="cn-"]):not([class*="sp-"]) {
  color: var(--theme-gold);
} */
a:not(.btn):not([class*="text-"]):not([class*="nav-"]):not([class*="cn-"]):not([class*="sp-"]):hover {
  /* color: var(--theme-gold-bright); */
  text-decoration: none;
}
