/* ==========================================================================
   DSGVO Cookie-Consent Banner
   Farbe wird automatisch von consent.js aus der Seitenfarbe gesetzt
   ========================================================================== */

/* Overlay */
#consent-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 1;
  transition: opacity 0.3s ease;
}

#consent-overlay.consent-closing {
  opacity: 0;
}

/* Banner */
#consent-banner {
  --consent-accent: #20841b;
  --consent-accent-hover: #1a6d16;
  background: #fff;
  border-radius: 12px;
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  padding: 28px 32px;
  font-family: 'Roboto', Arial, sans-serif;
  color: #333;
  font-size: 14px;
  line-height: 1.5;
}

/* Header */
#consent-banner .consent-header h3 {
  margin: 0 0 12px 0;
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
}

#consent-banner .consent-header p {
  margin: 0 0 20px 0;
  color: #555;
  font-size: 14px;
  line-height: 1.6;
}

#consent-banner .consent-header a {
  color: var(--consent-accent) !important;
  text-decoration: underline;
}

#consent-banner .consent-header a:hover {
  color: var(--consent-accent-hover) !important;
}

/* Categories */
#consent-banner .consent-categories {
  margin-bottom: 20px;
}

#consent-banner .consent-category {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 10px;
  overflow: hidden;
}

#consent-banner .consent-category-header {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  background: #f8f9fa;
  gap: 12px;
}

#consent-banner .consent-category-title {
  font-weight: 600;
  font-size: 15px;
  flex-grow: 1;
  color: #1a1a1a !important;
}

/* Toggle Switch */
#consent-banner .consent-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

#consent-banner .consent-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

#consent-banner .consent-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 24px;
}

#consent-banner .consent-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  transition: 0.3s;
  border-radius: 50%;
}

#consent-banner .consent-switch input:checked + .consent-slider {
  background-color: var(--consent-accent);
}

#consent-banner .consent-switch input:checked + .consent-slider:before {
  transform: translateX(20px);
}

#consent-banner .consent-switch input:disabled + .consent-slider {
  background-color: var(--consent-accent);
  opacity: 0.7;
  cursor: not-allowed;
}

/* Details Toggle */
#consent-banner .consent-toggle-details {
  background: none !important;
  border: none !important;
  cursor: pointer;
  font-size: 12px;
  color: #888 !important;
  padding: 4px 8px;
  line-height: 1;
  transition: color 0.2s;
}

#consent-banner .consent-toggle-details:hover {
  color: #333 !important;
}

/* Details Panel */
#consent-banner .consent-details {
  padding: 12px 16px 16px;
  border-top: 1px solid #e0e0e0;
  background: #fff;
}

#consent-banner .consent-details p {
  margin: 0 0 10px 0;
  color: #666 !important;
  font-size: 13px;
}

/* Table */
#consent-banner .consent-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

#consent-banner .consent-table th {
  text-align: left;
  padding: 6px 8px;
  background: #f0f0f0;
  font-weight: 600;
  color: #444 !important;
  border-bottom: 1px solid #ddd;
}

#consent-banner .consent-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #eee;
  color: #555 !important;
}

/* Buttons */
#consent-banner .consent-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

#consent-banner .consent-btn {
  padding: 12px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  flex: 1;
  min-width: 140px;
  text-align: center;
  font-family: 'Roboto', Arial, sans-serif;
}

#consent-banner .consent-btn:active {
  transform: scale(0.98);
}

#consent-banner .consent-btn-primary {
  background-color: var(--consent-accent) !important;
  color: #fff !important;
}

#consent-banner .consent-btn-primary:hover {
  background-color: var(--consent-accent-hover) !important;
  color: #fff !important;
}

#consent-banner .consent-btn-secondary {
  background-color: #e8e8e8 !important;
  color: #333 !important;
}

#consent-banner .consent-btn-secondary:hover {
  background-color: #d5d5d5 !important;
  color: #333 !important;
}

#consent-banner .consent-btn-tertiary {
  background-color: transparent !important;
  color: #666 !important;
  border: 1px solid #ccc !important;
}

#consent-banner .consent-btn-tertiary:hover {
  background-color: #f5f5f5 !important;
  color: #333 !important;
}

/* Google Maps Placeholder */
.maps-consent-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
  border: 2px dashed #ccc;
  border-radius: 8px;
  padding: 40px 20px;
  text-align: center;
  min-height: 300px;
  width: 100%;
  font-family: 'Roboto', Arial, sans-serif;
}

.maps-consent-placeholder p {
  margin: 0 0 8px 0;
  color: #666 !important;
  font-size: 14px;
}

.maps-consent-placeholder .maps-placeholder-icon {
  font-size: 48px;
  color: #bbb !important;
  margin-bottom: 12px;
}

.maps-consent-placeholder button {
  margin-top: 12px;
  padding: 10px 24px;
  background-color: var(--consent-accent, #20841b) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  font-family: 'Roboto', Arial, sans-serif;
}

.maps-consent-placeholder button:hover {
  opacity: 0.9;
}

/* Cookie Settings Link (Footer) */
.consent-settings-link {
  cursor: pointer;
  text-decoration: underline;
  color: inherit;
}

.consent-settings-link:hover {
  opacity: 0.8;
}

/* Responsive */
@media (max-width: 600px) {
  #consent-banner {
    padding: 20px 16px;
    border-radius: 8px;
    max-height: 85vh;
  }

  #consent-banner .consent-header h3 {
    font-size: 18px;
  }

  #consent-banner .consent-actions {
    flex-direction: column;
  }

  #consent-banner .consent-btn {
    min-width: auto;
    width: 100%;
  }

  #consent-banner .consent-category-header {
    padding: 10px 12px;
  }

  #consent-banner .consent-table {
    font-size: 11px;
  }

  #consent-banner .consent-table th,
  #consent-banner .consent-table td {
    padding: 4px 6px;
  }
}
