/*
  MMHP Cookie-Consent — Banner-Styles v2 (Markus-Feedback 2026-07-07)
  Konzept: abdunkelnder Schleier ueber der ganzen Seite + kompakte Karte
  (statt Vollbreiten-Leiste mit auseinandergezogenen Buttons).
  - Desktop: Karte unten-mittig, max 640px, Buttons als Gruppe in EINER Reihe,
    "Alle akzeptieren" gruen und LETZTER in der Gruppe (kein margin-auto-Abstand mehr).
  - Mobil: Bottom-Sheet, Schleier verdeckt den Rest, Gruen oben in voller Breite.
  Harte rechtliche Grenze bleibt: "Nur notwendige" ist erste Ebene, gleiche
  Buttongroesse/-form; Gewichtung NUR ueber Farbe. Schleier schliesst NICHTS
  per Klick (keine implizite Einwilligung).
  Grund #121211 · Flaeche #1a1a19 · Hairline rgba(255,255,255,.12) · Gruen #c7ff3f
*/

/* Container = Schleier ueber dem Viewport, Karte wird darin positioniert */
.mmhp-cc {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 24px 20px 32px;
  background: rgba(8, 8, 7, 0.55);
  -webkit-backdrop-filter: blur(2.5px);
  backdrop-filter: blur(2.5px);
  color: rgba(255, 255, 255, 0.7);
  font-family: 'Lexend', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 13.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  visibility: hidden;
}
.mmhp-cc.mmhp-cc-open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

/* Reset MUSS vor den Detail-Regeln stehen (gleiche Spezifität wie .mmhp-cc-inner:
   stünde er dahinter, löscht er deren padding wieder — der 07.07.-Randabstand-Bug). */
.mmhp-cc * { margin: 0; padding: 0; box-sizing: border-box; }

/* Karte */
.mmhp-cc-inner {
  position: relative;
  width: 100%;
  max-width: 640px;
  background: #1a1a19;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  padding: clamp(20px, 3vw, 28px) clamp(20px, 3vw, 30px);
  transform: translateY(14px);
  transition: transform 0.3s ease;
}
.mmhp-cc.mmhp-cc-open .mmhp-cc-inner { transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .mmhp-cc { transition: none; }
  .mmhp-cc-inner { transition: none; transform: none; }
}

/* Schliessen-X — nur im dismissible-Modus sichtbar (Wahl liegt bereits vor).
   Beim Erstbesuch verbirgt display:none den Button (muss gewählt werden). */
.mmhp-cc-close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 34px;
  height: 34px;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 24px;
  line-height: 1;
  background: none;
  border: none;
  border-radius: 0;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: color 0.18s ease;
}
.mmhp-cc-dismissible .mmhp-cc-close { display: inline-flex; }
.mmhp-cc-close:hover { color: #f0f0f0; }
.mmhp-cc-close:focus-visible { outline: 1px solid #c7ff3f; outline-offset: 2px; }
/* im dismissible-Modus etwas Platz rechts, damit Titel/Text nicht unter das X laufen */
.mmhp-cc-dismissible .mmhp-cc-title { padding-right: 34px; }

/* Logo-Buehne im Banner (wird per JS eingesetzt, wenn das Logo-Intro im Banner spielt).
   Waehrend der Konstruktion gross + zentriert; danach schrumpft das Logo und
   parkt linksbuendig oberhalb der Texte (Klasse --small, Uebergang via FLIP im JS). */
.mmhp-cc-logo { --accent: #c7ff3f; --ink: #f0f0f0; position: relative; display: flex; justify-content: center; margin: 2px 0 16px; }
.mmhp-cc-logo svg { width: min(320px, 82%); height: auto; overflow: visible; }
.mmhp-cc-logo--small { justify-content: flex-start; margin: 0 0 12px; }
.mmhp-cc-logo--small svg { width: 118px; }
.mmhp-logo-fly { --accent: #c7ff3f; --ink: #f0f0f0; }

.mmhp-cc-title {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.mmhp-cc-text {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.7);
}
.mmhp-cc-text a {
  color: #f0f0f0;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 255, 255, 0.3);
}
.mmhp-cc-text a:hover { text-decoration-color: #f0f0f0; }

/* Kategorien-Detailbereich (Mechanik unveraendert) */
.mmhp-cc-cats {
  display: none;
  margin-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 14px;
  gap: 6px 24px;
  flex-wrap: wrap;
}
.mmhp-cc.mmhp-cc-details .mmhp-cc-cats { display: flex; }

.mmhp-cc-cat {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  padding: 4px 0;
  user-select: none;
}
.mmhp-cc-cat input {
  width: 15px;
  height: 15px;
  accent-color: #c7ff3f;
  cursor: pointer;
  flex: none;
}
.mmhp-cc-cat input:disabled { cursor: default; }
.mmhp-cc-cat input:focus-visible { outline: 1px solid #c7ff3f; outline-offset: 2px; }
.mmhp-cc-cat .mmhp-cc-always {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

/* Buttons: EINE kompakte Gruppe, kein Auseinanderziehen.
   Reihenfolge im DOM: [Nur notwendige] [Einstellungen] [Speichern*] [Alle akzeptieren]
   *Speichern nur in der Detail-Ansicht sichtbar. */
.mmhp-cc-actions {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center; /* Markus 07.07.: Buttons zentriert in der Karte */
}
.mmhp-cc-btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 12px 20px;
  background: transparent;
  color: #f0f0f0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 0;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.mmhp-cc-btn:hover {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.04);
}
.mmhp-cc-btn:focus-visible { outline: 1px solid #c7ff3f; outline-offset: 2px; }

/* "Einstellungen" als ruhiger Link-Button in der Gruppe */
.mmhp-cc-btn--link {
  background: none;
  border-color: transparent;
  font-weight: 500;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: underline;
  text-underline-offset: 3px;
  padding-left: 6px;
  padding-right: 6px;
}
.mmhp-cc-btn--link:hover { color: #f0f0f0; background: none; border-color: transparent; }

/* "Alle akzeptieren": gleiche Groesse/Form/Ebene, Gewicht nur ueber CI-Farbe.
   Steht als LETZTER direkt in der Gruppe (kein margin-left:auto). */
.mmhp-cc-btn--primary {
  background: #c7ff3f;
  color: #0a0a0a;
  border-color: #c7ff3f;
  font-weight: 600;
}
.mmhp-cc-btn--primary:hover { background: #d4ff6b; color: #0a0a0a; border-color: #d4ff6b; }

.mmhp-cc-hidden { display: none; }
.mmhp-cc-cats--hidden { display: none; }

/* Mobil: Bottom-Sheet — Schleier verdeckt den Rest, Karte randlos unten,
   Gruen oben in voller Breite, darunter die zwei ruhigen Optionen nebeneinander. */
@media (max-width: 560px) {
  .mmhp-cc { padding: 0; align-items: flex-end; }
  .mmhp-cc-inner {
    max-width: none;
    border-left: none;
    border-right: none;
    border-bottom: none;
    padding: 22px 20px calc(22px + env(safe-area-inset-bottom, 0px));
  }
  .mmhp-cc-text { font-size: 13px; }
  .mmhp-cc-actions { margin-top: 16px; }
  .mmhp-cc-btn--primary { order: -1; width: 100%; padding: 15px 20px; font-size: 14px; }
  .mmhp-cc-btn { flex: 1 1 auto; text-align: center; }
  .mmhp-cc-btn--link { flex: 0 1 auto; }
}
