/* ==========================================================================
   Cookie-Banner – Preisacher (K&P2-Cookie-Kit, dunkle Fassung)
   Nutzt die Variablen aus css/site.css.
   ========================================================================== */

#cookie-banner-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(10, 8, 14, .55);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  z-index: 9998;
}
#cookie-banner-overlay.show { display: block; }

#cookie-banner {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 9999;
  max-height: 90vh; overflow-y: auto;
  background: var(--bg-2, #1d1a24);
  color: var(--text, #adadb6);
  font-family: var(--sans, sans-serif);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .45);
}
#cookie-banner.show { display: block; animation: cookieSlideUp .45s cubic-bezier(.22,.9,.28,1); }
@keyframes cookieSlideUp { from { transform: translateY(100%); } to { transform: none; } }

.cookie-content { max-width: 1200px; margin: 0 auto; padding: 2.2rem clamp(1.25rem, 4vw, 3rem); }

.cookie-header h2 {
  font-family: var(--serif, serif); font-style: italic; font-weight: 400;
  color: var(--white, #f8f8ff); font-size: 1.5rem; line-height: 1.2; margin-bottom: .7rem;
}
.cookie-header p { font-size: .9rem; line-height: 1.55; max-width: 46rem; margin-bottom: 1.6rem; }

/* Kategorien */
#cookie-categories { display: none; margin: 0 0 1.6rem; }
#cookie-categories.show { display: block; }
.cookie-category { padding: 1rem 0; }
.cookie-category + .cookie-category { position: relative; }
.cookie-category + .cookie-category::before {
  content: ""; position: absolute; top: 0; left: 0; width: 48px; height: 1px; background: rgba(248,248,255,.14);
}
.cookie-category-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .35rem; }
.cookie-category-title { color: var(--white, #f8f8ff); font-size: .95rem; }
.cookie-category-desc { font-size: .82rem; line-height: 1.5; max-width: 44rem; }

/* Schalter */
.cookie-toggle { position: relative; flex: 0 0 auto; width: 44px; height: 22px; }
.cookie-toggle input { opacity: 0; width: 0; height: 0; }
.cookie-slider {
  position: absolute; inset: 0; cursor: pointer; border-radius: 22px;
  background: rgba(248,248,255,.16); transition: background-color .3s;
}
.cookie-slider::before {
  content: ""; position: absolute; width: 16px; height: 16px; left: 3px; bottom: 3px;
  border-radius: 50%; background: var(--white, #f8f8ff); transition: transform .3s;
}
.cookie-toggle input:checked + .cookie-slider { background: var(--red, #b00a0e); }
.cookie-toggle input:checked + .cookie-slider::before { transform: translateX(22px); }
.cookie-toggle input:disabled + .cookie-slider { background: rgba(176,10,14,.55); cursor: not-allowed; }
.cookie-toggle input:focus-visible + .cookie-slider { outline: 2px solid var(--white, #f8f8ff); outline-offset: 2px; }

/* Buttons – Ablehnen gleichwertig zu Akzeptieren */
.cookie-actions { display: flex; gap: .8rem; flex-wrap: wrap; align-items: center; }
.cc-btn {
  font-family: var(--sans, sans-serif); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase;
  padding: .95em 1.8em; border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  min-width: 11rem; transition: background-color .3s, color .3s, border-color .3s;
}
.cc-btn-primary { background: var(--white, #f8f8ff); color: var(--bg, #16131c); }
.cc-btn-primary:hover { background: #fff; }
.cc-btn-reject { background: transparent; color: var(--white, #f8f8ff); border-color: rgba(248,248,255,.55); }
.cc-btn-reject:hover { border-color: var(--white, #f8f8ff); }
.cc-btn-text { background: none; border: 0; min-width: 0; padding-inline: .4em; color: var(--text, #adadb6); text-decoration: underline; text-underline-offset: 4px; }
.cc-btn-text:hover { color: var(--white, #f8f8ff); }
#save-preferences { margin-top: .8rem; }

.cookie-privacy-links { margin-top: 1.4rem; font-size: .75rem; }
.cookie-privacy-links a { color: var(--text, #adadb6); }
.cookie-privacy-links a:hover { color: var(--white, #f8f8ff); }

/* Widerruf: „Cookies“ mit Fingerabdruck in der Rechtliches-Zeile des Footers */
.footer-cookie {
  display: inline;                 /* gleiche Grundlinie wie die Textlinks daneben */
  background: none; border: 0; padding: 0; margin: 0; cursor: pointer;
  font: inherit; line-height: inherit; letter-spacing: inherit; text-transform: inherit;
  color: var(--muted, #7d7c87); transition: color .3s;
}
.footer-cookie:hover { color: var(--white, #f8f8ff); }
.footer-cookie__icon { display: inline-block; width: 1.15em; height: 1.15em; vertical-align: -0.22em; margin-right: .4em; }

@media (max-width: 640px) {
  .cookie-actions { flex-direction: column; align-items: stretch; }
  .cc-btn { width: 100%; }
  .cc-btn-text { text-align: center; }
}
@media print { #cookie-banner, #cookie-banner-overlay { display: none !important; } }
