/* ========================================
   COOKIE BANNER STYLES
   DSGVO-konform & Passend zum grünen Design
======================================== */

:root {
  --cookie-primary: #a8e6a3;
  --cookie-primary-dark: #88d182;
  --cookie-accent: #7dd277;
  --cookie-bg: #ffffff;
  --cookie-overlay: rgba(0, 0, 0, 0.5);
  --cookie-text: #1f2937;
  --cookie-text-light: #6b7280;
  --cookie-border: #e5e7eb;
  --cookie-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

/* Cookie Banner Container */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--cookie-bg);
  box-shadow: var(--cookie-shadow);
  border-top: 3px solid var(--cookie-primary);
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-banner.show {
  transform: translateY(0);
}

.cookie-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

/* Cookie Icon */
.cookie-banner-icon {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--cookie-primary) 0%, var(--cookie-accent) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
}

/* Cookie Text */
.cookie-banner-text {
  flex: 1;
  min-width: 300px;
}

.cookie-banner-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--cookie-text);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cookie-banner-description {
  font-size: 0.875rem;
  color: var(--cookie-text-light);
  line-height: 1.5;
}

.cookie-banner-description a {
  color: var(--cookie-primary-dark);
  text-decoration: underline;
  font-weight: 500;
  transition: color 0.2s;
}

.cookie-banner-description a:hover {
  color: var(--cookie-accent);
}

/* Cookie Buttons */
.cookie-banner-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cookie-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.cookie-btn-accept {
  background: linear-gradient(135deg, var(--cookie-primary) 0%, var(--cookie-accent) 100%);
  color: white;
  border-color: transparent;
}

.cookie-btn-accept:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(168, 230, 163, 0.4);
  filter: brightness(1.1);
}

.cookie-btn-necessary {
  background: white;
  color: var(--cookie-text);
  border-color: var(--cookie-border);
}

.cookie-btn-necessary:hover {
  background: #f9fafb;
  border-color: var(--cookie-primary);
  color: var(--cookie-primary-dark);
}

.cookie-btn-settings {
  background: transparent;
  color: var(--cookie-text-light);
  border-color: transparent;
  text-decoration: underline;
  padding: 0.75rem 1rem;
}

.cookie-btn-settings:hover {
  color: var(--cookie-primary-dark);
}

/* Cookie Settings Modal */
.cookie-settings-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--cookie-overlay);
  backdrop-filter: blur(5px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.cookie-settings-overlay.show {
  opacity: 1;
  visibility: visible;
}

.cookie-settings-modal {
  background: white;
  border-radius: 1rem;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.3s;
}

.cookie-settings-overlay.show .cookie-settings-modal {
  transform: scale(1);
}

/* Modal Header */
.cookie-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--cookie-border);
}

.cookie-settings-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--cookie-text);
}

.cookie-settings-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f3f4f6;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cookie-text-light);
  transition: all 0.2s;
}

.cookie-settings-close:hover {
  background: #e5e7eb;
  color: var(--cookie-text);
}

/* Modal Body */
.cookie-settings-body {
  padding: 1.5rem;
}

.cookie-category {
  border-bottom: 1px solid var(--cookie-border);
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
}

.cookie-category:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.cookie-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.cookie-category-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--cookie-text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cookie-category-description {
  font-size: 0.875rem;
  color: var(--cookie-text-light);
  line-height: 1.5;
}

/* Toggle Switch */
.cookie-toggle {
  position: relative;
  width: 48px;
  height: 24px;
  background: #d1d5db;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.3s;
}

.cookie-toggle.active {
  background: var(--cookie-primary);
}

.cookie-toggle.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cookie-toggle-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cookie-toggle.active .cookie-toggle-slider {
  transform: translateX(24px);
}

/* Modal Footer */
.cookie-settings-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--cookie-border);
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

/* Cookie Preferences Button (Footer) */
.cookie-preferences-btn {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: linear-gradient(135deg, var(--cookie-primary) 0%, var(--cookie-accent) 100%);
  color: white;
  border: none;
  padding: 0.75rem 1.25rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(168, 230, 163, 0.4);
  display: none;
  align-items: center;
  gap: 0.5rem;
  z-index: 9998;
  transition: all 0.3s;
}

.cookie-preferences-btn.show {
  display: inline-flex;
}

.cookie-preferences-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(168, 230, 163, 0.5);
  filter: brightness(1.1);
}

/* Responsive Design */
@media (max-width: 768px) {
  .cookie-banner-content {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .cookie-banner-icon {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }

  .cookie-banner-text {
    min-width: auto;
  }

  .cookie-banner-actions {
    width: 100%;
    flex-direction: column;
  }

  .cookie-btn {
    width: 100%;
    justify-content: center;
  }

  .cookie-settings-modal {
    width: 95%;
    max-height: 80vh;
  }

  .cookie-settings-footer {
    flex-direction: column;
  }

  .cookie-settings-footer .cookie-btn {
    width: 100%;
  }

  .cookie-preferences-btn {
    bottom: 10px;
    left: 10px;
    padding: 0.6rem 1rem;
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .cookie-banner-content {
    padding: 1rem;
  }

  .cookie-banner-title {
    font-size: 1rem;
  }

  .cookie-banner-description {
    font-size: 0.8125rem;
  }

  .cookie-settings-header {
    padding: 1rem;
  }

  .cookie-settings-body {
    padding: 1rem;
  }

  .cookie-settings-footer {
    padding: 1rem;
  }
}

/* Print Styles */
@media print {
  .cookie-banner,
  .cookie-settings-overlay,
  .cookie-preferences-btn {
    display: none !important;
  }
}