/* ---------------------------------------------------------------------------
   Il Forno di Napoli — Dunkles Design („Nacht“), Betreiber 30.11.2026.
   Aktiv, wenn <html data-theme="dark"> gesetzt ist (Umschaltung: resources/views/partials/theme-switch.blade.php).
   Bewusst KEIN Vite-Build: Tailwind v4 schreibt die Markenfarben als CSS-Variablen (--color-*), die hier
   ungeschichtet überschrieben werden (ungeschichtete Regeln gewinnen gegen @layer theme/utilities).
   Linie wie die Instagram-Motive: warmes Schwarz, Rot als Akzent, Creme als Schrift.
--------------------------------------------------------------------------- */

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

    --ifdn-bg: #121010;          /* Seite */
    --ifdn-surface: #1b1817;     /* Karten, Eingabefelder */
    --ifdn-surface-2: #24201e;   /* Hover, dezente Flächen */
    --ifdn-ink: #f3efe6;         /* Schrift (Creme) */
    --ifdn-ink-soft: rgba(243, 239, 230, .78);
    --ifdn-line: rgba(243, 239, 230, .12);

    --color-crema: var(--ifdn-bg);
    --color-crema-dark: var(--ifdn-surface-2);
    --color-nero: var(--ifdn-ink);
    --color-grigio: #a8a29e;
    --color-grigio-light: #2e2a28;
    --color-rosso: #d92b2b;
    --color-rosso-dark: #c41e1e;
    --color-rosso-deep: #fca5a5;     /* Text auf rotem Hinweisgrund */
    --color-oliva-dark: #9ccc85;     /* Text auf grünem Hinweisgrund */

    --shadow-card: 0 1px 3px rgb(0 0 0 / .5), 0 4px 14px rgb(0 0 0 / .35);
    --shadow-card-hover: 0 2px 6px rgb(0 0 0 / .55), 0 10px 28px rgb(0 0 0 / .45);
}

/* Flächen, die im hellen Design weiß sind → dunkle Karte (Schrift-Weiß auf Rot/Schwarz bleibt weiß) */
:root[data-theme="dark"] .bg-white,
:root[data-theme="dark"] .card,
:root[data-theme="dark"] .input { background-color: var(--ifdn-surface); }
:root[data-theme="dark"] .hover\:bg-white:hover { background-color: var(--ifdn-surface-2); }
:root[data-theme="dark"] .bg-white\/90 { background-color: rgb(27 24 23 / .9); }

/* „nero“ ist im hellen Design auch dunkler Hintergrund (Footer, Badges, Overlays) → bleibt dunkel */
:root[data-theme="dark"] .bg-nero { background-color: #080706; }
:root[data-theme="dark"] .bg-nero\/85 { background-color: rgb(0 0 0 / .85); }
:root[data-theme="dark"] .bg-nero\/60 { background-color: rgb(0 0 0 / .6); }
:root[data-theme="dark"] .from-nero\/80 { --tw-gradient-from: rgb(0 0 0 / .8); }
:root[data-theme="dark"] .via-nero\/25 { --tw-gradient-via: rgb(0 0 0 / .25); }

/* „crema“ als Schriftfarbe steht nur auf dunklem Grund (Footer) → bleibt hell */
:root[data-theme="dark"] .text-crema { color: var(--ifdn-ink); }
:root[data-theme="dark"] .text-crema\/90 { color: rgb(243 239 230 / .9); }

/* Kopfzeile: etwas dunkler als die Seite, feine Linie */
:root[data-theme="dark"] header.sticky { background-color: rgb(12 10 10 / .94); border-bottom-color: var(--ifdn-line); }

/* Logo: helle Variante im dunklen Design */
.logo-on-dark { display: none; }
:root[data-theme="dark"] .logo-on-light { display: none; }
:root[data-theme="dark"] .logo-on-dark { display: inline; }

/* Seiteneigene Karten (Startseite, Filialseite, Franchise, Neapolitanische Pizza) mit festen Weiß-Werten */
:root[data-theme="dark"] .hm-faq details,
:root[data-theme="dark"] .hm-answer,
:root[data-theme="dark"] .lp-answer,
:root[data-theme="dark"] .lp-chips span,
:root[data-theme="dark"] .lp-faq details,
:root[data-theme="dark"] .fr-fact,
:root[data-theme="dark"] .fr-step,
:root[data-theme="dark"] .fr-countries span,
:root[data-theme="dark"] .fr-faq details,
:root[data-theme="dark"] .np-fact,
:root[data-theme="dark"] .np-answer,
:root[data-theme="dark"] .np-faq details {
    background: var(--ifdn-surface);
    box-shadow: 0 0 0 1px var(--ifdn-line);
}
:root[data-theme="dark"] .lp-chips span,
:root[data-theme="dark"] .fr-countries span { border-color: var(--ifdn-line); box-shadow: none; }
:root[data-theme="dark"] .hm-faq p,
:root[data-theme="dark"] .lp-faq p,
:root[data-theme="dark"] .lp-dish small,
:root[data-theme="dark"] .fr-fact span,
:root[data-theme="dark"] .fr-faq p,
:root[data-theme="dark"] .np-fact span,
:root[data-theme="dark"] .np-prose p,
:root[data-theme="dark"] .np-faq p { color: var(--ifdn-ink-soft); }
:root[data-theme="dark"] .lp-dish { border-bottom-color: var(--ifdn-line); }

/* Rechtstexte / Fließtext aus dem Panel (HTML aus der Datenbank) */
:root[data-theme="dark"] main a:not([class]) { color: #f87171; }
:root[data-theme="dark"] main hr { border-color: var(--ifdn-line); }

/* Umschalter im Kopf */
.theme-switch { display: inline-flex; align-items: center; gap: .35rem; border-radius: 999px; padding: .45rem .6rem; font-size: .8rem; font-weight: 600; line-height: 1; }
.theme-switch:hover { background: var(--color-crema-dark); }
.theme-switch svg { width: 1.25rem; height: 1.25rem; }
.theme-switch .ts-label { display: none; }
@media (min-width: 640px) { .theme-switch .ts-label { display: inline; } }
