/*
 * bx-theme-white-yellow — Pearl & Gold (demotheme4)
 * Icy-white glassmorphism with 22-karat gold accents
 */

/* ── CSS VARIABLES ── */
:root {
  --theme-navy: var(--seed-accent);   /* R-D1: read in promotion.ejs, declared nowhere. As theme6 declares it. */

  /* read but never declared — R-D1 */
  --main-color:          var(--seed-accent);
  --red-dim:             color-mix(in srgb, var(--seed-danger) 18%, transparent);
  --input-invalid-color: var(--seed-danger);
  --universal-margin:    8px;

  /* Alias tokens ported from theme6. Each was READ here and declared nowhere. */
  --theme-amber:       var(--state-warning);
  --theme-green:       var(--state-success);
  --theme-green-subtle: var(--state-success-tint);
  --theme-info:        var(--state-info);

  /* Core backgrounds — pearl white. Repointed onto the elevation ladder
     (mirrors theme6): elev-0 IS --seed-canvas, so bg-main is exact. */
  --theme-bg-deep:     var(--elev-1);        /* section rung */
  --theme-bg-main:     var(--elev-0);        /* page rung — exact former #ffeeac */
  --theme-bg-card:     var(--elev-2);        /* card 6 */
  --theme-bg-elevated: var(--elev-4);        /* elevated 11 */
  --theme-bg-input:    var(--elev-input);    /* input 4.5 */

  /* Primary accent — 22-karat Gold. --seed-accent IS the former #c29b52. */
  --theme-gold:        var(--seed-accent);
  --theme-gold-bright: color-mix(in srgb, var(--seed-accent) 82%, white);
  --theme-gold-shine:  color-mix(in srgb, var(--seed-canvas) 84%, var(--seed-accent) 16%);
  --theme-gold-dim:    color-mix(in srgb, var(--seed-accent) 18%, transparent);
  --theme-gold-border: color-mix(in srgb, var(--seed-accent) 40%, transparent);
  --theme-gold-glow:   color-mix(in srgb, var(--seed-accent) 30%, transparent);

  /* Secondary accent — Deep Gold */
  --theme-cyan:        color-mix(in srgb, var(--seed-accent) 62%, black);
  --theme-cyan-bright: color-mix(in srgb, var(--seed-accent) 86%, black);
  --theme-cyan-dim:    color-mix(in srgb, var(--seed-accent) 14%, transparent);
  --theme-cyan-border: color-mix(in srgb, var(--seed-accent) 20%, transparent);
  --theme-cyan-glow:   color-mix(in srgb, var(--seed-accent) 22%, transparent);

  /* Neutral surface tone */
  --theme-blue:        color-mix(in srgb, var(--seed-canvas) 90%, var(--seed-accent) 10%);
  --theme-blue-hover:  color-mix(in srgb, var(--seed-canvas) 78%, var(--seed-accent) 22%);
  --theme-blue-subtle: color-mix(in srgb, var(--seed-accent) 10%, transparent);

  /* Status — --seed-danger IS the former #DC2626. */
  --theme-red:         var(--state-danger);
  --theme-red-subtle:  var(--state-danger-tint);
  --theme-red-tint:    color-mix(in srgb, var(--seed-danger) 32%, transparent);
  --theme-green-tint:  color-mix(in srgb, var(--seed-success) 32%, transparent);
  --theme-amber-tint:  color-mix(in srgb, var(--state-warning) 32%, transparent);
  --theme-amber-subtle: var(--state-warning-tint);
  --theme-info-subtle: var(--state-info-tint);

  /* Text — dark on light. --ink-hi IS the former #1A1714. */
  --theme-text-primary:   var(--ink-hi);
  --theme-text-secondary: var(--ink-mid);
  --theme-text-muted:     var(--ink-faint);
  --theme-text-white:     color-mix(in srgb, var(--seed-fg) 82%, var(--seed-accent));  /* dark ink on gold buttons */

  /* Borders — kept accent-tinted, as shipped */
  --theme-border-subtle: color-mix(in srgb, var(--seed-accent) 20%, transparent);
  --theme-border-mid:    color-mix(in srgb, var(--seed-accent) 40%, transparent);

  /* 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', sans-serif;
}

html {
  scroll-behavior: auto;
}

/* ── BODY ── */
body {
  background: linear-gradient(145deg, #FAFBFF 0%, #FFF5DC 55%, #FAFBFF 100%);
  background-attachment: fixed;
  color: var(--theme-text-primary);
  font-family: var(--theme-font);
}

/* ── AMBIENT GOLD GLOW OVERLAY ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%,   rgba(240,197,102,0.14) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 50% 100%,  rgba(201,146,43,0.10) 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(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  transition: var(--theme-transition);
}
.theme-card:hover {
  border-color: var(--theme-gold-border);
  box-shadow: 0 8px 40px color-mix(in srgb, var(--seed-ink) 10%, transparent), 0 0 32px var(--theme-gold-glow);
}

/* ── GOLD 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, color-mix(in srgb, var(--seed-accent) 62%, var(--seed-canvas)) 0%, #F0C566 50%, #C9922B 100%);
  color: var(--ink-hi);
  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 22px var(--theme-gold-glow), 0 1px 0 color-mix(in srgb, var(--seed-fg) 40%, transparent) inset;
  letter-spacing: 0.03em;
}
.theme-btn-gold:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 36px var(--theme-gold-glow), 0 0 20px var(--theme-gold-glow);
}

.theme-btn-cyan {
  background: linear-gradient(135deg, var(--theme-gold-bright), color-mix(in srgb, var(--seed-accent) 85%, var(--seed-canvas)));
  color: var(--ink-hi);
  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(201,146,43,0.10);
  color: var(--theme-text-secondary);
  border: 1px solid var(--theme-border-subtle);
  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(201,146,43,0.12);
}

/* ── BADGE ── */
.theme-badge-hot {
  background: #DC2626;
  color: var(--ink-bright);
  font-size: 0.6rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}
.theme-badge-new {
  background: linear-gradient(135deg, color-mix(in srgb, var(--seed-accent) 8%, var(--seed-canvas)), #C9922B);
  color: var(--ink-hi);
  font-size: 0.6rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}
.theme-badge-live {
  background: var(--elev-5);
  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 color-mix(in srgb, var(--seed-accent) 22%, transparent);
  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(201,146,43,0.08); }
::-webkit-scrollbar-thumb { background: #C9922B; 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 20px var(--theme-gold-glow); }
.glow-cyan     { box-shadow: 0 0 18px var(--theme-cyan-glow); }

/* ── TEXT ELEMENT DEFAULTS — dark text on light theme ── */
p   { color: var(--theme-text-primary); }
li  { color: var(--theme-text-primary); }
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;
}
/* [BF-1124-A] start - promotion card secondary text: the page rule .ticket-meta (pages/member/promotion.ejs :172) reads --ink-faint, below 4.5:1 on the card; --ink-mid is the cashier coupon card's meta ink */
.promo-page .ticket-meta { color: var(--ink-mid); }
/* [BF-1124-A] end */
