/**
 * DAXBERGER COOKIE CONSENT BANNER
 * DSGVO-konform, Daxberger-Branding
 * Kategorien: Notwendig, Statistik, Marketing
 */

/* ===================================
   BANNER OVERLAY
   =================================== */
.cookie-consent-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.cookie-consent-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* ===================================
   BANNER (Bottom Bar)
   =================================== */
.cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #ffffff;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  border-top: 3px solid #f39c12;
  padding: 0;
  transform: translateY(100%);
  transition: transform 0.4s ease;
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

.cookie-consent-banner.hidden {
  transform: translateY(100%);
  pointer-events: none;
}

.cookie-consent-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 30px;
}

/* ===================================
   BANNER TEXT
   =================================== */
.cookie-consent-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.cookie-consent-header h3 {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #2c3e50;
  margin: 0;
}

.cookie-consent-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.cookie-consent-text {
  font-size: 0.875rem;
  line-height: 1.6;
  color: #555;
  margin: 0 0 16px 0;
}

.cookie-consent-text a {
  color: #f39c12;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.cookie-consent-text a:hover {
  color: #e67e22;
}

/* ===================================
   BUTTONS ROW
   =================================== */
.cookie-consent-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.cookie-btn {
  border: none;
  cursor: pointer;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 22px;
  border-radius: 4px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

/* Alle akzeptieren - Primary */
.cookie-btn--accept-all {
  background: #f39c12;
  color: #fff;
}

.cookie-btn--accept-all:hover {
  background: #e67e22;
  box-shadow: 0 2px 8px rgba(243, 156, 18, 0.4);
}

/* Nur notwendige */
.cookie-btn--reject {
  background: transparent;
  color: #2c3e50;
  border: 2px solid #bdc3c7;
}

.cookie-btn--reject:hover {
  border-color: #2c3e50;
  background: rgba(44, 62, 80, 0.05);
}

/* Einstellungen */
.cookie-btn--settings {
  background: transparent;
  color: #7f8c8d;
  border: none;
  padding: 10px 14px;
  text-decoration: underline;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.cookie-btn--settings:hover {
  color: #2c3e50;
}

/* ===================================
   SETTINGS PANEL (Detail-Ansicht)
   =================================== */
.cookie-settings-panel {
  display: none;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #ecf0f1;
}

.cookie-settings-panel.open {
  display: block;
}

.cookie-settings-title {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #2c3e50;
  margin: 0 0 14px 0;
}

/* Category Row */
.cookie-category {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #f5f5f5;
}

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

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

.cookie-category-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #2c3e50;
  margin: 0 0 4px 0;
}

.cookie-category-desc {
  font-size: 0.8rem;
  color: #7f8c8d;
  margin: 0;
  line-height: 1.5;
}

/* Toggle Switch */
.cookie-toggle {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 24px;
  margin-top: 2px;
}

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

.cookie-toggle-slider {
  position: absolute;
  inset: 0;
  background: #bdc3c7;
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.cookie-toggle-slider::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
  background: #f39c12;
}

.cookie-toggle input:checked + .cookie-toggle-slider::before {
  transform: translateX(20px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
  background: #95a5a6;
  cursor: not-allowed;
  opacity: 0.7;
}

.cookie-toggle input:disabled:checked + .cookie-toggle-slider {
  background: #27ae60;
}

/* Save Settings Button */
.cookie-settings-save {
  margin-top: 16px;
  display: flex;
  gap: 10px;
}

/* ===================================
   MODAL (for openCookieSettings)
   =================================== */
.cookie-consent-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  z-index: 10000;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  border-top: 3px solid #f39c12;
  max-width: 560px;
  width: 92%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 30px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.cookie-consent-modal.active {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.cookie-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: #7f8c8d;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.2s ease;
}

.cookie-modal-close:hover {
  color: #2c3e50;
}

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 768px) {
  .cookie-consent-inner {
    padding: 20px 16px;
  }

  .cookie-consent-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-btn {
    text-align: center;
    padding: 12px 18px;
  }

  .cookie-btn--settings {
    text-align: center;
  }

  .cookie-consent-modal {
    width: 95%;
    padding: 20px;
    max-height: 90vh;
  }

  .cookie-category {
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .cookie-consent-header h3 {
    font-size: 1rem;
  }

  .cookie-consent-text {
    font-size: 0.8rem;
  }
}
