/* ============================================================================
   COOKIE CONSENT MODAL - DSGVO-konform
   Elegantes Modal-Design mit Overlay
   ============================================================================ */

/* Overlay - abgedunkelt */
.cc-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cc-overlay.cc-show {
  opacity: 1;
  visibility: visible;
}

/* Modal Container - zentriert */
.cc-banner {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  z-index: 10000;
  max-width: 520px;
  width: calc(100% - 2rem);
  max-height: calc(100vh - 2rem);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.cc-banner.cc-show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

/* Dark Mode */
[data-theme="dark"] .cc-banner {
  background: #1e1e1e;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Modal Content */
.cc-content {
  padding: 1.75rem;
  overflow-y: auto;
  max-height: calc(100vh - 4rem);
}

/* Header mit Icon */
.cc-header {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e5e7eb;
}

[data-theme="dark"] .cc-header {
  border-bottom-color: #374151;
}

.cc-header i {
  font-size: 1.75rem;
  color: var(--bs-primary, #0d6efd);
  margin-right: 0.875rem;
}

.cc-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  color: #111827;
}

[data-theme="dark"] .cc-title {
  color: #f9fafb;
}

/* Beschreibung */
.cc-description {
  font-size: 0.9375rem;
  color: #4b5563;
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

[data-theme="dark"] .cc-description {
  color: #9ca3af;
}

.cc-description a {
  color: var(--bs-primary, #0d6efd);
  text-decoration: none;
  font-weight: 500;
}

.cc-description a:hover {
  text-decoration: underline;
}

/* Cookie Kategorien */
.cc-categories {
  margin-bottom: 1.5rem;
}

.cc-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  background: #f9fafb;
  border-radius: 10px;
  margin-bottom: 0.5rem;
  border: 1px solid transparent;
  transition: border-color 0.2s ease;
}

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

[data-theme="dark"] .cc-category {
  background: #262626;
}

[data-theme="dark"] .cc-category:hover {
  border-color: #374151;
}

.cc-category-info {
  flex-grow: 1;
  padding-right: 1rem;
}

.cc-category-title {
  font-weight: 500;
  font-size: 0.9375rem;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

[data-theme="dark"] .cc-category-title {
  color: #f9fafb;
}

.cc-category-required {
  font-size: 0.625rem;
  background: #6b7280;
  color: white;
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.cc-category-description {
  font-size: 0.8125rem;
  color: #6b7280;
  margin: 0.25rem 0 0 0;
  line-height: 1.4;
}

[data-theme="dark"] .cc-category-description {
  color: #9ca3af;
}

/* Toggle Switch - kompakt */
.cc-category-toggle {
  flex-shrink: 0;
}

.cc-toggle {
  position: relative;
  width: 44px;
  height: 24px;
}

.cc-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cc-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #d1d5db;
  transition: 0.25s;
  border-radius: 24px;
}

.cc-toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.25s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.cc-toggle input:checked + .cc-toggle-slider {
  background-color: var(--bs-success, #10b981);
}

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

.cc-toggle input:disabled + .cc-toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

[data-theme="dark"] .cc-toggle-slider {
  background-color: #4b5563;
}

/* Buttons */
.cc-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cc-btn {
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-align: center;
}

.cc-btn-accept-all {
  background: var(--bs-primary, #0d6efd);
  color: white;
  order: 1;
}

.cc-btn-accept-all:hover {
  background: #0b5ed7;
  transform: translateY(-1px);
}

.cc-btn-accept-selected {
  background: #f3f4f6;
  color: #374151;
  order: 2;
}

[data-theme="dark"] .cc-btn-accept-selected {
  background: #374151;
  color: #e5e7eb;
}

.cc-btn-accept-selected:hover {
  background: #e5e7eb;
}

[data-theme="dark"] .cc-btn-accept-selected:hover {
  background: #4b5563;
}

.cc-btn-reject {
  background: transparent;
  color: #6b7280;
  font-size: 0.875rem;
  padding: 0.5rem;
  order: 3;
}

.cc-btn-reject:hover {
  color: #374151;
  text-decoration: underline;
}

[data-theme="dark"] .cc-btn-reject {
  color: #9ca3af;
}

[data-theme="dark"] .cc-btn-reject:hover {
  color: #e5e7eb;
}

/* Settings Link - dezent unten links */
.cc-settings-link {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  color: #6b7280;
  cursor: pointer;
  z-index: 9990;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  display: none;
}

.cc-settings-link.cc-show {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.cc-settings-link:hover {
  background: #f9fafb;
  color: #374151;
  border-color: #d1d5db;
}

[data-theme="dark"] .cc-settings-link {
  background: #262626;
  border-color: #374151;
  color: #9ca3af;
}

[data-theme="dark"] .cc-settings-link:hover {
  background: #303030;
  color: #e5e7eb;
}

/* Responsive - Mobile */
@media (max-width: 480px) {
  .cc-banner {
    max-width: none;
    width: calc(100% - 1rem);
    border-radius: 12px;
  }

  .cc-content {
    padding: 1.25rem;
  }

  .cc-header {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .cc-header i {
    font-size: 1.5rem;
  }

  .cc-title {
    font-size: 1.125rem;
  }

  .cc-description {
    font-size: 0.875rem;
  }

  .cc-category {
    padding: 0.75rem;
  }

  .cc-category-title {
    font-size: 0.875rem;
  }

  .cc-category-description {
    font-size: 0.75rem;
  }

  .cc-toggle {
    width: 40px;
    height: 22px;
  }

  .cc-toggle-slider:before {
    height: 16px;
    width: 16px;
  }

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