/* =============================================================
   GDPR Cookie Consent — Bootstrap 5 kompatibles CSS
   ============================================================= */

/* --- Variablen (Bootstrap-kompatibel) ----------------------- */
:root {
  --cookie-bg: #222425;
  --cookie-bg-modal: #212529;
  --cookie-border: rgba(255,255,255,0.08);
  --cookie-text: #e9ecef;
  --cookie-text-muted: #adb5bd;
  --cookie-accent: #0d6efd;
  --cookie-accent-hover: #0b5ed7;
  --cookie-success: #198754;
  --cookie-radius: 12px;
  --cookie-shadow: 0 -4px 32px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.06);
  --cookie-banner-z: 1055;
  --cookie-fab-z: 1040;
}

/* --- Banner -------------------------------------------------- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--cookie-banner-z);
  background: var(--cookie-bg);
  border-top: 1px solid var(--cookie-border);
  box-shadow: var(--cookie-shadow);
  padding: 1rem 0;
  animation: cookieBannerSlideUp 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes cookieBannerSlideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.cookie-banner__inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.cookie-banner__icon {
  color: #ffc107;
  flex-shrink: 0;
  display: flex;
}

.cookie-banner__content {
  flex: 1;
  min-width: 200px;
}

.cookie-banner__title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--cookie-text);
  margin: 0;
}

.cookie-banner__text {
  font-size: 0.82rem;
  color: var(--cookie-text-muted);
  line-height: 1.5;
}

.cookie-banner__link {
  color: var(--cookie-accent);
  text-decoration: none;
}
.cookie-banner__link:hover {
  text-decoration: underline;
}

.cookie-banner__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

/* --- Buttons ------------------------------------------------- */
.cookie-btn {
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.45rem 1rem;
  border-radius: 8px;
  white-space: nowrap;
  transition: all 0.18s ease;
  line-height: 1.4;
}

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

.cookie-btn--secondary {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
  color: var(--cookie-text);
}
.cookie-btn--secondary:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.25);
  color: #fff;
}

.cookie-btn--outline {
  background: transparent;
  border-color: rgba(255,255,255,0.25);
  color: var(--cookie-text-muted);
}
.cookie-btn--outline:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.4);
  color: var(--cookie-text);
}

.cookie-btn--outline-dark {
  background: transparent;
  border-color: #dee2e6;
  color: #6c757d;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.45rem 1rem;
  border-radius: 8px;
}
.cookie-btn--outline-dark:hover {
  background: #f8f9fa;
  color: #212529;
}

.cookie-btn--save {
  background: var(--cookie-success);
  border-color: var(--cookie-success);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 1.2rem;
  border-radius: 8px;
}
.cookie-btn--save:hover {
  background: #157347;
  border-color: #146c43;
  color: #fff;
}

/* --- Modal --------------------------------------------------- */

.cookie-modal__header .modal-title {
  font-size: 1rem;
  font-weight: 600;
}

.cookie-modal__icon {
  color: #ffc107;
}

.cookie-modal__intro {
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.cookie-modal__privacy-link {
  font-size: 0.8rem;
  color: var(--cookie-text-muted);
  text-decoration: none;
}
.cookie-modal__privacy-link:hover {
  color: var(--cookie-accent);
  text-decoration: underline;
}

/* --- Category Cards ----------------------------------------- */
.cookie-category {
  padding: 0.75rem 0;
}

.cookie-category__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.cookie-category__name {
  font-size: 0.9rem;
  font-weight: 600;
}

.cookie-category__badge {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.2em 0.55em;
  border-radius: 4px;
  margin-left: 0.5rem;
  vertical-align: middle;
}

.cookie-category__badge--required {
  background: rgba(25, 135, 84, 0.2);
  color: #75c798;
  border: 1px solid rgba(25, 135, 84, 0.3);
}

.cookie-category__desc {
  font-size: 0.8rem;
  line-height: 1.55;
  margin: 0;
}

.cookie-divider {
  border-color: var(--cookie-border);
  margin: 0.25rem 0;
}

/* --- Toggle Switch ------------------------------------------ */
.cookie-switch .form-check-input {
  width: 2.4em;
  height: 1.25em;
  cursor: pointer;
  background-color: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.2);
  transition: background-color 0.2s, border-color 0.2s;
}

.cookie-switch .form-check-input:checked {
  background-color: var(--cookie-accent);
  border-color: var(--cookie-accent);
}

.cookie-switch--disabled .form-check-input {
  background-color: rgba(25, 135, 84, 0.5) !important;
  border-color: rgba(25, 135, 84, 0.6) !important;
  cursor: not-allowed;
  opacity: 0.8;
}

.cookie-switch .form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* --- Floating Settings Button ------------------------------- */
.cookie-settings-btn {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  z-index: var(--cookie-fab-z);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(30,34,40,0.9);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--cookie-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.cookie-settings-btn:hover {
  background: rgba(13, 110, 253, 0.85);
  border-color: rgba(13, 110, 253, 0.5);
  color: #fff;
  transform: scale(1.08);
}

/* --- Responsive --------------------------------------------- */
@media (max-width: 768px) {
  .cookie-banner__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.875rem;
  }

  .cookie-banner__icon {
    display: none;
  }

  .cookie-banner__actions {
    width: 100%;
    justify-content: stretch;
  }

  .cookie-banner__actions .cookie-btn {
    flex: 1;
    text-align: center;
    font-size: 0.78rem;
    padding: 0.5rem 0.5rem;
  }

  .cookie-modal__footer {
    justify-content: stretch;
  }

  .cookie-modal__footer .cookie-btn {
    flex: 1;
    text-align: center;
  }

  .cookie-modal__privacy-link {
    width: 100%;
    text-align: center;
    margin-bottom: 0.5rem;
  }
}

/* --- Banner ausblenden nach Consent (JS-gesteuert) ---------- */
.cookie-banner.cookie-banner--hidden {
  animation: cookieBannerSlideDown 0.3s cubic-bezier(0.55, 0, 1, 0.45) forwards;
}

@keyframes cookieBannerSlideDown {
  from { transform: translateY(0);    opacity: 1; }
  to   { transform: translateY(100%); opacity: 0; }
}