/* Local dark-mode candidate. All existing-site overrides are opt-in. */
html[data-andre-theme="dark"] {
  color-scheme: dark;
  --andre-dark-bg: #202225;
  --andre-dark-surface: #282b2f;
  --andre-dark-raised: #303338;
  --andre-dark-ink: #f4f1e9;
  --andre-dark-muted: #b5b7bd;
  --andre-dark-line: #42454b;
  --andre-dark-gold: #d4af37; /* Existing main-site gold, unchanged. */
  background-color: var(--andre-dark-bg);
}
html[data-andre-theme="dark"] body,
html[data-andre-theme="dark"] [data-testid="home-page"] {
  background-color: var(--andre-dark-bg);
  color: var(--andre-dark-ink);
}

/* Utility colours are overridden individually; photos and image overlays are untouched. */
html[data-andre-theme="dark"] .bg-white,
html[data-andre-theme="dark"] .bg-gray-50,
html[data-andre-theme="dark"] .bg-spa-soft-gray {
  background-color: var(--andre-dark-surface);
}
html[data-andre-theme="dark"] [data-testid="home-page"].bg-white,
html[data-andre-theme="dark"] #services,
html[data-andre-theme="dark"] #booking,
html[data-andre-theme="dark"] #payment,
html[data-andre-theme="dark"] .reviews {
  background-color: var(--andre-dark-bg);
}
html[data-andre-theme="dark"] .bg-spa-soft-green,
html[data-andre-theme="dark"] .bg-green-50 {
  background-color: var(--andre-dark-raised);
}
html[data-andre-theme="dark"] :is(.text-spa-dark,.text-spa-black),
html[data-andre-theme="dark"] [class~="text-[#171717]"],
html[data-andre-theme="dark"] [class~="text-[#1a1a1a]"],
html[data-andre-theme="dark"] [class~="text-[#232323]"],
html[data-andre-theme="dark"] [class~="text-[#333]"] {
  color: var(--andre-dark-ink);
}
html[data-andre-theme="dark"] :is(.text-gray-400,.text-gray-500,.text-gray-600),
html[data-andre-theme="dark"] [class~="text-[#4b5563]"],
html[data-andre-theme="dark"] [class~="text-[#555]"],
html[data-andre-theme="dark"] [class~="text-[#6f675f]"] {
  color: var(--andre-dark-muted);
}
html[data-andre-theme="dark"] :is(.border-gray-50,.border-gray-100,.border-gray-200,.border-gray-300,.border-green-100) {
  border-color: var(--andre-dark-line);
}

/* Header, expanded mobile navigation and logo. Black contact bar stays black. */
html[data-andre-theme="dark"] [data-testid="main-header"],
html[data-andre-theme="dark"] .andre-theme-header {
  background-color: rgb(40 43 47 / 96%);
  border-bottom-color: var(--andre-dark-line);
  box-shadow: 0 2px 12px rgb(0 0 0 / 14%);
}
html[data-andre-theme="dark"] [data-testid="header-logo"] .text-spa-black {
  color: var(--andre-dark-ink);
}
html[data-andre-theme="dark"] :is(button,a)[class~="hover:bg-gray-50"]:hover,
html[data-andre-theme="dark"] :is(button,a)[class~="hover:bg-spa-soft-gray"]:hover {
  background-color: var(--andre-dark-raised);
}
html[data-andre-theme="dark"] :is(button,a)[class~="hover:text-spa-gold"]:hover,
html[data-andre-theme="dark"] :is(button,a)[class~="hover:text-spa-gold-dark"]:hover {
  color: var(--andre-dark-gold);
}
html[data-andre-theme="dark"] :is(button,a).bg-spa-gold,
html[data-andre-theme="dark"] :is(button,a)[class~="bg-[#d4af37]"] {
  color: #171717;
}

/* Care cards, service cards, the about panel and payments. */
html[data-andre-theme="dark"] .care-benefits {
  background-color: var(--andre-dark-surface);
}
html[data-andre-theme="dark"] .care-benefits__card {
  background-color: var(--andre-dark-raised);
  border-color: var(--andre-dark-line);
  box-shadow: 0 8px 24px rgb(0 0 0 / 12%);
}
html[data-andre-theme="dark"] :is(.care-benefits__title,.care-benefits__card h3) {
  color: var(--andre-dark-ink);
}
html[data-andre-theme="dark"] .care-benefits__card p {
  color: var(--andre-dark-muted);
}
html[data-andre-theme="dark"] #services .bg-white,
html[data-andre-theme="dark"] [data-testid^="payment-method-"] {
  background-color: var(--andre-dark-surface);
  box-shadow: 0 6px 18px rgb(0 0 0 / 12%);
}
html[data-andre-theme="dark"] .profile-image {
  background-color: var(--andre-dark-surface);
  box-shadow: 0 12px 32px rgb(0 0 0 / 20%);
}

/* Main-page form and native dropdown options. Checkbox/WhatsApp accents remain. */
html[data-andre-theme="dark"] :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea) {
  color: var(--andre-dark-ink);
  background-color: var(--andre-dark-surface);
  border-color: var(--andre-dark-line);
  caret-color: var(--andre-dark-gold);
}
html[data-andre-theme="dark"] :is(input,textarea)::placeholder {
  color: #a7a9b0;
  opacity: 1;
}
html[data-andre-theme="dark"] select option {
  color: var(--andre-dark-ink);
  background-color: var(--andre-dark-surface);
}
html[data-andre-theme="dark"] :is(input,select,textarea):focus {
  border-color: var(--andre-dark-gold);
}
html[data-andre-theme="dark"] [data-testid="booking-form"] .bg-gray-50 {
  background-color: var(--andre-dark-raised);
}

