/* ══════════════════════════════════════════════════════════════
   COOKIE-BANNER — zentrale Fassung
   Ausgelagert 2026-09-25 aus index.html. Design unveraendert
   uebernommen; neu ist der gleichwertige Button "Nur notwendige".
   Farbwerte kommen aus dem :root der einbindenden Seite, mit
   Fallback, damit die Datei auf jeder Seite ohne Anpassung laeuft.
   ══════════════════════════════════════════════════════════════ */

.cookie-banner {
  position:fixed;
  bottom:0;
  left:0;
  right:0;
  z-index:999;
  transform:translateY(100%);
  opacity:0;
  transition:transform .5s cubic-bezier(.22,1,.36,1), opacity .5s ease;
  pointer-events:none;
  will-change:transform, opacity;
  font-family:'DM Sans', sans-serif;
}
.cookie-banner.visible {
  transform:translateY(0);
  opacity:1;
  pointer-events:auto;
}
.cookie-banner.hidden {
  transform:translateY(100%);
  opacity:0;
  pointer-events:none;
}
.cookie-inner {
  max-width:820px;
  margin:0 auto 16px;
  padding:20px 28px;
  background:rgba(13,17,23,.82);
  -webkit-backdrop-filter:blur(20px) saturate(1.4);
  backdrop-filter:blur(20px) saturate(1.4);
  border:1px solid rgba(255,255,255,.1);
  border-radius:20px;
  display:flex;
  align-items:center;
  gap:20px;
  box-shadow:0 -4px 40px rgba(0,0,0,.25), 0 0 0 1px rgba(255,255,255,.05) inset;
  margin-left:16px;
  margin-right:16px;
}
.cookie-icon {
  flex-shrink:0;
  width:42px;
  height:42px;
  background:rgba(246,255,123,.12);
  border:1px solid rgba(246,255,123,.2);
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:20px;
}
.cookie-text {
  flex:1;
  min-width:0;
}
.cookie-text p {
  font-size:13px;
  color:rgba(255,255,255,.72);
  line-height:1.55;
  margin:0;
}
.cookie-text a {
  color:var(--teal-l, #73ced0);
  text-decoration:none;
  font-weight:500;
}
.cookie-text a:hover { text-decoration:underline; }

.cookie-actions {
  display:flex;
  align-items:center;
  gap:12px;
  flex-shrink:0;
}

/* Beide Entscheidungs-Buttons sind bewusst identisch gestaltet —
   gleiche Groesse, Farbe, Schrift und Position. Die Einwilligung ist
   nur dann freiwillig, wenn die Ablehnung nicht schwerer zu finden
   oder unauffaelliger ist als die Zustimmung. */
.cookie-btn {
  background:var(--yellow, #f6ff7b);
  color:var(--black, #0d1117);
  font-family:'DM Sans', sans-serif;
  font-size:14px;
  font-weight:700;
  padding:12px 28px;
  border-radius:50px;
  border:none;
  cursor:pointer;
  white-space:nowrap;
  transition:transform .2s ease, box-shadow .2s ease;
  box-shadow:0 4px 16px rgba(246,255,123,.3);
}
.cookie-btn:hover {
  transform:translateY(-1px);
  box-shadow:0 6px 24px rgba(246,255,123,.45);
}
.cookie-btn:focus-visible {
  outline:2px solid #fff;
  outline-offset:2px;
}

.cookie-settings {
  background:none;
  border:none;
  color:rgba(255,255,255,.4);
  font-family:'DM Sans', sans-serif;
  font-size:12px;
  cursor:pointer;
  white-space:nowrap;
  padding:8px 4px;
  transition:color .2s;
}
.cookie-settings:hover { color:rgba(255,255,255,.65); }
.cookie-settings:focus-visible {
  outline:2px solid rgba(255,255,255,.6);
  outline-offset:2px;
  border-radius:4px;
}

/* ── Detail-Panel ── */
.cookie-detail {
  max-height:0;
  overflow:hidden;
  transition:max-height .4s ease, margin .4s ease;
  margin-top:0;
}
.cookie-detail.open {
  max-height:400px;
  margin-top:16px;
}
.cookie-detail-inner {
  border-top:1px solid rgba(255,255,255,.08);
  padding-top:16px;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.cookie-opt {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.cookie-opt-info {
  flex:1;
}
.cookie-opt-title {
  font-size:13px;
  font-weight:600;
  color:rgba(255,255,255,.85);
}
.cookie-opt-desc {
  font-size:11px;
  color:rgba(255,255,255,.4);
  margin-top:2px;
  line-height:1.4;
}
.cookie-toggle {
  position:relative;
  width:40px;
  height:22px;
  flex-shrink:0;
}
.cookie-toggle input {
  opacity:0;
  width:0;
  height:0;
  position:absolute;
}
.cookie-toggle-track {
  position:absolute;
  top:0;right:0;bottom:0;left:0;
  background:rgba(255,255,255,.12);
  border-radius:11px;
  cursor:pointer;
  transition:background .25s ease;
}
.cookie-toggle-track::after {
  content:'';
  position:absolute;
  top:3px;
  left:3px;
  width:16px;
  height:16px;
  background:rgba(255,255,255,.5);
  border-radius:50%;
  transition:transform .25s ease, background .25s ease;
}
.cookie-toggle input:checked + .cookie-toggle-track {
  background:var(--teal, #1f7f95);
}
.cookie-toggle input:checked + .cookie-toggle-track::after {
  transform:translateX(18px);
  background:white;
}
.cookie-toggle input:disabled + .cookie-toggle-track {
  opacity:.5;
  cursor:default;
}
.cookie-toggle input:focus-visible + .cookie-toggle-track {
  outline:2px solid #fff;
  outline-offset:2px;
}
.cookie-detail-actions {
  display:flex;
  gap:10px;
  margin-top:8px;
  justify-content:flex-end;
}
.cookie-save {
  background:var(--teal, #1f7f95);
  color:white;
  font-family:'DM Sans', sans-serif;
  font-size:13px;
  font-weight:600;
  padding:10px 24px;
  border-radius:50px;
  border:none;
  cursor:pointer;
  transition:background .2s;
}
.cookie-save:hover { background:#176d81; }

/* ── Mobil ── */
@media (max-width:600px) {
  .cookie-inner {
    flex-wrap:wrap;
    padding:16px 18px;
    gap:14px;
    border-radius:16px;
    margin-left:10px;
    margin-right:10px;
    margin-bottom:10px;
  }
  .cookie-icon { width:36px; height:36px; font-size:17px; border-radius:10px; }
  .cookie-text { flex-basis:calc(100% - 56px); }
  .cookie-text p { font-size:12px; }
  .cookie-actions {
    width:100%;
    flex-wrap:wrap;
    justify-content:space-between;
  }
  /* Beide Buttons behalten auch mobil dieselbe Breite */
  .cookie-btn { flex:1 1 0; text-align:center; padding:12px 16px; font-size:14px; }
  .cookie-settings { flex-basis:100%; text-align:center; font-size:11px; padding:8px 12px; }
  .cookie-opt { flex-wrap:wrap; gap:6px; }
  .cookie-opt-info { flex-basis:calc(100% - 52px); }
}

@media (prefers-reduced-motion:reduce) {
  .cookie-banner, .cookie-detail, .cookie-btn, .cookie-toggle-track,
  .cookie-toggle-track::after { transition:none; }
}
