/* ============================================================
   Cookie Banner Styles - GDPR Compliant
   ============================================================ */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--color-neutral-200);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 90vh;
  overflow-y: auto;
}

.cookie-banner.show {
  transform: translateY(0);
}

.cookie-banner-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

.cookie-banner-text h4 {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-neutral-900);
  margin-bottom: var(--space-2);
}

.cookie-banner-text p {
  font-size: var(--text-base);
  color: var(--color-neutral-600);
  line-height: 1.5;
  margin: 0;
}

.cookie-banner-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

.cookie-btn {
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-family-primary);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-lg);
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.cookie-btn-accept {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: white;
  box-shadow: var(--shadow-md);
}

.cookie-btn-accept:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.cookie-btn-reject {
  background: transparent;
  color: var(--color-neutral-600);
  border-color: var(--color-neutral-300);
}

.cookie-btn-reject:hover {
  background: var(--color-neutral-100);
  border-color: var(--color-neutral-400);
  color: var(--color-neutral-700);
}

.cookie-btn-customize {
  background: var(--color-accent);
  color: white;
  box-shadow: var(--shadow-sm);
}

.cookie-btn-customize:hover {
  background: var(--color-accent-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.cookie-link {
  font-size: var(--text-sm);
  color: var(--color-primary);
  text-decoration: underline;
  font-weight: 500;
  transition: color 0.2s ease;
}

.cookie-link:hover {
  color: var(--color-primary-dark);
}

/* ============================================================
   Cookie Preferences Panel
   ============================================================ */

.cookie-preferences {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-preferences.show {
  opacity: 1;
  visibility: visible;
}

.cookie-preferences-content {
  background: white;
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-preferences.show .cookie-preferences-content {
  transform: scale(1);
}

.cookie-preferences-content h4 {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-neutral-900);
  margin-bottom: var(--space-6);
  text-align: center;
}

.cookie-categories {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}

.cookie-category {
  border: 1px solid var(--color-neutral-200);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  background: var(--color-bg-secondary);
}

.cookie-category-header {
  margin-bottom: var(--space-3);
}

.cookie-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
  user-select: none;
}

.cookie-toggle input[type="checkbox"] {
  display: none;
}

.cookie-slider {
  position: relative;
  width: 50px;
  height: 26px;
  background: var(--color-neutral-300);
  border-radius: 26px;
  transition: background 0.3s ease;
  flex-shrink: 0;
}

.cookie-slider::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.cookie-toggle input[type="checkbox"]:checked + .cookie-slider {
  background: var(--color-primary);
}

.cookie-toggle input[type="checkbox"]:checked + .cookie-slider::before {
  transform: translateX(24px);
}

.cookie-toggle input[type="checkbox"]:disabled + .cookie-slider {
  background: var(--color-neutral-400);
  opacity: 0.7;
}

.cookie-label {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-neutral-900);
}

.cookie-description {
  font-size: var(--text-base);
  color: var(--color-neutral-600);
  line-height: 1.6;
  margin: 0;
}

.cookie-preferences-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-neutral-200);
}

/* ============================================================
   Responsive Design
   ============================================================ */

@media (max-width: 768px) {
  .cookie-banner-content {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: var(--space-4);
  }

  .cookie-banner-actions {
    justify-content: center;
    flex-wrap: wrap;
  }

  .cookie-preferences-content {
    width: 95%;
    padding: var(--space-6);
    max-height: 85vh;
    overflow-y: auto;
  }

  .cookie-preferences-content h4 {
    font-size: var(--text-xl);
  }

  .cookie-category {
    padding: var(--space-4);
  }

  .cookie-preferences-actions {
    flex-direction: column;
    gap: var(--space-3);
  }
}

@media (max-width: 480px) {
  .cookie-banner-content {
    padding: var(--space-4);
  }

  .cookie-banner-actions {
    flex-direction: column;
    gap: var(--space-2);
  }

  .cookie-btn {
    width: 100%;
    justify-content: center;
  }

  .cookie-preferences-content {
    padding: var(--space-4);
  }

  .cookie-slider {
    width: 44px;
    height: 24px;
  }

  .cookie-slider::before {
    width: 20px;
    height: 20px;
  }

  .cookie-toggle input[type="checkbox"]:checked + .cookie-slider::before {
    transform: translateX(20px);
  }
}