/* ============================================================
   Cookie Consent Banner — DSGVO/DSG Compliant
   ============================================================ */

.cc-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.cc-banner {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: ccSlideUp 0.3s ease;
}

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

.cc-header {
  padding: 24px 28px 0;
}

.cc-header h2 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
}

.cc-body {
  padding: 16px 28px;
}

.cc-body p {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  color: #4a4a6a;
  line-height: 1.7;
  margin: 0 0 20px;
}

.cc-categories {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cc-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: #f8f9fc;
  border: 1px solid #e8e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.cc-category:hover {
  border-color: #FFD000;
}

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

.cc-cat-info strong {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 2px;
}

.cc-cat-info span {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  color: #7a7a9a;
  line-height: 1.4;
}

/* Hide native checkbox */
.cc-category input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* Toggle switch */
.cc-toggle {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 24px;
  background: #d0d0dd;
  border-radius: 12px;
  transition: background 0.2s ease;
}

.cc-toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease;
}

.cc-category input:checked + .cc-toggle {
  background: #FFD000;
}

.cc-category input:checked + .cc-toggle::after {
  transform: translateX(20px);
}

/* Locked toggle (necessary cookies) */
.cc-toggle-locked {
  background: #FFD000;
  opacity: 0.7;
  cursor: not-allowed;
}

.cc-toggle-locked::after {
  transform: translateX(20px);
}

/* Focus styles for accessibility */
.cc-category input:focus-visible + .cc-toggle {
  outline: 2px solid #FFD000;
  outline-offset: 2px;
}

/* Buttons */
.cc-actions {
  display: flex;
  gap: 8px;
  padding: 0 28px 20px;
  flex-wrap: wrap;
}

.cc-btn {
  flex: 1;
  min-width: 120px;
  padding: 11px 16px;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.cc-btn-primary {
  background: #FFD000;
  color: #1a1a1a;
  border-color: #FFD000;
}

.cc-btn-primary:hover {
  background: #E6BB00;
  border-color: #E6BB00;
}

.cc-btn-primary:focus-visible {
  outline: 2px solid #1a1a1a;
  outline-offset: 2px;
}

.cc-btn-secondary {
  background: #fff;
  color: #1a1a1a;
  border-color: #d0d0dd;
}

.cc-btn-secondary:hover {
  border-color: #FFD000;
  background: #FFF3B0;
}

.cc-btn-secondary:focus-visible {
  outline: 2px solid #FFD000;
  outline-offset: 2px;
}

/* Footer links */
.cc-footer {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 0 28px 20px;
}

.cc-footer a {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  color: #7a7a9a;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.cc-footer a:hover {
  color: #1a1a1a;
}

/* Responsive */
@media (max-width: 480px) {
  .cc-banner {
    border-radius: 12px;
  }

  .cc-header {
    padding: 20px 20px 0;
  }

  .cc-body {
    padding: 12px 20px;
  }

  .cc-actions {
    padding: 0 20px 16px;
    flex-direction: column;
  }

  .cc-btn {
    min-width: unset;
  }

  .cc-footer {
    padding: 0 20px 16px;
  }
}
