/**
 * Cookie Consent Banner Styles
 * DSGVO-konform, selbst gehostet
 */

#cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 3px solid #EF4444;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  padding: 24px;
  animation: slideUp 0.4s ease-out;
  transition: opacity 0.3s ease;
}

/* Dark Mode Support */
.a.lf #cookie-consent-banner {
  background: #1f2937;
  border-top-color: #F87171;
  color: #f3f4f6;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto 20px;
}

.cookie-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 12px 0;
  color: #111827;
}

.a.lf .cookie-content h3 {
  color: #f3f4f6;
}

.cookie-content p {
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 12px 0;
  color: #4b5563;
}

.a.lf .cookie-content p {
  color: #d1d5db;
}

.cookie-info {
  font-size: 0.875rem;
  padding: 12px;
  background: #f3f4f6;
  border-radius: 8px;
  border-left: 4px solid #EF4444;
}

.a.lf .cookie-info {
  background: #374151;
  border-left-color: #F87171;
}

.cookie-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
}

.cookie-btn {
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.cookie-btn-primary {
  background: #EF4444;
  color: #ffffff;
}

.cookie-btn-primary:hover {
  background: #DC2626;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.cookie-btn-secondary {
  background: #e5e7eb;
  color: #1f2937;
}

.a.lf .cookie-btn-secondary {
  background: #4b5563;
  color: #f3f4f6;
}

.cookie-btn-secondary:hover {
  background: #d1d5db;
}

.a.lf .cookie-btn-secondary:hover {
  background: #6b7280;
}

.cookie-btn-link {
  background: transparent;
  color: #EF4444;
  text-decoration: underline;
}

.a.lf .cookie-btn-link {
  color: #F87171;
}

.cookie-btn-link:hover {
  color: #DC2626;
}

.a.lf .cookie-btn-link:hover {
  color: #FCA5A5;
}

/* Cookie Categories */
.cookie-category {
  margin-bottom: 20px;
  padding: 16px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.a.lf .cookie-category {
  background: #374151;
  border-color: #4b5563;
}

.cookie-category-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.cookie-category-header strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 4px;
  color: #111827;
}

.a.lf .cookie-category-header strong {
  color: #f3f4f6;
}

.cookie-category-desc {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
}

.a.lf .cookie-category-desc {
  color: #9ca3af;
}

/* Toggle Switch */
.cookie-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}

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

.cookie-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: 0.3s;
  border-radius: 28px;
}

.cookie-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.cookie-switch input:checked + .cookie-slider {
  background-color: #EF4444;
}

.cookie-switch input:checked + .cookie-slider:before {
  transform: translateX(24px);
}

.cookie-switch input:disabled + .cookie-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Footer Links */
.cookie-footer {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
  text-align: center;
}

.a.lf .cookie-footer {
  border-top-color: #4b5563;
}

.cookie-footer a {
  color: #EF4444;
  text-decoration: none;
  font-size: 0.875rem;
  margin: 0 12px;
}

.a.lf .cookie-footer a {
  color: #F87171;
}

.cookie-footer a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  #cookie-consent-banner {
    padding: 16px;
  }

  .cookie-content h3 {
    font-size: 1.25rem;
  }

  .cookie-content p {
    font-size: 0.875rem;
  }

  .cookie-actions {
    flex-direction: column;
  }

  .cookie-btn {
    width: 100%;
  }

  .cookie-category-header {
    flex-direction: column;
    gap: 12px;
  }
}

/* Accessibility */
.cookie-btn:focus {
  outline: 3px solid #EF4444;
  outline-offset: 2px;
}

.cookie-switch input:focus + .cookie-slider {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3);
}
