/* Cookie Consent - Sierbach Konfigurator */

/* Overlay - pointer-events: none wenn ausgeblendet, damit 3D-Konfigurator nutzbar bleibt */
/* z-index 99999: über Loading-Screen (9999), Anfrage-Formular (10000), Sidebar etc. – wichtig für Handy */
.cookie-consent-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh; /* Mobile Safari: volle Höhe bei dynamischer Browser-UI */
  background: rgba(0, 0, 0, 0.5);
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s, visibility 0.3s;
}

.cookie-consent-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Popup Container - zentriert */
/* z-index 100000: über Overlay, damit Popup immer sichtbar */
.cookie-consent-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  width: calc(100% - 40px);
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* iOS: flüssiges Scrollen */
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  z-index: 100000;
  transform: translate(-50%, -50%) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
  font-family: "Inter", "Roboto", "Open Sans", Helvetica, Arial, sans-serif;
}

.cookie-consent-popup.active {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}

/* Popup Content */
.cookie-consent-content {
  padding: 24px;
}

.cookie-consent-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 12px;
}

.cookie-consent-text {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #444;
  margin-bottom: 20px;
}

.cookie-consent-text a {
  color: #003A5D;
  text-decoration: underline;
}

.cookie-consent-text a:hover {
  color: #005a8a;
}

/* Buttons */
.cookie-consent-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.cookie-consent-btn {
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.cookie-consent-btn-accept {
  background: #003A5D;
  color: #fff;
  border: none;
}

.cookie-consent-btn-accept:hover {
  background: #004a73;
}

.cookie-consent-btn-configure {
  background: transparent;
  color: #003A5D;
  border: 2px solid #003A5D;
}

.cookie-consent-btn-configure:hover {
  background: rgba(0, 58, 93, 0.08);
}

.cookie-consent-btn-decline {
  background: transparent;
  color: #888;
  border: none;
  font-size: 0.85rem;
  text-decoration: underline;
}

.cookie-consent-btn-decline:hover {
  color: #555;
}

/* Footer Links */
.cookie-consent-footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #eee;
  font-size: 0.85rem;
}

.cookie-consent-footer a {
  color: #003A5D;
  text-decoration: none;
}

.cookie-consent-footer a:hover {
  text-decoration: underline;
}

.cookie-consent-footer a:not(:last-child)::after {
  content: " | ";
  color: #999;
  margin: 0 4px;
}

/* Configure Panel (erweitert) */
.cookie-consent-configure {
  display: none;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.cookie-consent-configure.active {
  display: block;
}

.cookie-consent-configure-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: #333;
}

.cookie-consent-detail {
  font-size: 0.85rem;
  color: #555;
  line-height: 1.5;
  margin-bottom: 16px;
}

.cookie-consent-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.cookie-consent-checkbox input {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.cookie-consent-checkbox label {
  font-size: 0.9rem;
  cursor: pointer;
}

.cookie-consent-btn-apply {
  margin-top: 12px;
  background: #003A5D;
  color: #fff;
  border: none;
}

.cookie-consent-btn-apply:hover {
  background: #004a73;
}

/* Ablehnen nur im Konfigurieren-Panel, untergeordnet unter Auswahl übernehmen */
.cookie-consent-configure .cookie-consent-btn-decline {
  display: block;
  margin-top: 12px;
  font-size: 0.85rem;
  padding: 4px 0;
  border: none;
  background: transparent;
  color: #888;
  text-decoration: underline;
}

.cookie-consent-configure .cookie-consent-btn-decline:hover {
  color: #555;
  background: transparent;
}

/* Responsive - Handy */
@media (max-width: 480px) {
  .cookie-consent-overlay,
  .cookie-consent-popup {
    /* Sicherstellen, dass auf Handy immer sichtbar (über Sidebar, Formular, Loading) */
    z-index: 99999;
  }
  .cookie-consent-popup {
    z-index: 100000;
    width: calc(100% - 24px);
    max-height: 85vh;
  }

  .cookie-consent-content {
    padding: 18px;
  }

  .cookie-consent-btn-accept,
  .cookie-consent-btn-configure {
    width: 100%;
    justify-content: center;
  }
}