/* Existing custom review components use fixed colours rather than utility classes. */
html[data-andre-theme="dark"] .review-card {
  color: var(--andre-dark-ink);
  background-color: var(--andre-dark-surface);
  border-color: var(--andre-dark-line);
  box-shadow: 0 8px 24px rgb(0 0 0 / 15%);
}
html[data-andre-theme="dark"] .review-card h3 {
  color: var(--andre-dark-ink);
}
html[data-andre-theme="dark"] :is(.review-card>p,.review-card__header span) {
  color: var(--andre-dark-muted);
}
html[data-andre-theme="dark"] .reviews__arrow,
html[data-andre-theme="dark"] .reviews__google-link {
  color: var(--andre-dark-ink);
  background-color: var(--andre-dark-surface);
}
html[data-andre-theme="dark"] .reviews__arrow {
  border-color: var(--andre-dark-line);
}
html[data-andre-theme="dark"] .reviews__arrow:hover,
html[data-andre-theme="dark"] .reviews__google-link:hover,
html[data-andre-theme="dark"] .reviews__google-link:focus-visible {
  background-color: #d4b459; /* Existing review-button gold. */
  color: #171717;
}

/* Public procedure popup; keep its original photograph and gold option borders. */
html[data-andre-theme="dark"] .procedure-modal__dialog {
  color: var(--andre-dark-ink);
  background-color: var(--andre-dark-surface);
  box-shadow: 0 18px 48px rgb(0 0 0 / 42%);
}
html[data-andre-theme="dark"] .procedure-modal__dialog h2,
html[data-andre-theme="dark"] .procedure-modal__options button {
  color: var(--andre-dark-ink);
}
html[data-andre-theme="dark"] :is(.procedure-modal__subtitle,.procedure-modal__description,.procedure-modal__close) {
  color: var(--andre-dark-muted);
}
html[data-andre-theme="dark"] .procedure-modal__options button:hover {
  background-color: #d4b459;
  color: #171717;
}
html[data-andre-theme="dark"] .procedure-modal__close:hover {
  color: var(--andre-dark-gold);
}

/* New control only: neutral in light mode and consistent with the existing header. */
.andre-theme-toggle {
  display: inline-flex;
  flex: none;
  width: 36px;
  height: 36px;
  min-width: 36px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #ded8c8;
  border-radius: 50%;
  background: transparent;
  color: #665f4f;
  cursor: pointer;
  vertical-align: middle;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .18s ease,border-color .18s ease,color .18s ease;
}
.andre-theme-toggle svg { width: 19px; height: 19px; display: block; flex: none; }
.andre-theme-toggle:hover { background: #f7f3e8; border-color: #c9b879; color: #22201a; }
.andre-theme-toggle:focus-visible { outline: 2px solid #d4af37; outline-offset: 3px; }
html[data-andre-theme="dark"] .andre-theme-toggle {
  background-color: var(--andre-dark-surface);
  border-color: var(--andre-dark-line);
  color: var(--andre-dark-ink);
}
html[data-andre-theme="dark"] .andre-theme-toggle:hover {
  background-color: var(--andre-dark-raised);
  border-color: var(--andre-dark-gold);
}
@media (prefers-reduced-motion: reduce) {
  .andre-theme-toggle { transition: none; }
}

/* The added control shares the existing language row without wrapping at 320px. */
@media (max-width: 420px) {
  [data-testid="main-header"] > div { padding-inline: 12px; }
  [data-testid="main-header"] [data-testid="header-actions"] { gap: 4px; }
  [data-testid="main-header"] [data-testid="language-switcher"] {
    flex-wrap: nowrap;
    gap: 2px;
    white-space: nowrap;
  }
  [data-testid="main-header"] [data-testid="language-switcher"] > [data-testid^="lang-"] {
    flex: none;
    padding-inline: 5px;
    font-size: 11px;
  }
  [data-testid="main-header"] .andre-theme-toggle {
    width: 30px;
    height: 30px;
    min-width: 30px;
  }
  [data-testid="main-header"] .andre-theme-toggle svg { width: 17px; height: 17px; }
  [data-testid="main-header"] [data-testid="mobile-menu-toggle"] {
    flex: none;
    width: 28px;
    margin-inline-start: 0;
    padding: 4px;
  }
}
@media (max-width: 360px) {
  [data-testid="main-header"] [data-testid="header-logo"] h1 { font-size: 22px; }
}
/* Keep the header comfortable on small laptops with the added theme control. */
@media (min-width: 1024px) and (max-width: 1199px) {
  [data-testid="main-header"] [data-testid="desktop-nav"] { display: none; }
  [data-testid="main-header"] [data-testid="mobile-menu-toggle"] { display: inline-flex; }
  [data-testid="main-header"] [data-testid="mobile-nav"] { display: block; }
}
html[data-andre-theme="dark"] :is(button,a)[class~="hover:bg-gray-100"]:hover {
  background-color: var(--andre-dark-raised);
}

/* Preserve WhatsApp's original green over the shared grey social-link classes. */
html[data-andre-theme] a[data-andre-wa="footer"],
html[data-andre-theme] a[data-andre-wa="top"],
html[data-andre-theme] a[data-andre-wa="footer"]:is(:hover,:focus-visible),
html[data-andre-theme] a[data-andre-wa="top"]:is(:hover,:focus-visible) {
  color: #25d366;
}
