/* ── Cookie-Banner (unten fixiert) ── */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: 1rem 0 1.25rem;
  background: var(--nx);
  border-top: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, .25);
  transform: translateY(0);
  transition: transform .4s var(--e), opacity .35s ease;
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner.is-leaving {
  transform: translateY(110%);
  opacity: 0;
  pointer-events: none;
}

.cookie-banner__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}

.cookie-banner__text {
  flex: 1 1 280px;
  margin: 0;
  font-size: .82rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, .72);
  max-width: 640px;
}

.cookie-banner__text a {
  color: var(--og);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner__text a:hover {
  color: #fff;
}

.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  flex-shrink: 0;
}

.cookie-btn {
  font-family: var(--f);
  font-size: .78rem;
  font-weight: 600;
  padding: .55rem 1rem;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  transition: background .25s, color .25s, transform .2s;
}

.cookie-btn:focus-visible {
  outline: 2px solid var(--og);
  outline-offset: 2px;
}

.cookie-btn--primary {
  background: var(--or);
  color: #fff;
}

.cookie-btn--primary:hover {
  background: var(--od);
}

.cookie-btn--ghost {
  background: transparent;
  color: rgba(255, 255, 255, .85);
  border: 1px solid rgba(255, 255, 255, .22);
}

.cookie-btn--ghost:hover {
  border-color: var(--og);
  color: var(--og);
}

.cookie-btn--link {
  background: transparent;
  color: var(--tmu);
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: .55rem .35rem;
}

.cookie-btn--link:hover {
  color: var(--og);
}

/* ── Modal ── */

.cookie-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 210;
  background: rgba(15, 31, 48, .65);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s;
}

.cookie-modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.cookie-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 220;
  width: min(100% - 2rem, 440px);
  max-height: min(90vh, 560px);
  overflow-y: auto;
  padding: 1.5rem 1.35rem;
  background: var(--w);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .2);
  transform: translate(-50%, -50%) scale(.96);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, transform .3s var(--e), visibility .3s;
}

.cookie-modal.is-open {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.cookie-modal[hidden] {
  display: none;
}

.cookie-modal__title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--nd);
  margin: 0 0 .35rem;
  letter-spacing: -.02em;
}

.cookie-modal__intro {
  font-size: .8rem;
  color: var(--tm);
  line-height: 1.6;
  margin: 0 0 1.25rem;
}

.cookie-category {
  padding: .85rem 0;
  border-top: 1px solid rgba(0, 0, 0, .06);
}

.cookie-category:first-of-type {
  border-top: none;
  padding-top: 0;
}

.cookie-category__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .35rem;
}

.cookie-category__name {
  font-size: .84rem;
  font-weight: 700;
  color: var(--nd);
}

.cookie-category__desc {
  font-size: .74rem;
  color: var(--tl);
  line-height: 1.55;
  margin: 0;
}

/* Toggle switch */

.cookie-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.cookie-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-switch__track {
  position: absolute;
  inset: 0;
  background: var(--sl);
  border-radius: 100px;
  transition: background .25s;
  cursor: pointer;
}

.cookie-switch__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
  transition: transform .25s var(--e);
}

.cookie-switch input:checked + .cookie-switch__track {
  background: var(--or);
}

.cookie-switch input:checked + .cookie-switch__track .cookie-switch__thumb {
  transform: translateX(20px);
}

.cookie-switch input:disabled + .cookie-switch__track {
  opacity: .55;
  cursor: not-allowed;
}

.cookie-switch input:focus-visible + .cookie-switch__track {
  outline: 2px solid var(--or);
  outline-offset: 2px;
}

.cookie-modal__footer {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, .06);
}

.cookie-modal__footer .cookie-btn--primary {
  flex: 1 1 auto;
  min-width: 120px;
}

.cookie-modal__close {
  position: absolute;
  top: .75rem;
  right: .75rem;
  width: 36px;
  height: 36px;
  border: none;
  background: var(--sp);
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--tm);
  transition: background .2s, color .2s;
}

.cookie-modal__close:hover {
  background: var(--sl);
  color: var(--nd);
}

.cookie-modal__close:focus-visible {
  outline: 2px solid var(--or);
  outline-offset: 2px;
}

/* Footer link – gleiche Optik wie Impressum */

.footer-legal .cookie-settings-trigger {
  color: rgba(255, 255, 255, .22);
  background: none;
  border: none;
  font: inherit;
  font-size: .72rem;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
}

.footer-legal .cookie-settings-trigger:hover {
  color: rgba(255, 255, 255, .45);
}

.footer-legal .cookie-settings-trigger:focus-visible {
  outline: 2px solid var(--og);
  outline-offset: 2px;
  border-radius: 2px;
}

@media (max-width: 600px) {
  .cookie-banner__actions {
    width: 100%;
  }

  .cookie-banner__actions .cookie-btn {
    flex: 1 1 calc(50% - .25rem);
    justify-content: center;
  }
}
