/* ==========================================================================
   DSGVO & TDDDG COMPLIANT COOKIE CONSENT BANNER STYLESHEET
   ========================================================================== */

#cookie-banner-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

#cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  width: calc(100% - 32px);
  max-width: 560px;
  background: rgba(14, 14, 14, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(255, 255, 255, 0.04);
  z-index: 99999;
  color: var(--w, #ffffff);
  font-family: var(--sans, 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s ease;
  box-sizing: border-box;
}

#cookie-banner.active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Ensure Legal Modals always open on top of the Cookie Banner */
.legal-page {
  z-index: 1000000 !important;
}

.cb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.cb-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--w, #ffffff);
  letter-spacing: -0.01em;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cb-title-icon {
  font-size: 20px;
}

.cb-text {
  font-size: 13.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
  margin: 0 0 16px 0;
}

.cb-text a {
  color: var(--w, #ffffff);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s;
  cursor: pointer;
}

.cb-text a:hover {
  opacity: 0.8;
}

/* Category Toggles Panel */
.cb-details {
  display: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 18px;
  flex-direction: column;
  gap: 12px;
}

.cb-details.open {
  display: flex;
}

.cb-category {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.cb-cat-info {
  flex: 1;
}

.cb-cat-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--w, #ffffff);
  margin-bottom: 2px;
}

.cb-cat-desc {
  font-size: 12px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.58);
}

/* Toggle Switch */
.cb-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.cb-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cb-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.18);
  transition: 0.25s ease;
  border-radius: 22px;
}

.cb-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: 0.25s ease;
  border-radius: 50%;
}

.cb-switch input:checked + .cb-slider {
  background-color: var(--y, #e5ff00);
}

.cb-switch input:checked + .cb-slider:before {
  transform: translateX(18px);
  background-color: #000000;
}

.cb-switch input:disabled + .cb-slider {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Action Buttons - 2-Button Layout */
.cb-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.cb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  text-align: center;
  box-sizing: border-box;
}

.cb-btn-accept {
  background: var(--w, #ffffff);
  color: #000000;
  border-color: var(--w, #ffffff);
}

.cb-btn-accept:hover {
  background: var(--y, #e5ff00);
  border-color: var(--y, #e5ff00);
  color: #000000;
  transform: translateY(-1px);
}

.cb-btn-customize {
  background: rgba(255, 255, 255, 0.08);
  color: var(--w, #ffffff);
  border-color: rgba(255, 255, 255, 0.2);
}

.cb-btn-customize:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

/* Footer Links in Banner */
.cb-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.cb-links a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  transition: color 0.2s;
  cursor: pointer;
}

.cb-links a:hover {
  color: var(--w, #ffffff);
  text-decoration: underline;
}

/* Floating Trigger Button (Reopen Cookie Settings Anytime) */
#cookie-reopen-btn {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 99990;
  background: rgba(14, 14, 14, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 30px;
  padding: 8px 14px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  transition: all 0.25s ease;
  font-family: var(--sans, 'Space Grotesk', -apple-system, sans-serif);
}

#cookie-reopen-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--w, #ffffff);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
}

/* Responsive Adjustments */
@media (max-width: 600px) {
  #cookie-banner {
    bottom: 12px;
    width: calc(100% - 24px);
    padding: 18px;
    border-radius: 14px;
  }

  .cb-actions {
    grid-template-columns: 1fr;
  }

  #cookie-reopen-btn {
    bottom: 12px;
    left: 12px;
    padding: 6px 10px;
    font-size: 11px;
  }
}
