/* =========================
   GLOBAL THEME SYSTEM 
========================= */

:root {
  /* Common Variables */
  --neon-green: #dcfc44;
  --neon-emerald: #10b981;
  --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* LIGHT THEME (Premium Indigo) — DEFAULT for all pages */
:root,
[data-theme='light-theme'],
:root:not([data-theme='dark-theme']) {
  --bg: #f8fafc;
  --dark-bg: #f8fafc;
  /* Override hardcoded --dark-bg used in HTML pages */
  --text: #000000;
  --text-muted: #1e293b;
  --card: #dae8f5;
  --card-bg: #265da5;
  /* Override hardcoded --card-bg used in HTML pages */
  --border: #bfdbfe;
  --input: #f1f5f9;
  --primary: #4f46e5;
  --primary-glow: rgba(79, 70, 229, 0.15);
  --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --switch-bg: #33b1f5;
  --switch-border: rgba(0, 0, 0, 0.05);
  --knob-bg: #fb923c;
  --knob-shadow: 0 0 15px rgba(251, 146, 60, 0.4);
}

/* DARK THEME (Premium Neon) — Only when explicitly set */
[data-theme='dark-theme'] {
  --bg: #030712;
  --dark-bg: #030712;
  --text: #ffffff;
  --text-muted: #194c9f;
  --card: rgba(17, 24, 39, 0.7);
  --card-bg: rgba(17, 24, 39, 0.7);
  --border: rgba(255, 255, 255, 0.08);
  --input: rgba(255, 255, 255, 0.05);
  --primary: var(--neon-green);
  --primary-glow: rgba(220, 252, 68, 0.2);
  --shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.5);
  --switch-bg: #1e293b;
  --switch-border: rgba(255, 255, 255, 0.1);
  --knob-bg: #fde047;
  --knob-shadow: 0 0 15px rgba(253, 224, 71, 0.4);
}

/* =========================
   BASE STYLES
========================= */
html,
body {
  background-color: var(--bg) !important;
  color: var(--text) !important;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  transition: background-color 0.5s ease, color 0.5s ease;
}

/* =========================
   REUSABLE COMPONENTS
========================= */
.glass-card {
  background: var(--card) !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: var(--transition);
}

.neon-button {
  background: var(--primary) !important;
  color: white !important;
  font-weight: 800;
  box-shadow: 0 10px 20px -5px var(--primary-glow) !important;
  transition: var(--transition);
}

[data-theme='dark-theme'] .neon-button {
  color: #000 !important;
}

/* =========================
   LIGHT MODE OVERRIDES
   Fixes hardcoded dark Tailwind classes used in HTML pages
========================= */
:root:not([data-theme='dark-theme']) body,
:root:not([data-theme='dark-theme']) main,
:root:not([data-theme='dark-theme']) section,
:root:not([data-theme='dark-theme']) aside {
  color: var(--text) !important;
}

/* Hardcoded white text → dark text in light mode */
:root:not([data-theme='dark-theme']) .text-white {
  color: var(--text) !important;
}

:root:not([data-theme='dark-theme']) .text-gray-300 {
  color: #000000 !important;
}

:root:not([data-theme='dark-theme']) .text-gray-400 {
  color: #000000 !important;
}

:root:not([data-theme='dark-theme']) .text-gray-500 {
  color: #000000 !important;
}

/* Hardcoded white/transparent borders → theme border */
:root:not([data-theme='dark-theme']) [class*="border-white"] {
  border-color: var(--border) !important;
}

/* Hardcoded dark glass backgrounds → white */
:root:not([data-theme='dark-theme']) [class*="bg-white\/"] {
  background-color: #f1f5f9 !important;
}

