/* RelocateTrue - Custom Enhancements & Micro-Interactions */

/* Range Slider Styling */
input[type="range"].custom-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 9999px;
  outline: none;
  transition: background 0.2s ease;
}

input[type="range"].custom-slider:focus {
  outline: none;
}

input[type="range"].custom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #2563eb;
  cursor: pointer;
  border: 3px solid #ffffff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
  transition: transform 0.15s ease, background-color 0.15s ease;
}

input[type="range"].custom-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  background: #1d4ed8;
}

input[type="range"].custom-slider::-webkit-slider-thumb:active {
  transform: scale(0.95);
  background: #1e40af;
}

input[type="range"].custom-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #2563eb;
  cursor: pointer;
  border: 3px solid #ffffff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
  transition: transform 0.15s ease, background-color 0.15s ease;
}

input[type="range"].custom-slider::-moz-range-thumb:hover {
  transform: scale(1.15);
  background: #1d4ed8;
}



/* Smooth Transitions & Micro-Animations */
.card-hover-effect {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-hover-effect:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.08), 0 4px 8px -4px rgba(0, 0, 0, 0.04);
}

/* Accent Glows */
.glow-emerald {
  box-shadow: 0 0 25px -5px rgba(16, 185, 129, 0.25);
}

.glow-blue {
  box-shadow: 0 0 25px -5px rgba(37, 99, 235, 0.25);
}

/* FAQ Details Accordion styling */
details.faq-accordion summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

details.faq-accordion summary::-webkit-details-marker {
  display: none;
}

details.faq-accordion summary svg {
  transition: transform 0.25s ease;
}

details.faq-accordion[open] summary svg {
  transform: rotate(180deg);
}

details.faq-accordion[open] {
  background-color: #ffffff;
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.08);
}

/* Chart Canvas / SVG Container */
.chart-bar {
  transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1), y 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Print Stylesheet for Exporting Clean Reports */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt;
  }

  nav,
  footer,
  .no-print,
  #preset-buttons,
  #swap-cities-btn {
    display: none !important;
  }

  .print-page-break {
    page-break-before: always;
  }

  .card-print {
    border: 1px solid #d1d5db !important;
    box-shadow: none !important;
    break-inside: avoid;
    margin-bottom: 1rem !important;
  }

  .print-header {
    display: block !important;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #2563eb;
    padding-bottom: 0.75rem;
  }
}

/* Semantic AdSense Placeholders */
.adsense-placeholder {
  background: repeating-linear-gradient(
    45deg,
    #f8fafc,
    #f8fafc 10px,
    #f1f5f9 10px,
    #f1f5f9 20px
  );
  border: 1.5px dashed #cbd5e1;
  transition: border-color 0.2s ease;
}

.adsense-placeholder:hover {
  border-color: #94a3b8;
}

/* Mobile Navigation Drawer */
.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.mobile-nav-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(85vw, 340px);
  background-color: #ffffff;
  box-shadow: -4px 0 25px rgba(15, 23, 42, 0.15);
  z-index: 999;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.mobile-nav-drawer.active {
  transform: translateX(0);
}

/* Enforce desktop suppression of mobile drawer */
@media (min-width: 768px) {
  .mobile-nav-drawer,
  .mobile-nav-backdrop,
  #mobileDrawer,
  #mobileDrawerBackdrop {
    display: none !important;
  }
}

/* Custom scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Google AdSense Optimization & Zero-CLS Layout */
.adsense-slot {
  width: 100%;
  margin: 1.5rem auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  clear: both;
}

