/* ============================================================
   Cookie-Consent Banner & Modal — DSGVO / TTDSG-konform
   - "Akzeptieren" und "Ablehnen" gleichwertig auf 1. Ebene
   - keine vorausgewählten optionalen Kategorien
   - jederzeit widerrufbar über Footer-Link
   ============================================================ */

.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 999;
  background: #fff; border-top: 3px solid var(--hsnr-blue, #305088);
  box-shadow: 0 -4px 20px rgba(48, 80, 136, 0.16);
  animation: cc-slideUp 280ms ease-out;
}
@keyframes cc-slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.cookie-banner__container {
  max-width: 1160px; margin: 0 auto; padding: 24px 56px;
  display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center;
}
.cookie-banner__title { margin: 0 0 8px; font-size: 18px; font-weight: 700; color: var(--hsnr-blue, #305088); }
.cookie-banner__text { margin: 0; font-size: 14px; line-height: 1.55; color: var(--fg-2, #4a4a4a); }
.cookie-banner__text a, .cookie-banner__link {
  color: var(--hsnr-blue, #305088); text-decoration: underline; cursor: pointer;
  background: none; border: none; padding: 0; font: inherit;
}
.cookie-banner__text a:hover, .cookie-banner__link:hover { color: var(--hsnr-cyan, #5098d0); }

.cookie-banner__actions { display: flex; flex-direction: column; gap: 10px; flex-shrink: 0; min-width: 220px; }
.cookie-banner__row { display: flex; gap: 10px; }
.cookie-banner__row .cookie-btn { flex: 1; }

.cookie-btn {
  padding: 12px 20px; font-size: 14px; font-weight: 700; border-radius: 2px;
  border: 1.5px solid var(--hsnr-blue, #305088); cursor: pointer;
  transition: background 120ms ease, color 120ms ease; white-space: nowrap; font-family: inherit;
}
/* Akzeptieren und Ablehnen: gleichwertig, gleiche Größe/Gewichtung */
.cookie-btn--accept { background: var(--hsnr-blue, #305088); color: #fff; }
.cookie-btn--accept:hover { background: var(--hsnr-cyan, #5098d0); border-color: var(--hsnr-cyan, #5098d0); }
.cookie-btn--reject { background: var(--hsnr-blue, #305088); color: #fff; }
.cookie-btn--reject:hover { background: var(--hsnr-cyan, #5098d0); border-color: var(--hsnr-cyan, #5098d0); }
.cookie-btn--settings { background: #fff; color: var(--hsnr-blue, #305088); }
.cookie-btn--settings:hover { background: var(--hsnr-blue-05, #f1f4f8); }

/* ========== Modal ========== */
.cookie-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.cookie-modal__overlay { position: absolute; inset: 0; background: rgba(20, 34, 60, 0.55); cursor: pointer; }
.cookie-modal__content {
  position: relative; z-index: 1001; background: #fff; border-radius: 4px;
  max-width: 620px; width: 100%; max-height: 90vh; display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(20, 34, 60, 0.35); animation: cc-pop 240ms ease-out;
}
@keyframes cc-pop { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
.cookie-modal__header { padding: 24px 28px; border-bottom: 1px solid var(--border, #d8d8d8); display: flex; align-items: center; justify-content: space-between; }
.cookie-modal__header h2 { margin: 0; font-size: 20px; font-weight: 700; color: var(--hsnr-blue, #305088); }
.cookie-modal__close { background: none; border: none; font-size: 26px; line-height: 1; cursor: pointer; color: var(--fg-2, #4a4a4a); width: 32px; height: 32px; }
.cookie-modal__close:hover { color: var(--hsnr-blue, #305088); }
.cookie-modal__intro { font-size: 14px; line-height: 1.6; color: var(--fg-2, #4a4a4a); margin: 0 0 20px; }
.cookie-modal__body { padding: 24px 28px; overflow-y: auto; }
.cookie-modal__footer { padding: 20px 28px; border-top: 1px solid var(--border, #d8d8d8); display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-modal__footer .cookie-btn { flex: 1; min-width: 150px; }

.cookie-category { border: 1px solid var(--border, #d8d8d8); border-radius: 2px; padding: 18px 20px; margin-bottom: 14px; }
.cookie-category__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cookie-category__title { margin: 0; font-size: 16px; font-weight: 700; color: var(--hsnr-blue, #305088); }
.cookie-category__desc { margin: 8px 0 0; font-size: 13px; line-height: 1.6; color: var(--fg-2, #4a4a4a); }
.cookie-category__detail { margin: 10px 0 0; font-size: 12px; line-height: 1.6; color: var(--fg-2, #4a4a4a); }
.cookie-category__detail strong { color: var(--hsnr-blue, #305088); }

/* Toggle switch */
.cookie-switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.cookie-switch input { opacity: 0; width: 0; height: 0; }
.cookie-switch__slider { position: absolute; inset: 0; background: #c1cad9; border-radius: 999px; transition: background 160ms ease; cursor: pointer; }
.cookie-switch__slider::before { content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform 160ms ease; }
.cookie-switch input:checked + .cookie-switch__slider { background: var(--hsnr-blue, #305088); }
.cookie-switch input:checked + .cookie-switch__slider::before { transform: translateX(20px); }
.cookie-switch input:disabled + .cookie-switch__slider { background: var(--hsnr-cyan, #5098d0); opacity: 0.6; cursor: not-allowed; }

.cookie-tag { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--hsnr-cyan, #5098d0); }

/* Footer revoke link */
.cookie-revoke { background: none; border: none; padding: 0; font: inherit; cursor: pointer; }

/* Accessibility */
.cookie-btn:focus-visible, .cookie-modal__close:focus-visible, .cookie-banner__link:focus-visible,
.cookie-switch input:focus-visible + .cookie-switch__slider {
  outline: 2px solid var(--hsnr-cyan, #5098d0); outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .cookie-banner, .cookie-modal__content { animation: none; }
}

@media (max-width: 768px) {
  .cookie-banner__container { grid-template-columns: 1fr; padding: 20px 28px; gap: 18px; }
  .cookie-banner__actions { min-width: 0; }
  .cookie-modal__footer .cookie-btn { flex-basis: 100%; }
}
@media print { .cookie-banner, .cookie-modal { display: none !important; } }
