/* The original Tailwind CSS is shared by imported and generated pages.
   Override light surfaces explicitly; keep white text and dark hero sections. */
html[data-theme="dark"] {
  color-scheme: dark;
  background: #0f1117;
  --background: #0f1117;
  --foreground: #e8eaed;
}
html[data-theme="dark"] body { background: #0f1117; color: #e8eaed; }

/* Surfaces, including translucent cards and pastel badges. */
html[data-theme="dark"] .bg-white { background-color: #16181f !important; }
html[data-theme="dark"] .bg-gray-50 { background-color: #12141a !important; }
html[data-theme="dark"] :is(.bg-gray-100, .bg-gray-200, .bg-slate-100, .bg-zinc-100) { background-color: #1c1f27 !important; }
html[data-theme="dark"] :is(.bg-white\/90, .bg-white\/95) { background-color: rgba(22,24,31,.95) !important; }
html[data-theme="dark"] :is(.bg-red-50, .bg-red-50\/50, .bg-red-100, .bg-red-200) { background-color: #352026 !important; }
html[data-theme="dark"] :is(.bg-amber-50, .bg-amber-100, .bg-yellow-50, .bg-orange-50, .bg-orange-100) { background-color: #33291c !important; }
html[data-theme="dark"] :is(.bg-blue-50, .bg-blue-100, .bg-cyan-100, .bg-indigo-100, .bg-slate-50) { background-color: #1c2b3c !important; }
html[data-theme="dark"] :is(.bg-green-50, .bg-green-100, .bg-emerald-100, .bg-teal-100) { background-color: #19332c !important; }
html[data-theme="dark"] :is(.bg-violet-100, .bg-purple-100, .bg-pink-100) { background-color: #30233d !important; }
/* Legacy glass components have their own white backgrounds and hover rules. */
html[data-theme="dark"] :is(.glass-white-card, .glass-white, .glass-nav-white, .price-tag) {
  background: #1c1f27 !important;
  border-color: #32353e !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.3) !important;
}
html[data-theme="dark"] :is(.glass-white-card, .price-tag):hover {
  background: #252933 !important;
  border-color: #454b58 !important;
  box-shadow: 0 12px 32px rgba(0,0,0,.4) !important;
}

/* Light gradient endpoints otherwise leave entire sections white. */
html[data-theme="dark"] .from-gray-50 { --tw-gradient-from: #12141a !important; }
html[data-theme="dark"] .from-red-50 { --tw-gradient-from: #23191f !important; }
html[data-theme="dark"] .to-white { --tw-gradient-to: #16181f !important; }
html[data-theme="dark"] .to-gray-100 { --tw-gradient-to: #1c1f27 !important; }
html[data-theme="dark"] .to-red-100\/50 { --tw-gradient-to: #352026 !important; }

/* Gray text must stay light on dark sections, including the existing heroes. */
html[data-theme="dark"] :is(.text-gray-900, .text-gray-800, .text-black) { color: #e8eaed !important; }
html[data-theme="dark"] .text-gray-700 { color: #c5cad3 !important; }
html[data-theme="dark"] :is(.text-gray-600, .text-slate-600, .text-zinc-600) { color: #b5bbc7 !important; }
html[data-theme="dark"] .text-gray-500 { color: #a8aebb !important; }
html[data-theme="dark"] .text-gray-400 { color: #9ca3b2 !important; }
html[data-theme="dark"] .text-gray-300 { color: #d1d5db !important; }
html[data-theme="dark"] :is(.text-gray-200, .text-gray-100) { color: #e5e7eb !important; }
html[data-theme="dark"] :is(.text-red-600, .text-red-700, .text-red-800, .text-red-900, .text-red-800\/60) { color: #fca5a5 !important; }
html[data-theme="dark"] :is(.text-amber-600, .text-amber-700, .text-amber-800, .text-amber-800\/70, .text-amber-900, .text-yellow-700, .text-yellow-800, .text-yellow-900, .text-orange-600, .text-orange-700) { color: #fcd084 !important; }
html[data-theme="dark"] :is(.text-blue-600, .text-blue-700, .text-blue-800, .text-cyan-600, .text-indigo-600) { color: #93c5fd !important; }
html[data-theme="dark"] :is(.text-green-600, .text-green-700, .text-green-800, .text-emerald-600, .text-teal-600) { color: #86efac !important; }
html[data-theme="dark"] :is(.text-purple-600, .text-violet-600, .text-pink-600) { color: #d8b4fe !important; }

html[data-theme="dark"] :is(.border-gray-50, .border-gray-100, .border-gray-200, .border-gray-300) { border-color: #32353e !important; }
html[data-theme="dark"] :is(.hover\:bg-gray-50, .hover\:bg-gray-100, .hover\:bg-gray-200, .hover\:bg-white):hover { background-color: #23262f !important; }
html[data-theme="dark"] :is(.hover\:bg-red-50, .hover\:bg-red-100):hover { background-color: #44252d !important; }
html[data-theme="dark"] .hover\:text-red-600:hover { color: #fca5a5 !important; }
html[data-theme="dark"] .hover\:text-gray-900:hover { color: #fff !important; }
html[data-theme="dark"] .active\:bg-gray-200:active { background-color: #32353e !important; }

html[data-theme="dark"] :is(input, textarea, select) { background-color: #1c1f27 !important; border-color: #32353e !important; color: #e8eaed !important; }
html[data-theme="dark"] :is(input, textarea)::placeholder { color: #9ca3b2 !important; }
html[data-theme="dark"] nav.sticky { background-color: rgba(15,17,23,.97) !important; backdrop-filter: blur(8px); }
html[data-theme="dark"] .shadow-sm { box-shadow: 0 1px 2px rgba(0,0,0,.4) !important; }
html[data-theme="dark"] .shadow-md { box-shadow: 0 4px 8px rgba(0,0,0,.4) !important; }
html[data-theme="dark"] :is(.shadow-lg, .shadow-xl, .shadow-2xl) { box-shadow: 0 16px 32px rgba(0,0,0,.45) !important; }

/* Widgets use their own CSS rather than Tailwind utilities. */
html[data-theme="dark"] :is(.zb-drawer .pn, .zb-drawer .pn .hd, .zb-contact-pop, .zb-chat, .zb-m.bot, .zb-q button) { background: #16181f; border-color: #32353e; color: #e8eaed; }
html[data-theme="dark"] :is(.zb-drawer .pn a, .zb-drawer .hd-t, .zb-drawer .x, .zb-contact-pop>a, .zb-cp-row, .zb-cp-row b, .zb-contact-pop>a b, .zb-cp-body a) { color: #e8eaed; border-color: #32353e; }
html[data-theme="dark"] .zb-drawer .zb-dtel { background: #dc2626; color: #fff; }
html[data-theme="dark"] :is(.zb-ch-msgs, .zb-ch-ft, .zb-cp-body a) { background: #12141a; border-color: #32353e; }
html[data-theme="dark"] :is(.zb-ch-in, .zb-ch-contact, .zb-cp-mess) { border-color: #32353e; }
html[data-theme="dark"] :is(.zb-faq-a p, .zb-consent, .zb-ch-contact label) { color: #b5bbc7; }
html[data-theme="dark"] .zb-msg { color: #86efac; }
html[data-theme="dark"] .zb-msg.err { color: #fca5a5; }
html[data-theme="dark"] .zb-booking-dialog {
  --booking-surface: #16181f;
  --booking-text: #e8eaed;
  --booking-line: #32353e;
  --booking-hover: #23262f;
  --booking-accent: #fca5a5;
}
html[data-theme="dark"] .zb-q button { color: #fca5a5; }
html[data-theme="dark"] .zb-q button:hover { background: #352026; }
html[data-theme="dark"] .zb-cp-body a:hover { background: #352026; color: #fca5a5; }
html[data-theme="dark"] .zb-blog-img img { box-shadow: 0 4px 12px rgba(0,0,0,.5); }
/* The original phone/mail bitmaps contain black strokes. */
html[data-theme="dark"] nav.sticky img:is([src="/icon-phone.png"], [src="/icon-mail.png"]) { filter: invert(1); }

/* One shared, non-shrinking toggle is visible on desktop and mobile. */
.zb-header-brand { min-width: 0; }
.zb-header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.zb-theme-toggle { display: inline-flex; flex: 0 0 44px; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border-radius: 12px; border: 0; background: transparent; cursor: pointer; color: #4b5563; }
.zb-theme-toggle:hover { background: #f3f4f6; color: #dc2626; }
.zb-theme-toggle:focus-visible { outline: 2px solid #ef4444; outline-offset: 2px; }
.zb-theme-toggle svg { width: 22px; height: 22px; }
html[data-theme="dark"] .zb-theme-toggle { color: #e8eaed; }
html[data-theme="dark"] .zb-theme-toggle:hover { background: #23262f; color: #fca5a5; }
.zb-theme-toggle .icon-moon { display: block; }
.zb-theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .zb-theme-toggle .icon-moon { display: none; }
html[data-theme="dark"] .zb-theme-toggle .icon-sun { display: block; }
#zb-burger { flex-shrink: 0; margin: 0; }
.zb-header-contacts a { flex-shrink: 0; }
@media (max-width: 639px) {
  .zb-header-row { display: grid; grid-template-columns: minmax(0,1fr) 44px 44px; gap: 4px; height: auto; min-height: 56px; }
  .zb-header-brand { grid-column: 1; grid-row: 1; }
  .zb-header-actions { display: contents; }
  .zb-header-row .zb-theme-toggle { grid-column: 2; grid-row: 1; }
  .zb-header-row #zb-burger { grid-column: 3; grid-row: 1; }
  .zb-header-contacts { grid-column: 1 / -1; grid-row: 2; justify-content: center; gap: 12px; padding-bottom: 6px; }
  .zb-header-contacts a { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; }
  section[id] { scroll-margin-top: 108px; }
}
@media (prefers-reduced-motion: no-preference) {
  html.theme-transitioning, html.theme-transitioning body, html.theme-transitioning * { transition: background-color .25s ease, color .25s ease, border-color .25s ease !important; }
}
html[data-theme="dark"] ::-webkit-scrollbar { background: #0f1117; }
html[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #32353e; border-radius: 4px; }
