/**
 * Cookie Consent Banner - Styles
 * Done-IT.de - DSGVO-konform
 */

/* Overlay und Banner Container */
.cookie-consent-banner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999999;
  display: none;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.cookie-consent-banner.show {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Dunkler Overlay */
.cookie-consent-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

/* Content Box */
.cookie-consent-content {
  position: relative;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
  max-width: 600px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 32px;
  animation: slideUp 0.4s ease-out;
  z-index: 1;
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Header */
.cookie-consent-header {
  margin-bottom: 20px;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 16px;
}

.cookie-consent-header h2 {
  margin: 0;
  font-size: 24px;
  color: #1a1a1a;
  font-weight: 600;
}

/* Text */
.cookie-consent-text {
  color: #444;
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.cookie-consent-text a {
  color: #0066cc;
  text-decoration: none;
  font-weight: 500;
}

.cookie-consent-text a:hover {
  text-decoration: underline;
}

/* Buttons */
.cookie-consent-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.btn-consent {
  flex: 1;
  min-width: 140px;
  padding: 14px 24px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.btn-accept-all {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-accept-all:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-necessary {
  background: #f5f5f5;
  color: #333;
  border: 2px solid #ddd;
}

.btn-necessary:hover {
  background: #e8e8e8;
  border-color: #bbb;
}

.btn-settings {
  background: white;
  color: #667eea;
  border: 2px solid #667eea;
}

.btn-settings:hover {
  background: #667eea;
  color: white;
}

.btn-back {
  background: #f5f5f5;
  color: #666;
  border: 2px solid #ddd;
}

.btn-back:hover {
  background: #e8e8e8;
}

/* Cookie Categories */
.consent-category {
  background: #f9f9f9;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid #e8e8e8;
}

.consent-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.consent-category-header strong {
  font-size: 16px;
  color: #1a1a1a;
}

.consent-category-desc {
  color: #666;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

.consent-always-active {
  background: #e8f5e9;
  color: #2e7d32;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

/* Toggle Switch */
.consent-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  margin-right: 12px;
}

.consent-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.consent-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 28px;
}

.consent-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.consent-switch input:checked + .consent-slider {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.consent-switch input:checked + .consent-slider:before {
  transform: translateX(24px);
}

/* Scrollbar Styling */
.cookie-consent-content::-webkit-scrollbar {
  width: 8px;
}

.cookie-consent-content::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.cookie-consent-content::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 10px;
}

.cookie-consent-content::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .cookie-consent-content {
    padding: 24px;
    width: 95%;
    max-height: 90vh;
  }

  .cookie-consent-header h2 {
    font-size: 20px;
  }

  .cookie-consent-text {
    font-size: 14px;
  }

  .cookie-consent-buttons {
    flex-direction: column;
  }

  .btn-consent {
    width: 100%;
    min-width: 100%;
  }

  .consent-category {
    padding: 16px;
  }

  .consent-category-header {
    flex-wrap: wrap;
  }

  .consent-switch {
    margin-right: 8px;
    width: 46px;
    height: 24px;
  }

  .consent-slider:before {
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
  }

  .consent-switch input:checked + .consent-slider:before {
    transform: translateX(22px);
  }
}

/* Print - Banner ausblenden */
@media print {
  .cookie-consent-banner {
    display: none !important;
  }
}
