/* Table Reservation theme – dark (default) + light overrides */

html[data-theme="dark"] {
  color-scheme: dark;
}

html[data-theme="light"] {
  color-scheme: light;
}

html[data-theme="light"] body {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
}

html[data-theme="light"] ::-webkit-scrollbar-track { background: #e2e8f0; }
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 10px; }

/* Surfaces */
html[data-theme="light"] .bg-slate-950 { background-color: #f1f5f9 !important; }
html[data-theme="light"] .bg-slate-900,
html[data-theme="light"] .bg-slate-900\/80 { background-color: #ffffff !important; }
html[data-theme="light"] .bg-slate-800,
html[data-theme="light"] .bg-slate-800\/50 { background-color: #f1f5f9 !important; }
html[data-theme="light"] .bg-slate-700 { background-color: #e2e8f0 !important; }
html[data-theme="light"] .bg-slate-700\/50 { background-color: #e2e8f0 !important; }
html[data-theme="light"] .bg-slate-600 { background-color: #cbd5e1 !important; }

/* Borders */
html[data-theme="light"] .border-slate-800,
html[data-theme="light"] .border-slate-700,
html[data-theme="light"] .border-slate-600 { border-color: #e2e8f0 !important; }
html[data-theme="light"] .border-white\/10 { border-color: rgba(15, 23, 42, 0.08) !important; }
html[data-theme="light"] .border-dashed { border-color: #cbd5e1 !important; }

/* Text – complementary on light surfaces */
html[data-theme="light"] .text-white { color: #0f172a !important; }
html[data-theme="light"] .text-slate-200 { color: #1e293b !important; }
html[data-theme="light"] .text-slate-300 { color: #334155 !important; }
html[data-theme="light"] .text-slate-400 { color: #64748b !important; }
html[data-theme="light"] .text-slate-500 { color: #64748b !important; }
html[data-theme="light"] .text-slate-600 { color: #94a3b8 !important; }

html[data-theme="light"] .hover\:text-white:hover { color: #0f172a !important; }
html[data-theme="light"] .hover\:bg-slate-800:hover,
html[data-theme="light"] .hover\:bg-slate-700:hover { background-color: #e2e8f0 !important; }
html[data-theme="light"] .hover\:bg-slate-800\/50:hover { background-color: #f8fafc !important; }

/* Keep white text on solid brand / action colors */
html[data-theme="light"] .bg-indigo-600,
html[data-theme="light"] .bg-indigo-600 *,
html[data-theme="light"] .bg-indigo-700,
html[data-theme="light"] .bg-indigo-700 *,
html[data-theme="light"] .bg-emerald-600,
html[data-theme="light"] .bg-emerald-600 *,
html[data-theme="light"] .bg-blue-600,
html[data-theme="light"] .bg-blue-600 *,
html[data-theme="light"] .bg-green-600,
html[data-theme="light"] .bg-green-600 *,
html[data-theme="light"] .bg-purple-600,
html[data-theme="light"] .bg-purple-600 *,
html[data-theme="light"] .bg-red-600,
html[data-theme="light"] .bg-red-600 *,
html[data-theme="light"] .bg-red-800,
html[data-theme="light"] .bg-red-800 *,
html[data-theme="light"] .bg-red-900,
html[data-theme="light"] .bg-red-900 *,
html[data-theme="light"] .bg-red-900\/80,
html[data-theme="light"] .bg-red-900\/80 * {
  color: #ffffff !important;
}

/* Colored accent text stays readable */
html[data-theme="light"] .text-indigo-400 { color: #4f46e5 !important; }
html[data-theme="light"] .text-blue-400 { color: #2563eb !important; }
html[data-theme="light"] .text-green-400 { color: #16a34a !important; }
html[data-theme="light"] .text-emerald-500 { color: #059669 !important; }
html[data-theme="light"] .text-yellow-400 { color: #d97706 !important; }
html[data-theme="light"] .text-red-400 { color: #dc2626 !important; }
html[data-theme="light"] .text-red-300 { color: #ef4444 !important; }
html[data-theme="light"] .text-purple-400 { color: #7c3aed !important; }
html[data-theme="light"] .hover\:text-indigo-300:hover { color: #6366f1 !important; }
html[data-theme="light"] .hover\:text-red-300:hover { color: #f87171 !important; }

/* Forms */
html[data-theme="light"] input:not([type="color"]):not([type="checkbox"]):not([type="radio"]),
html[data-theme="light"] select,
html[data-theme="light"] textarea {
  color: #0f172a !important;
  background-color: #f8fafc !important;
  border-color: #cbd5e1 !important;
}
html[data-theme="light"] input::placeholder {
  color: #94a3b8 !important;
}
html[data-theme="light"] option {
  background-color: #ffffff;
  color: #0f172a;
}

/* Modals / overlays */
html[data-theme="light"] .bg-black\/60 {
  background-color: rgba(15, 23, 42, 0.45) !important;
}

/* Empty floor table tiles (no booking) */
.table-tile-empty {
  background-color: #1e293b;
  color: #ffffff;
}
html[data-theme="light"] .table-tile-empty {
  background-color: #e2e8f0;
  color: #0f172a;
}
html[data-theme="light"] .table-tile-empty .bg-black\/40 {
  background-color: rgba(15, 23, 42, 0.12) !important;
}
html[data-theme="light"] .table-tile-empty .text-white\/50 {
  color: rgba(15, 23, 42, 0.45) !important;
}

/* Status-colored floor tiles keep white label text */
.table-tile-booked,
.table-tile-booked * {
  color: #ffffff !important;
}

/* Theme toggle button */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.75rem;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease;
}
html[data-theme="dark"] .theme-toggle {
  background: #1e293b;
  color: #fbbf24;
  border-color: #334155;
}
html[data-theme="light"] .theme-toggle {
  background: #e2e8f0;
  color: #4338ca;
  border-color: #cbd5e1;
}
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
html[data-theme="light"] .theme-toggle .icon-moon { display: block; }
