/* =========================================================
   COOKIE CONSENT
========================================================= */

.cookie-consent[hidden],
.cookie-consent__settings[hidden],
.cookie-btn[hidden] {
  display: none;
}

.cookie-consent {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: flex;
  align-items: flex-end;
  justify-content: center;

  padding: 1.5rem;

  background: rgba(0, 0, 0, 0.62);
}

.cookie-consent__panel {
  width: min(100%, 920px);
  max-height: calc(100vh - 3rem);
  overflow-y: auto;

  padding: 2rem;

  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;

  background: #111827;
  color: #ffffff;

  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.cookie-consent__panel h2 {
  margin: 0 0 1rem;

  color: #ffffff;

  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.25;
}

.cookie-consent__panel p {
  max-width: 760px;
  margin: 0 0 1.5rem;

  color: rgba(255, 255, 255, 0.82);

  line-height: 1.65;
}

.cookie-consent__settings {
  display: grid;
  gap: 0.75rem;

  margin: 1.5rem 0;
}

.cookie-option {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;

  padding: 1rem;

  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;

  cursor: pointer;
}

.cookie-option input {
  width: 20px;
  height: 20px;
  margin: 0.15rem 0 0;

  flex-shrink: 0;

  accent-color: #ff0098;
}

.cookie-option span {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cookie-option strong {
  color: #ffffff;
}

.cookie-option small {
  color: rgba(255, 255, 255, 0.7);

  font-size: 0.9rem;
  line-height: 1.45;
}

.cookie-consent__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;

  margin-bottom: 1.5rem;
}

.cookie-consent__links a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-consent__links a:hover {
  color: #ff0098;
}

.cookie-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cookie-btn {
  min-height: 48px;
  padding: 0.8rem 1.25rem;

  border: 2px solid transparent;
  border-radius: 9px;

  font: inherit;
  font-weight: 700;

  cursor: pointer;

  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.cookie-btn--primary {
  background: #ff0098;
  color: #ffffff;
}

.cookie-btn--primary:hover {
  background: #d90081;
}

.cookie-btn--secondary {
  border-color: rgba(255, 255, 255, 0.35);

  background: transparent;
  color: #ffffff;
}

.cookie-btn--secondary:hover {
  border-color: #ff0098;
  color: #ff0098;
}

.cookie-btn:focus-visible,
.cookie-consent a:focus-visible,
.cookie-option input:focus-visible,
.cookie-settings-button:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

/* Dauerhafter Link zum erneuten Öffnen */

.cookie-settings-button {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1000;

  padding: 0.65rem 0.9rem;

  border: 1px solid #ff0098;
  border-radius: 8px;

  background: #111827;
  color: #ffffff;

  font: inherit;
  font-size: 0.85rem;

  cursor: pointer;
}

.cookie-settings-button:hover {
  background: #ff0098;
}

@media (max-width: 768px) {
  .cookie-consent {
    align-items: flex-end;
    padding: 0;
  }

  .cookie-consent__panel {
    max-height: 90vh;
    padding: 1.5rem;

    border-radius: 16px 16px 0 0;
  }

  .cookie-consent__actions {
    flex-direction: column;
  }

  .cookie-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-btn,
  .cookie-settings-button {
    transition: none;
  }
}