/* Ganache Guru – Schalter und Korrekturen für das helle Design
 * Das helle Design ist das Grunddesign der Seite; css/gg-theme-dark.css wird im hellen Modus ausgeblendet.
 * Diese Datei ist immer geladen: der Schalter-Stil gilt in beiden Modi, alle übrigen Regeln
 * greifen nur bei <html data-theme="light">.
 */

/* ===================================================================== Schalter (beide Modi) */
.gg-theme-toggle {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px; padding: 0; margin: 0 4px 0 0;
  border-radius: 50%;
  border: 1px solid rgba(166,124,90,.45);
  background: transparent;
  color: var(--dark, #3B2B1C);
  cursor: pointer;
  font-size: 1.1rem; line-height: 1;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
  align-self: center;
}
.gg-theme-toggle:hover { background: rgba(166,124,90,.16); border-color: var(--secondary, #A67C5A); }
.gg-theme-toggle:focus-visible { outline: 2px solid var(--secondary, #A67C5A); outline-offset: 2px; }
.gg-theme-toggle i { pointer-events: none; }
html:not([data-theme="light"]) .gg-theme-toggle { color: #EDD4BA; border-color: oklch(0.62 0.07 68 / .45); }
html:not([data-theme="light"]) .gg-theme-toggle:hover { background: oklch(0.80 0.105 76 / .12); border-color: oklch(0.80 0.105 76 / .7); }
@media (max-width: 640px) {
  .gg-theme-toggle { width: 34px; height: 34px; font-size: 1rem; margin-right: 0; }
}

/* ===================================================================== heller Modus */
/* Variablen, die im hellen Grunddesign fehlen (werden sonst nur von gg-theme-dark.css gesetzt) */
html[data-theme="light"] {
  --gg-light-field: #fffaf0;
  --gg-light-line: rgba(166,124,90,.38);
  --gg-light-gold: #b8843f;
  --gg-gold: #b8843f;
  --gg-gold-deep: #9a6a2c;
  --gg-ink: #3B2B1C;
  --gg-muted: rgba(59,43,28,.68);
  --gg-line: rgba(166,124,90,.28);
  --gg-line-2: rgba(166,124,90,.42);
}

/* ---- Abgrenzung der Bereiche (Gegenstück zum dunklen Design) */
html[data-theme="light"] main .section {
  border: 1px solid transparent !important;
  background:
    linear-gradient(160deg, #fbf3dc, #f3e6c4) padding-box,
    linear-gradient(135deg, rgba(255,255,255,.95) 0%, rgba(184,132,63,.30) 16%, rgba(166,124,90,.22) 40%,
                    rgba(166,124,90,.20) 62%, rgba(184,132,63,.32) 88%, rgba(255,255,255,.75) 100%) border-box !important;
  box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 10px 28px rgba(108,76,45,.16) !important;
  margin-bottom: 40px !important;
}
html[data-theme="light"] main .section > .section-title {
  border-bottom: 1px solid transparent !important;
  border-image: linear-gradient(90deg, rgba(184,132,63,.85), rgba(184,132,63,.2) 55%, transparent) 1 !important;
  padding-bottom: 12px !important;
  margin-bottom: 18px !important;
}
html[data-theme="light"] main .section > .section-title > i {
  display: inline-grid; place-items: center;
  width: 34px !important; height: 34px !important; border-radius: 50%;
  background: rgba(184,132,63,.16);
  box-shadow: 0 0 0 1px rgba(184,132,63,.40) inset;
  font-size: 1.05rem !important;
  color: #9a6a2c !important;
}
@media (max-width: 640px) {
  html[data-theme="light"] main .section { margin-bottom: 22px !important; }
  html[data-theme="light"] main .section > .section-title { border-image: linear-gradient(90deg, transparent, rgba(184,132,63,.8) 50%, transparent) 1 !important; }
}

/* ---- Füllungen/Schichten: Leiste war fest fast schwarz */
html[data-theme="light"] .filling-manager {
  background: rgba(255,255,255,.55) !important;
  border: 1px solid var(--gg-light-line) !important;
}
html[data-theme="light"] .filling-manager .filling-manager-label { color: var(--primary, #6C4B2D) !important; }
html[data-theme="light"] .filling-chip:not(.active) { background: #fffaf0 !important; color: var(--dark, #3B2B1C) !important; border-color: var(--gg-light-line) !important; }
html[data-theme="light"] .filling-chip:not(.active) * { color: var(--dark, #3B2B1C) !important; }
html[data-theme="light"] .filling-chip.active, html[data-theme="light"] .filling-chip.active * { color: #FDF7E5 !important; }

/* ---- Konsistenz-Balken: heller Untergrund statt schwarz */
html[data-theme="light"] .gg-consistency-track { background: #efe1c0 !important; }
html[data-theme="light"] .gg-consistency-track::before { border-color: rgba(166,124,90,.45) !important; }
html[data-theme="light"] #gg-consistency-line svg > rect:first-child { fill: #dcc69c !important; } /* Restlinie (sonst fest Dunkelbraun) */

/* ---- Messwert-Anzeigen (aw, Haltbarkeit, pH, Brix): helles Feld, dunkle Ziffern */
html[data-theme="light"] .gg-calculation-value {
  background: var(--gg-light-field) !important;
  border-color: var(--gg-light-line) !important;
  color: var(--primary, #6C4B2D) !important;
}
html[data-theme="light"] .gg-calculation-value :is(span, output, input, i) { color: var(--primary, #6C4B2D) !important; }
html[data-theme="light"] .gg-calculation-value i { color: var(--secondary, #A67C5A) !important; }

/* ---- Bewertungsringe: Prozentwert im Ring (fest Hellgold) lesbar machen */
html[data-theme="light"] .charts-container .pie svg text { fill: #6C4B2D !important; }

/* ---- Einzelne Texte/Schaltflächen */
html[data-theme="light"] #gg-analysis-alerts-note { color: rgba(59,43,28,.7) !important; }
html[data-theme="light"] #toggle-recipe-form,
html[data-theme="light"] #toggle-recipe-form * { color: #FDF7E5 !important; }

/* ---- Fußzeile: bleibt in beiden Modi dunkel (Layout stammt aus gg-theme-dark.css) */
html[data-theme="light"] footer {
  --gg-bg: #1c1410; --gg-ink: #EDE3D0; --gg-muted: #bfae96; --gg-gold: #e5b46e;
  --gg-line: rgba(237,212,186,.16); --gg-line-2: rgba(237,212,186,.24);
  background: var(--gg-bg) !important; color: var(--gg-ink) !important;
  padding: 36px 0 0 !important; margin-top: 22px !important; border-top: 1px solid var(--gg-line-2) !important;
}
html[data-theme="light"] footer::before { display: none !important; }
html[data-theme="light"] footer .top { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; margin-bottom: 16px; }
html[data-theme="light"] footer .brand { display: flex; align-items: center; gap: 12px; }
html[data-theme="light"] footer .brand .logo-mark { flex: none; width: 40px; height: 40px; background: #EDD4BA;
  -webkit-mask: url('../photo/Logo_GG1.svg') no-repeat center/contain; mask: url('../photo/Logo_GG1.svg') no-repeat center/contain; }
html[data-theme="light"] footer .brand .wordmark { font-family: 'SemplicitaPro-neu', serif; font-size: 1.18rem; letter-spacing: .18em; text-transform: uppercase; color: #EDD4BA; line-height: 1; }
html[data-theme="light"] footer .tag { color: var(--gg-muted) !important; max-width: 34ch; font-size: .92rem; }
html[data-theme="light"] footer .links { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: .86rem; }
html[data-theme="light"] footer .links a { color: var(--gg-muted) !important; text-decoration: none !important; transition: color .25s; }
html[data-theme="light"] footer .links a span { color: inherit !important; }
html[data-theme="light"] footer .links a:hover { color: var(--gg-gold) !important; }
html[data-theme="light"] footer .bottom { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center;
  padding-top: 12px; border-top: 1px solid var(--gg-line); color: var(--gg-muted) !important; font-size: .82rem; }
html[data-theme="light"] footer .bottom > span { color: var(--gg-muted) !important; }
html[data-theme="light"] footer .gg-copyright { cursor: pointer; transition: color .25s; }
html[data-theme="light"] footer .gg-copyright:hover, html[data-theme="light"] footer .gg-copyright:hover * { color: var(--gg-gold) !important; }
html[data-theme="light"] footer .social { display: flex; gap: 14px; }
html[data-theme="light"] footer .social a { width: 38px; height: 38px; border: 1px solid var(--gg-line-2); border-radius: 50%; display: grid; place-items: center; color: var(--gg-muted); transition: border-color .25s, color .25s; }
html[data-theme="light"] footer .social a:hover { border-color: var(--gg-gold); color: var(--gg-gold); }
html[data-theme="light"] footer :is(p, span, small, div) { color: inherit; }
/* ---- Schalter Wasserphase/Fettphase: fester dunkler Hintergrund (inline) -> helle Schrift */
html[data-theme="light"] :is(#gg-toggle-waterphase, #gg-toggle-fatphase),
html[data-theme="light"] :is(#gg-toggle-waterphase, #gg-toggle-fatphase) * { color: #FDF7E5 !important; }

/* ---- Kopfzeile: gleiche Typografie und Maße wie im dunklen Design (nur die Farben sind hell),
        damit beim Umschalten nichts springt. Die Handy-Größen kommen aus css/gg-mobile.css. */
html[data-theme="light"] header .navbar { align-items: center !important; }
html[data-theme="light"] header .nav-links { align-items: center; }
html[data-theme="light"] header .logo h1,
html[data-theme="light"] header .logo .gg-wordmark {
  font-family: 'SemplicitaPro-neu', serif !important;
  font-weight: 400 !important;
  text-transform: uppercase !important;
  line-height: 1 !important;
  color: var(--primary, #6C4B2D) !important;
}
html[data-theme="light"] header .logo_flipbox { width: 40px !important; height: 40px !important; }
html[data-theme="light"] header .logo_flipbox img { width: 40px !important; height: 40px !important; }
html[data-theme="light"] header .nav-links a {
  text-transform: uppercase; letter-spacing: .14em; font-size: .82rem;
}
html[data-theme="light"] header .lang-switcher .lang-btn {
  text-transform: uppercase; letter-spacing: .1em; font-size: .82rem;
  border: none !important; background: transparent !important; box-shadow: none !important;
}
html[data-theme="light"] header .btnAm {
  border: 1px solid transparent !important;
  font-weight: 500 !important; font-size: .82rem !important;
  letter-spacing: .12em !important; text-transform: uppercase !important;
}
/* Größen/Abstände nur am Desktop erzwingen; am Handy gelten für beide Modi die Regeln aus gg-mobile.css */
@media (min-width: 641px) {
  html[data-theme="light"] header .navbar { padding: 16px 0 !important; }
  html[data-theme="light"] header .nav-links { margin-top: 0 !important; }
  html[data-theme="light"] header .logo h1,
  html[data-theme="light"] header .logo .gg-wordmark { font-size: 1.18rem !important; letter-spacing: .18em !important; }
  html[data-theme="light"] header .lang-switcher .lang-btn { padding: .4rem .2rem !important; }
  html[data-theme="light"] header .btnAm { padding: 5px 20px !important; }
}
@media (max-width: 640px) {
  html[data-theme="light"] header .logo_flipbox,
  html[data-theme="light"] header .logo_flipbox img { width: 32px !important; height: 32px !important; }
}

/* sehr schmale Telefone: Schalter etwas kleiner (beide Modi) */
@media (max-width: 374px) {
  .gg-theme-toggle { width: 30px !important; height: 30px !important; font-size: .92rem !important; }
}
@media (max-width: 350px) {
  /* Platz für Schalter, Sprache und Anmelden: Wortmarke ausblenden, das Logo-Emblem bleibt */
  header .logo .gg-wordmark { display: none !important; }
}

/* ---- Aufklappmenüs an den Bereichsüberschriften (Zutat erfassen, Zusammenfassung drucken):
        Hintergrund nutzt Variablen des dunklen Designs, die im hellen Modus fehlen -> war durchsichtig */
html[data-theme="light"] .section-title .uk-inline > .uk-dropdown,
html[data-theme="light"] .section-title .uk-inline > [uk-dropdown] {
  background: linear-gradient(135deg, #fffaf0, #f6ead0) !important;
  border: 1px solid rgba(166,124,90,.45) !important;
  box-shadow: 0 14px 34px rgba(108,76,45,.22) !important;
  color: var(--dark, #3B2B1C) !important;
}

/* ---- Süßkraft-Ring in der Berechnung: Wert im Ring dunkel (fest Hellgold) */
html[data-theme="light"] .gg-sweetness-pie svg text { fill: #6C4B2D !important; }
