/* ==========================================================
   Cookie-Consent — Styling (Sander Dickkopp CI)
   DSGVO + TDDDG konform
   ========================================================== */

/* --- Overlay (optional, nicht blockierend) --- */
.sd-cc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 26, 0.25);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.sd-cc-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* --- Banner (Layer 1) --- */
.sd-cc-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #ffffff;
  border-top: 1px solid #E8E8E8;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
  padding: 24px;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  font-family: Inter, 'Inter Fallback', sans-serif;
}
.sd-cc-banner.visible {
  transform: translateY(0);
}

.sd-cc-inner {
  max-width: 960px;
  margin: 0 auto;
}

.sd-cc-title {
  font-family: 'Outfit', 'Outfit Fallback', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: #1A1A1A;
  margin-bottom: 8px;
}

.sd-cc-text {
  font-size: 0.875rem;
  line-height: 1.6;
  color: #505050;
  margin-bottom: 20px;
}
.sd-cc-text a {
  color: #5B5490;
  text-decoration: underline;
}
.sd-cc-text a:hover {
  color: #1A1A1A;
}

/* --- Buttons (Layer 1) --- */
.sd-cc-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.sd-cc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  padding: 12px 24px;
  font-family: 'Outfit', 'Outfit Fallback', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: 8px;
  border: 2px solid #1A1A1A;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: center;
}

/* Beide Buttons gleich: dunkler Rahmen, weiß */
.sd-cc-btn-accept,
.sd-cc-btn-reject {
  background: #1A1A1A;
  color: #ffffff;
  border-color: #1A1A1A;
}
.sd-cc-btn-accept:hover,
.sd-cc-btn-reject:hover {
  background: #35F297;
  border-color: #35F297;
  color: #1A1A1A;
}

.sd-cc-btn-settings {
  background: transparent;
  color: #1A1A1A;
  border-color: #E8E8E8;
  min-width: 140px;
}
.sd-cc-btn-settings:hover {
  border-color: #5B5490;
  color: #5B5490;
}

/* --- Detail-Layer (Layer 2) --- */
.sd-cc-details {
  display: none;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #E8E8E8;
}
.sd-cc-details.open {
  display: block;
}

.sd-cc-category {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid #F9F8F6;
}
.sd-cc-category:last-child {
  border-bottom: none;
}

.sd-cc-cat-info {
  flex: 1;
}

.sd-cc-cat-label {
  font-family: 'Outfit', 'Outfit Fallback', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: #1A1A1A;
  margin-bottom: 2px;
}

.sd-cc-cat-desc {
  font-size: 0.8rem;
  color: #8A8A8A;
  line-height: 1.5;
}

/* --- Toggle-Switch --- */
.sd-cc-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}
.sd-cc-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.sd-cc-toggle-slider {
  position: absolute;
  inset: 0;
  background: #E8E8E8;
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.25s ease;
}
.sd-cc-toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.25s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.sd-cc-toggle input:checked + .sd-cc-toggle-slider {
  background: #35F297;
}
.sd-cc-toggle input:checked + .sd-cc-toggle-slider::before {
  transform: translateX(20px);
}
.sd-cc-toggle input:disabled + .sd-cc-toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- Detail-Buttons --- */
.sd-cc-detail-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

/* --- Notwendig-Badge --- */
.sd-cc-badge-required {
  display: inline-block;
  font-size: 0.7rem;
  color: #166534;
  background: rgba(53, 242, 151, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 8px;
  font-weight: 500;
}

/* --- Footer-Link (Cookie-Einstellungen) --- */
.sd-cc-footer-link {
  cursor: pointer;
  color: #8A8A8A;
  font-size: 0.8rem;
  text-decoration: underline;
  transition: color 0.2s ease;
  background: none;
  border: none;
  font-family: Inter, 'Inter Fallback', sans-serif;
  padding: 0;
}
.sd-cc-footer-link:hover {
  color: #5B5490;
}

/* --- Google Maps Platzhalter --- */
.sd-cc-maps-placeholder {
  background: #F9F8F6;
  border: 1px solid #E8E8E8;
  border-radius: 12px;
  padding: 40px 24px;
  text-align: center;
  font-family: Inter, 'Inter Fallback', sans-serif;
}
.sd-cc-maps-placeholder p {
  color: #505050;
  font-size: 0.875rem;
  margin-bottom: 16px;
}
.sd-cc-maps-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #1A1A1A;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-family: 'Outfit', 'Outfit Fallback', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}
.sd-cc-maps-btn:hover {
  background: #35F297;
  color: #1A1A1A;
}

/* --- Responsive --- */
@media (max-width: 640px) {
  .sd-cc-banner {
    padding: 20px 16px;
  }
  .sd-cc-buttons {
    flex-direction: column;
  }
  .sd-cc-btn {
    width: 100%;
    min-width: unset;
  }
  .sd-cc-detail-buttons {
    flex-direction: column;
  }
  .sd-cc-detail-buttons .sd-cc-btn {
    width: 100%;
  }
}
