/* ===================== CONSENT BANNER ===================== */

/* Banner Container */
.consent-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;

  padding: 0;
  background: transparent;

  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  transition: transform 0.3s ease, opacity 0.3s ease, visibility 0s;
}

.consent-banner--hidden {
  transform: translateY(100%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.3s ease, opacity 0.3s ease, visibility 0s 0.3s;
}

.consent-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
}

.consent-banner-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 20px;

  padding: 18px 22px;
  border-radius: 20px;

  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);

  border: 1px solid rgba(11, 12, 16, 0.08);
  box-shadow:
    0 -4px 24px rgba(0, 0, 0, 0.08),
    0 -1px 4px rgba(0, 0, 0, 0.04);
}

.consent-banner-text {
  display: grid;
  gap: 6px;
}

.consent-banner-title {
  font-size: 1rem;
  font-weight: 900;
  color: rgba(11, 12, 16, 0.92);
  margin: 0;
}

.consent-banner-desc {
  font-size: 0.85rem;
  font-weight: 400;
  color: rgba(11, 12, 16, 0.5);
  line-height: 1.45;
  margin: 0;
}

.consent-banner-desc a {
  color: rgba(11, 12, 16, 0.5);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.consent-banner-desc a:hover {
  color: rgba(11, 12, 16, 0.7);
}

.consent-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.consent-banner-actions .consent-btn--primary,
.consent-banner-actions .consent-btn--secondary {
  min-width: 160px;
  text-align: center;
}

/* Buttons */
.consent-btn {
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.consent-btn:hover {
  transform: translateY(-1px);
}

.consent-btn:active {
  transform: translateY(0);
}

/* Primary: dark, prominent */
.consent-btn--primary {
  background: rgba(11, 12, 16, 0.92);
  color: #fff;
  padding: 12px 22px;
  font-size: 0.9rem;
}

.consent-btn--primary:hover {
  background: rgba(11, 12, 16, 1);
}

/* Secondary: slightly lighter fill, still readable */
.consent-btn--secondary {
  background: rgba(11, 12, 16, 0.06);
  color: rgba(11, 12, 16, 0.75);
  padding: 12px 22px;
  font-size: 0.9rem;
}

.consent-btn--secondary:hover {
  background: rgba(11, 12, 16, 0.1);
  color: rgba(11, 12, 16, 0.9);
}

/* Ghost: "Einstellungen" — subtle text */
.consent-btn--ghost {
  background: transparent;
  color: rgba(11, 12, 16, 0.45);
  padding: 12px 14px;
  font-size: 0.82rem;
  font-weight: 600;
}

.consent-btn--ghost:hover {
  color: rgba(11, 12, 16, 0.65);
  transform: none;
}

/* Save: modal "Auswahl speichern" — lighter fill than primary */
.consent-btn--save {
  background: rgba(11, 12, 16, 0.08);
  color: rgba(11, 12, 16, 0.7);
  padding: 12px 22px;
  font-size: 0.9rem;
}

.consent-btn--save:hover {
  background: rgba(11, 12, 16, 0.12);
  color: rgba(11, 12, 16, 0.85);
}

/* Mobile */
@media (max-width: 768px) {
  .consent-banner-inner {
    padding: 12px;
  }

  .consent-banner-card {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px 18px;
    border-radius: 18px;
  }

  .consent-banner-actions {
    width: 100%;
  }

  .consent-btn--primary,
  .consent-btn--secondary {
    flex: 1;
    text-align: center;
  }

  .consent-btn--ghost {
    padding: 8px 12px;
    font-size: 0.75rem;
  }
}


/* ===================== CONSENT MODAL (Settings) ===================== */

.consent-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;

  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease, visibility 0s;
}

.consent-modal--hidden {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0s 0.25s;
}

.consent-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.consent-modal-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;

  background: #fff;
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);

  animation: consentModalIn 0.3s ease;
}

@keyframes consentModalIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.consent-modal--hidden .consent-modal-card {
  animation: none;
}

.consent-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(11, 12, 16, 0.08);
}

.consent-modal-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: rgba(11, 12, 16, 0.92);
  margin: 0;
}

.consent-modal-close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(11, 12, 16, 0.06);
  color: rgba(11, 12, 16, 0.6);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.consent-modal-close:hover {
  background: rgba(11, 12, 16, 0.1);
  color: rgba(11, 12, 16, 0.9);
}

.consent-modal-body {
  padding: 20px 24px;
}

.consent-modal-intro {
  font-size: 0.92rem;
  color: rgba(11, 12, 16, 0.7);
  line-height: 1.55;
  margin: 0 0 20px;
}

.consent-category {
  padding: 16px 0;
  border-bottom: 1px solid rgba(11, 12, 16, 0.06);
}

.consent-category:last-child {
  border-bottom: none;
}

.consent-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.consent-category-info {
  flex: 1;
}

.consent-category-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: rgba(11, 12, 16, 0.9);
  margin: 0 0 4px;
}

.consent-category-desc {
  font-size: 0.85rem;
  color: rgba(11, 12, 16, 0.6);
  line-height: 1.45;
  margin: 0;
}

/* Toggle Switch */
.consent-toggle {
  position: relative;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
}

.consent-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.consent-toggle-track {
  position: absolute;
  inset: 0;
  background: rgba(11, 12, 16, 0.15);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.consent-toggle input:checked + .consent-toggle-track {
  background: #22c55e;
}

.consent-toggle input:disabled + .consent-toggle-track {
  background: rgba(11, 12, 16, 0.08);
  cursor: not-allowed;
}

.consent-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease;
  pointer-events: none;
}

.consent-toggle input:checked ~ .consent-toggle-thumb {
  transform: translateX(20px);
}

.consent-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-left: 8px;
}

.consent-badge--required {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}

/* Modal footer: accept prominent, save subtle */
.consent-modal-footer {
  display: flex;
  gap: 10px;
  padding: 16px 24px 20px;
  border-top: 1px solid rgba(11, 12, 16, 0.08);
  align-items: center;
}

.consent-modal-footer .consent-btn--primary,
.consent-modal-footer .consent-btn--save {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
}

/* Body lock when modal open */
body.consent-modal-open {
  overflow: hidden;
}

/* Mobile adjustments */
@media (max-width: 560px) {
  .consent-modal {
    padding: 12px;
    align-items: flex-end;
  }

  .consent-modal-card {
    max-height: 85vh;
    border-radius: 20px 20px 0 0;
  }

  .consent-modal-header,
  .consent-modal-body,
  .consent-modal-footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .consent-modal-footer {
    flex-direction: column;
  }

  .consent-modal-footer .consent-btn--primary {
    width: 100%;
  }

  .consent-modal-footer .consent-btn--save {
    width: 100%;
  }
}


/* ===================== FOOTER CONSENT LINK ===================== */

.footer-consent-link {
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-consent-link:hover {
  opacity: 0.8;
}