/* Neon gradient text → indigo in light mode */
:root:not([data-theme='dark-theme']) .neon-text-gradient {
  background: linear-gradient(to right, #4f46e5, #7c3aed) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

/* Book Slots / neon-green buttons stay yellow-green */
:root:not([data-theme='dark-theme']) [class*="bg-\[var(--neon-green)\]"] {
  background: var(--neon-green) !important;
  color: #000 !important;
}

/* Hardcoded dark hex backgrounds used in bookings.html and similar pages */
:root:not([data-theme='dark-theme']) .bg-\[\#0b1120\],
:root:not([data-theme='dark-theme']) .bg-\[\#0f172a\],
:root:not([data-theme='dark-theme']) .bg-\[\#111c34\],
:root:not([data-theme='dark-theme']) .bg-\[\#111827\],
:root:not([data-theme='dark-theme']) .bg-\[\#1e293b\] {
  background-color: var(--card) !important;
  color: var(--text) !important;
}

/* Nav bar hardcoded dark */
:root:not([data-theme='dark-theme']) nav.bg-\[\#0f172a\] {
  background-color: #ffffff !important;
  border-bottom: 1px solid var(--border) !important;
  color: var(--text) !important;
}

/* Dropdown hardcoded dark */
:root:not([data-theme='dark-theme']) .bg-\[\#111c34\] {
  background-color: #ffffff !important;
  border-color: var(--border) !important;
}

/* Table dividers */
:root:not([data-theme='dark-theme']) .divide-gray-700>*+* {
  border-color: var(--border) !important;
}

:root:not([data-theme='dark-theme']) .border-gray-700 {
  border-color: var(--border) !important;
}

/* Table header text */
:root:not([data-theme='dark-theme']) thead.text-gray-400 {
  color: #000000 !important;
}

/* =========================
   AMAZING THEME SWITCH 
========================= */
.theme-switch-wrapper {
  position: relative;
  width: 64px;
  height: 32px;
  padding: 4px;
  background: var(--switch-bg);
  border: 1px solid var(--switch-border);
  border-radius: 20px;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
}

.theme-switch-wrapper:hover {
  transform: scale(1.05);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1), 0 0 15px var(--primary-glow);
}

.theme-switch-wrapper:active {
  transform: scale(0.95);
}

.theme-switch-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.theme-switch-decorators {
  position: absolute;
  inset: 0;
  transition: opacity 0.5s ease;
}

/* Light mode clouds */
[data-theme='light-theme'] .theme-switch-decorators::before,
:root:not([data-theme='dark-theme']) .theme-switch-decorators::before {
  content: '☁️';
  position: absolute;
  font-size: 10px;
  left: 8px;
  top: 4px;
  opacity: 0.6;
  animation: float 3s ease-in-out infinite;
}

/* Dark mode stars */
[data-theme='dark-theme'] .theme-switch-decorators::after {
  content: '✨';
  position: absolute;
  font-size: 8px;
  right: 10px;
  top: 5px;
  opacity: 0.8;
  animation: twinkle 2s ease-in-out infinite;
}

.theme-switch-knob {
  position: absolute;
  width: 24px;
  height: 24px;
  background: var(--knob-bg);
  border-radius: 50%;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: var(--knob-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

[data-theme='light-theme'] .theme-switch-knob,
:root:not([data-theme='dark-theme']) .theme-switch-knob {
  left: 32px;
}

[data-theme='dark-theme'] .theme-switch-knob {
  left: 0;
}

.theme-switch-icon {
  font-size: 12px;
  transition: transform 0.5s ease;
}

[data-theme='light-theme'] .theme-switch-icon::before,
:root:not([data-theme='dark-theme']) .theme-switch-icon::before {
  content: '☀️';
}

[data-theme='dark-theme'] .theme-switch-icon::before {
  content: '🌙';
  transform: rotate(-20deg);
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-2px);
  }
}

@keyframes twinkle {

  0%,
  100% {
    opacity: 0.4;
    transform: scale(0.8);
  }

  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

/* Dropdown Animations */
.animate-in {
  animation: fadeInDown 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translate(-50%, -10px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.dropdown-bridge-top::before {
  content: "";
  position: absolute;
  top: -24px;
  left: 0;
  right: 0;
  height: 24px;
}

.dropdown-bridge-right::before {
  content: "";
  position: absolute;
  top: -20px;
  right: 0;
  left: -20px;
  height: calc(100% + 20px);
}

/* Utility Helpers */
.text-theme-main {
  color: var(--text);
}

.text-theme-muted {
  color: var(--text-muted);
}

* {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

/* ONLY for LIGHT THEME */
:root:not([data-theme='dark-theme']) .text-\[var\(--neon-green\)\],
:root:not([data-theme='dark-theme']) .neon-text,
:root:not([data-theme='dark-theme']) .demo-code {
  color: #25324B !important;
  /* Navy Blue */
}

/* STOP yellow hover ONLY in LIGHT theme */
:root:not([data-theme='dark-theme']) .venue-name:hover,
:root:not([data-theme='dark-theme']) .card h3:hover,
:root:not([data-theme='dark-theme']) [class*="hover:text-"] {
  color: #25324B !important;
  /* Navy Blue */
}

/* =========================
   FORCE SOLID SLOT COLORS (LIGHT THEME)
========================= */

/* Remove ANY fading from slots */
:root:not([data-theme='dark-theme']) button,
:root:not([data-theme='dark-theme']) div {
  opacity: 1 !important;
}

/* Kill transparency (rgba → solid look) */
:root:not([data-theme='dark-theme']) [style*="rgba"] {
  background-color: inherit !important;
}

/* =========================
   MEMBERSHIP PAGE BG FIX
========================= */

/* Target this specific page */
body:has(.membership-page),
body:has(.membership-section),
body:has(.membership-container) {
  background: #ffffff !important;
}

:root:not([data-theme='dark-theme']) {
  --neon-green: #ffffff;
}

/* =========================
   BILLING TOGGLE FINAL FIX
========================= */


/* Slider (active tab) */
:root:not([data-theme='dark-theme']) #toggleSlider {
  background: linear-gradient(135deg, #4f46e5, #6366f1) !important;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

/* Default button text (inactive) */
:root:not([data-theme='dark-theme']) #monthlyBtn,
:root:not([data-theme='dark-theme']) #yearlyBtn {
  color: #023685 !important;
  /* gray */
  font-weight: 600;
}

/* Active states (based on slider position) */
:root:not([data-theme='dark-theme']) #toggleSlider[style*="left: 4px"]~#monthlyBtn,
:root:not([data-theme='dark-theme']) #toggleSlider[style*="left: 4px"]+#monthlyBtn {
  color: #ffffff !important;
}

:root:not([data-theme='dark-theme']) #toggleSlider[style*="left: 50%"]~#yearlyBtn {
  color: #ffffff !important;
}

/* Fix big white circle */
:root:not([data-theme='dark-theme']) .hero-circle,
:root:not([data-theme='dark-theme']) [class*="rounded-full"] {
  background: #f1f5f9 !important;
  /* soft gray instead of white */
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

/* Cards contrast fix */
:root:not([data-theme='dark-theme']) .glass-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12) !important;
}

/* Reduce overlay intensity */
:root:not([data-theme='dark-theme']) body::before {
  background: rgba(255, 255, 255, 0.55) !important;
}

:root:not([data-theme='dark-theme']) h1 {
  color: #111827 !important;
}

:root:not([data-theme='dark-theme']) h1 span,
:root:not([data-theme='dark-theme']) .gradient-text {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
/* Apply only to specific components instead of ALL elements */
:root:not([data-theme='dark-theme']) .card,
:root:not([data-theme='dark-theme']) .container {
  background: #ffffff !important;
}
:root:not([data-theme='dark-theme']) .addr-card:hover,
:root:not([data-theme='dark-theme']) .menu-item:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

/* =========================
   FIX BLACK CARDS (LIGHT THEME)
========================= */

:root:not([data-theme='dark-theme']) .refer-card,
:root:not([data-theme='dark-theme']) .addr-card,
:root:not([data-theme='dark-theme']) .sub-card,
:root:not([data-theme='dark-theme']) .info-card,
:root:not([data-theme='dark-theme']) .menu-item {
  background: #ffffff !important;
  color: #111827 !important;
  border: 1px solid #e5e7eb !important;
}



:root:not([data-theme='dark-theme']) .refer-card *,
:root:not([data-theme='dark-theme']) .addr-card * {
  color: #111827 !important;
}

:root:not([data-theme='dark-theme']) input {
  background: #ffffff !important;
  color: #111827 !important;
  border: 1px solid #d1d5db !important;
}

/* BOOK SLOT BUTTON → BLUE (FINAL FIX) */
#bookSlotsBtn {
  background: #4f46e5 !important;
  color: #ffffff !important;
  border: none !important;
}

/* Hover */
#bookSlotsBtn:hover {
  background: #4338ca !important;
}

/* SELECTED SLOT → GREEN */
.slot.selected {
  background: #22c55e !important;
  color: #ffffff !important;
  border: none !important;
}

/* Optional hover */
.slot:hover {
  transform: scale(1.03);
}

/* =========================
   CONFIRM BUTTON → BLUE
========================= */

#addToCartBtn.bg-\[var\(--neon-green\)\] {
  background: #4f46e5 !important;
  color: #ffffff !important;
}

/* =========================
   FORCE SELECTED SLOT (FINAL)
========================= */

.slot-btn.bg-\[var\(--neon-green\)\] {
  background: #0b5827 !important;
  color: #2b6719 !important;
  border: none !important;
}

/* Keep it green ALWAYS (even after hover ends) */
.slot-btn.bg-\[var\(--neon-green\)\],
.slot-btn.bg-\[var\(--neon-green\)\]:hover,
.slot-btn.bg-\[var\(--neon-green\)\]:focus,
.slot-btn.bg-\[var\(--neon-green\)\]:active {
  background: #22c55e !important;
  color: #ffffff !important;
}

/* REMOVE faded green override */
.slot-btn.bg-green-500\/10.bg-\[var\(--neon-green\)\] {
  background: #22c55e !important;
}

.slot-btn.bg-\[var\(--neon-green\)\] {
  border: 2px solid #16a34a !important;
}

/* =========================
   BOOKED STATUS → LIGHT GREEN
========================= */

span.bg-green-600 {
  background: #dcfce7 !important;
  /* light green */
  color: #05993e !important;
  /* dark green text */
  border: 1px solid #046f2b !important;
}

/* =========================
   BOOKING TABS STYLE
========================= */

/* Base (inactive) */
#btnUpcoming,
#btnPast {
  background: #f0fdf4 !important;
  /* light green */
  color: #166534 !important;
  border: 1px solid #86efac !important;
}

/* Active tab */
#btnUpcoming.bg-green-600,
#btnPast.bg-green-600 {
  background: #22c55e !important;
  /* solid green */
  color: #ffffff !important;
  border: none !important;
}