/* DARK MODE THEME STYLES */
html.dark, [data-theme="dark"] {
  color-scheme: dark;
  background-color: #0b132b;
  color: #f8fafc;
}
html.dark body, [data-theme="dark"] body {
  background-color: #0b132b !important;
  color: #f8fafc !important;
}
html.dark .bg-white, [data-theme="dark"] .bg-white {
  background-color: #1c2541 !important;
  color: #f8fafc !important;
  border-color: #334155 !important;
}
html.dark .bg-slate-50, html.dark .bg-slate-50\/50, [data-theme="dark"] .bg-slate-50, [data-theme="dark"] .bg-slate-50\/50 {
  background-color: #0b132b !important;
  color: #f8fafc !important;
}
html.dark .bg-slate-50\/70, html.dark .bg-slate-50\/80,
[data-theme="dark"] .bg-slate-50\/70, [data-theme="dark"] .bg-slate-50\/80 {
  background-color: #111c35 !important;
  color: #e2e8f0 !important;
}
html.dark .bg-slate-100\/80, [data-theme="dark"] .bg-slate-100\/80 {
  background-color: #1e293b !important;
  color: #e2e8f0 !important;
}
html.dark .bg-slate-200\/70, [data-theme="dark"] .bg-slate-200\/70 {
  background-color: #273449 !important;
}
html.dark .bg-slate-100, [data-theme="dark"] .bg-slate-100 {
  background-color: #1e293b !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}
html.dark .text-slate-900, html.dark .text-slate-800, html.dark .text-slate-700,
[data-theme="dark"] .text-slate-900, [data-theme="dark"] .text-slate-800, [data-theme="dark"] .text-slate-700 {
  color: #f8fafc !important;
}
html.dark .text-slate-600, html.dark .text-slate-500,
[data-theme="dark"] .text-slate-600, [data-theme="dark"] .text-slate-500 {
  color: #94a3b8 !important;
}
html.dark .border-slate-200, html.dark .border-slate-100,
[data-theme="dark"] .border-slate-200, [data-theme="dark"] .border-slate-100 {
  border-color: #334155 !important;
}
html.dark select, html.dark input, [data-theme="dark"] select, [data-theme="dark"] input {
  background-color: #1e293b !important;
  color: #f8fafc !important;
  border-color: #475569 !important;
}
html.dark .leaflet-container, [data-theme="dark"] .leaflet-container {
  filter: brightness(0.9) contrast(1.1);
}

/* Muted semantic colours for school cards in dark mode. */
html.dark .bg-emerald-50, html.dark .bg-emerald-100,
[data-theme="dark"] .bg-emerald-50, [data-theme="dark"] .bg-emerald-100 {
  background-color: #12352f !important;
}
html.dark .text-emerald-700, html.dark .text-emerald-800,
[data-theme="dark"] .text-emerald-700, [data-theme="dark"] .text-emerald-800 {
  color: #a7f3d0 !important;
}
html.dark .border-emerald-200, html.dark .border-emerald-300,
[data-theme="dark"] .border-emerald-200, [data-theme="dark"] .border-emerald-300 {
  border-color: #217a62 !important;
}
html.dark .bg-red-50, [data-theme="dark"] .bg-red-50 {
  background-color: #401c25 !important;
}
html.dark .text-red-800, [data-theme="dark"] .text-red-800 {
  color: #fecaca !important;
}
html.dark .border-red-200, [data-theme="dark"] .border-red-200 {
  border-color: #9f3f50 !important;
}
html.dark .bg-blue-50, [data-theme="dark"] .bg-blue-50 {
  background-color: #172554 !important;
}
html.dark .bg-blue-50\/80, [data-theme="dark"] .bg-blue-50\/80 {
  background-color: #172554 !important;
}
html.dark .text-blue-700, html.dark .text-blue-800,
[data-theme="dark"] .text-blue-700, [data-theme="dark"] .text-blue-800 {
  color: #bfdbfe !important;
}

/* ==========================================
   GOOGLE PROGRAMMABLE SEARCH (CSE) CLEAN STYLES
   ========================================== */
.gcse-container .gsc-control-cse {
  background-color: transparent !important;
  border: none !important;
  padding: 0 !important;
  width: 100% !important;
}
.gcse-container .gsc-input-box {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding-right: 110px !important;
}
.gcse-container input.gsc-input {
  font-size: 15px !important;
  font-family: inherit !important;
}
.gcse-container input.gsc-input::placeholder {
  color: #94a3b8 !important;
  font-size: 14px !important;
  opacity: 1 !important;
}
.gcse-container button.gsc-search-button-v2,
.gcse-container .gsc-search-button-v2 {
  opacity: 0 !important;
  visibility: hidden !important;
}
.gcse-container .gsc-results-wrapper-overlay {
  border-radius: 1.5rem !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
  border: 1px solid #e2e8f0 !important;
}