.adsense-card {
  width: 100%;
  max-width: 56rem;
  min-height: 90px;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.adsbygoogle {
  display: block !important;
  margin: 0 auto;
  max-width: 100%;
}

/* ==========================================================================
   Dark Mode Overrides - High Contrast Typography & Surfaces
   ========================================================================== */
html.dark body {
  background-color: #020617;
  color: #f1f5f9;
}

/* Typography High Contrast */
html.dark h1,
html.dark h2,
html.dark h3,
html.dark h4,
html.dark h5,
html.dark h6 {
  color: #f8fafc !important;
}

html.dark p {
  color: #cbd5e1 !important;
}

html.dark .text-slate-900 {
  color: #ffffff !important;
}

html.dark .text-slate-800 {
  color: #f1f5f9 !important;
}

html.dark .text-slate-700 {
  color: #e2e8f0 !important;
}

html.dark .text-slate-600 {
  color: #cbd5e1 !important;
}

html.dark .text-slate-500 {
  color: #94a3b8 !important;
}

html.dark .text-slate-400 {
  color: #94a3b8 !important;
}

html.dark strong {
  color: #ffffff !important;
}

/* Card Surfaces & Borders */
html.dark .bg-white {
  background-color: #0f172a !important;
  border-color: #1e293b !important;
}

html.dark .bg-slate-50 {
  background-color: #0b1329 !important;
}

html.dark .bg-slate-100 {
  background-color: #1e293b !important;
  color: #f1f5f9 !important;
}

html.dark .border-slate-50,
html.dark .border-slate-100,
html.dark .border-slate-200 {
  border-color: #1e293b !important;
}

html.dark .border-slate-300 {
  border-color: #334155 !important;
}

/* Inputs, Selects & Sliders */
html.dark input[type="text"],
html.dark input[type="number"],
html.dark select {
  background-color: #1e293b !important;
  color: #ffffff !important;
  border-color: #334155 !important;
}

html.dark input[type="text"]::placeholder,
html.dark input[type="number"]::placeholder {
  color: #64748b !important;
}

html.dark select option {
  background-color: #0f172a !important;
  color: #ffffff !important;
}

html.dark input[type="range"].custom-slider {
  background: #334155;
}

/* Radio Cards (Housing & Lifestyle) */
html.dark input[type="radio"] + div {
  border-color: #334155 !important;
  color: #cbd5e1 !important;
  background-color: #1e293b/40 !important;
}

html.dark input[type="radio"]:checked + div {
  background-color: rgba(37, 99, 235, 0.25) !important;
  border-color: #3b82f6 !important;
  color: #93c5fd !important;
}

/* Quick Preset Buttons */
html.dark .preset-btn {
  background-color: #1e293b !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}

html.dark .preset-btn:hover {
  background-color: #2563eb !important;
  color: #ffffff !important;
  border-color: #3b82f6 !important;
}

/* Swap Cities Button */
html.dark #swap-cities-btn {
  background-color: #1e293b !important;
  color: #93c5fd !important;
  border-color: #334155 !important;
}

html.dark #swap-cities-btn:hover {
  background-color: #1e3a8a !important;
  color: #ffffff !important;
}

/* Badges & Accents */
html.dark .bg-blue-50 {
  background-color: rgba(37, 99, 235, 0.2) !important;
  color: #93c5fd !important;
  border-color: rgba(59, 130, 246, 0.3) !important;
}

html.dark .text-blue-700,
html.dark .text-blue-800,
html.dark .text-blue-900 {
  color: #60a5fa !important;
}

html.dark .bg-blue-50\/80 {
  background-color: rgba(30, 58, 138, 0.35) !important;
  border-color: rgba(59, 130, 246, 0.3) !important;
}

/* AdSense Container in Dark Mode */
html.dark .adsense-card {
  background-color: #0f172a;
  border-color: #1e293b;
}

html.dark .adsense-placeholder {
  background: repeating-linear-gradient(
    45deg,
    #0f172a,
    #0f172a 10px,
    #1e293b 10px,
    #1e293b 20px
  );
  border-color: #334155;
}

/* Mobile Navigation Drawer */
html.dark .mobile-nav-drawer {
  background-color: #0f172a;
  color: #f8fafc;
  box-shadow: -4px 0 25px rgba(0, 0, 0, 0.5);
}

/* Custom Scrollbars */
html.dark ::-webkit-scrollbar-track {
  background: #0f172a;
}
html.dark ::-webkit-scrollbar-thumb {
  background: #334155;
}
html.dark ::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Tables & Rows */
html.dark table th {
  color: #94a3b8 !important;
  border-color: #1e293b !important;
}

html.dark table td {
  color: #e2e8f0 !important;
  border-color: #1e293b !important;
}

html.dark table tr:hover {
  background-color: rgba(30, 41, 59, 0.5) !important;
}

/* Educational Reference Section */
html.dark article {
  background-color: #0f172a !important;
  border-color: #1e293b !important;
}

html.dark article header {
  border-color: #1e293b !important;
}

html.dark article section p,
html.dark article section ul {
  color: #cbd5e1 !important;
}

html.dark .bg-blue-50.border-l-4 {
  background-color: rgba(30, 58, 138, 0.25) !important;
  border-color: #3b82f6 !important;
  color: #bfdbfe !important;
}

/* Custom City Modal */
html.dark #custom-city-modal > div {
  background-color: #0f172a !important;
  border-color: #1e293b !important;
  color: #f8fafc !important;
}

html.dark details.faq-accordion[open] {
  background-color: #0f172a;
  border-color: #3b82f6;
}


