/* ==========================================================
   Luxury Spa - dark theme (customer site)
   Applied when <html data-theme="dark"> is set (see includes/header.php)
   ========================================================== */
:root[data-theme="dark"] {
  color-scheme: dark;
  --ivory: #15100b;      /* page background */
  --cream: #1d160f;      /* alternate sections */
  --white: #251c14;      /* card and form surfaces */
  --beige: #3d2f22;      /* borders */
  --brown: #f1e7d6;      /* body text */
  --muted: #b3a38c;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
:root[data-theme="dark"] body { background: #15100b; color: var(--brown); }
:root[data-theme="dark"] a { color: var(--brown); }

/* Light text that must stay light in both themes (they sit on dark photos or dark panels) */
:root[data-theme="dark"] .hero, :root[data-theme="dark"] .hero h1,
:root[data-theme="dark"] .hero .eyebrow { color: #FBF7F0; }
:root[data-theme="dark"] .btn-outline { color: #FBF7F0; border-color: #FBF7F0; }
:root[data-theme="dark"] .btn-outline:hover { background: #FBF7F0; color: #15100b; }
:root[data-theme="dark"] .dark, :root[data-theme="dark"] .site-footer { background: #0c0805; color: #e8dcc8; }
:root[data-theme="dark"] .dark h2, :root[data-theme="dark"] .dark h3,
:root[data-theme="dark"] .site-footer .logo { color: #FBF7F0; }
:root[data-theme="dark"] .site-footer h4 { color: var(--gold); }

/* Buttons */
:root[data-theme="dark"] .btn-outline-dark { color: var(--brown); border-color: var(--gold); }
:root[data-theme="dark"] .btn-outline-dark:hover { background: var(--gold); color: #15100b; }
:root[data-theme="dark"] .btn-gold { color: #15100b; }

/* Header */
:root[data-theme="dark"] .site-header { background: rgba(21, 16, 11, .92); }
:root[data-theme="dark"] .site-header .logo, :root[data-theme="dark"] .site-header .main-nav a { color: var(--brown); }
:root[data-theme="dark"] body.home .site-header:not(.scrolled) .logo,
:root[data-theme="dark"] body.home .site-header:not(.scrolled) .main-nav a { color: #FBF7F0; }
:root[data-theme="dark"] .main-nav { background: #15100b; }
:root[data-theme="dark"] .menu-toggle { color: var(--brown); }

/* Surfaces that were hard-coded to white or cream */
:root[data-theme="dark"] .card, :root[data-theme="dark"] .feature, :root[data-theme="dark"] .card-plain,
:root[data-theme="dark"] .booking-form, :root[data-theme="dark"] .testimonial, :root[data-theme="dark"] .plan-card,
:root[data-theme="dark"] .post-card, :root[data-theme="dark"] .result-card, :root[data-theme="dark"] .duration-table,
:root[data-theme="dark"] .therapist-list li, :root[data-theme="dark"] .slot, :root[data-theme="dark"] .pill {
  background: var(--white); color: var(--brown);
}
:root[data-theme="dark"] .card-img.placeholder { background: #3d2f22; }
:root[data-theme="dark"] .summary { background: #1d160f; }
:root[data-theme="dark"] .code-display { background: #2a2016; color: var(--brown); }
:root[data-theme="dark"] .offer { border-color: rgba(201,169,110,.35); }
:root[data-theme="dark"] .testimonial cite { color: var(--gold); }

/* Form controls */
:root[data-theme="dark"] input, :root[data-theme="dark"] select, :root[data-theme="dark"] textarea {
  background: #1d160f; color: var(--brown); border-color: #4a3a2b;
}
:root[data-theme="dark"] input::placeholder, :root[data-theme="dark"] textarea::placeholder { color: #8c7b66; }
:root[data-theme="dark"] .slot:hover { background: #3d2f22; }
:root[data-theme="dark"] .slot.selected { color: #15100b; }
:root[data-theme="dark"] .chip { background: transparent; color: var(--brown); }
:root[data-theme="dark"] .chip.active, :root[data-theme="dark"] .chip:hover { color: #15100b; }

/* Sections and panels */
:root[data-theme="dark"] .cream, :root[data-theme="dark"] .section.cream { background: #1d160f; }
:root[data-theme="dark"] .cta { background: linear-gradient(135deg, #2a2016, #1d160f); }
:root[data-theme="dark"] .page-hero { background: linear-gradient(135deg, #1d160f, #2a2016); }
:root[data-theme="dark"] .map-placeholder { background: #1d160f; }
:root[data-theme="dark"] .alert-success { background: #1e3a25; color: #cfe9d6; }
:root[data-theme="dark"] .alert-error { background: #3d1f1c; color: #f5c9c3; }

/* Quick-check card on the homepage */
:root[data-theme="dark"] .quick-card { background: rgba(37, 28, 20, .96); color: var(--brown); }
:root[data-theme="dark"] .quick-card > p, :root[data-theme="dark"] .quick-card label { color: var(--muted); }
:root[data-theme="dark"] .quick-card select, :root[data-theme="dark"] .quick-card input { background: #1d160f; color: var(--brown); border-color: #4a3a2b; }

/* Mobile app bar and install prompts */
:root[data-theme="dark"] .tabbar { background: rgba(21, 16, 11, .96); border-top-color: #3d2f22; }
:root[data-theme="dark"] .tab { color: var(--muted); }
:root[data-theme="dark"] .tab.active, :root[data-theme="dark"] .tab-main { color: var(--gold); }
:root[data-theme="dark"] .ios-hint, :root[data-theme="dark"] .install-chip { background: #251c14; color: var(--brown); }

/* Theme toggle button */
.theme-toggle {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--gold); background: transparent;
  color: var(--brown); cursor: pointer; display: grid; place-items: center; flex-shrink: 0; transition: transform .3s ease;
}
.theme-toggle:hover { transform: rotate(18deg); }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
body.home .site-header:not(.scrolled) .theme-toggle { color: #FBF7F0; }
@media (min-width: 960px) { .theme-toggle { order: 9; } }

/* Fixes found in review */
:root[data-theme="dark"] .hero-sub { color: #e8dcc8; }
:root[data-theme="dark"] .trust-strip span, :root[data-theme="dark"] .trust-strip div { color: #e8dcc8; }

/* Review fixes: page headers, active filter chips, service tags */
:root[data-theme="dark"] .page-hero h1, :root[data-theme="dark"] .lux-hero h1 { color: #FBF7F0; }
:root[data-theme="dark"] .page-hero p, :root[data-theme="dark"] .lux-hero p,
:root[data-theme="dark"] .page-hero .lead, :root[data-theme="dark"] .lux-hero .lead { color: #e8dcc8; }
:root[data-theme="dark"] .chip.active { background: var(--gold); border-color: var(--gold); color: #15100b; }
:root[data-theme="dark"] .tag { background: rgba(21, 16, 11, .85); color: #f1e7d6; }
