/* ============================================
   COOKIE CONSENT BANNER - GDPR Compliant
   Lightweight, accessible, and responsive
   ============================================ */

/* Cookie Consent Container */
#cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.98), rgba(31, 41, 55, 0.98));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 2px solid rgba(255, 107, 53, 0.3);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  padding: 1.5rem;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Cookie Consent Content Wrapper */
.cookie-consent-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Cookie Icon & Text Container */
.cookie-consent-text {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.cookie-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: rgba(255, 107, 53, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #FF6B35;
}

.cookie-text-content {
  flex: 1;
  color: #E5E7EB;
}

.cookie-text-content h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #FFFFFF;
  margin-bottom: 0.5rem;
}

.cookie-text-content p {
  font-size: 0.875rem;
  line-height: 1.5;
  color: #D1D5DB;
  margin: 0;
}

.cookie-text-content a {
  color: #FF6B35;
  text-decoration: underline;
  transition: color 0.2s;
}

.cookie-text-content a:hover {
  color: #FF8C5A;
}

/* Cookie Consent Buttons */
.cookie-consent-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cookie-btn {
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.cookie-btn-accept {
  background: linear-gradient(135deg, #FF6B35, #FF8C5A);
  color: white;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.cookie-btn-accept:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4);
}

.cookie-btn-accept:active {
  transform: translateY(0);
}

.cookie-btn-decline {
  background: rgba(107, 114, 128, 0.2);
  color: #D1D5DB;
  border: 1px solid rgba(107, 114, 128, 0.3);
}

.cookie-btn-decline:hover {
  background: rgba(107, 114, 128, 0.3);
  color: #F3F4F6;
  border-color: rgba(107, 114, 128, 0.5);
}

.cookie-btn-settings {
  background: transparent;
  color: #9CA3AF;
  border: 1px solid rgba(156, 163, 175, 0.3);
}

.cookie-btn-settings:hover {
  background: rgba(156, 163, 175, 0.1);
  color: #D1D5DB;
  border-color: rgba(156, 163, 175, 0.5);
}

/* Focus States for Accessibility */
.cookie-btn:focus-visible {
  outline: 3px solid #FF6B35;
  outline-offset: 2px;
}

/* Dark Mode Adjustments */
:root[data-theme="dark"] #cookie-consent {
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.98), rgba(31, 41, 55, 0.98));
  border-top-color: rgba(255, 107, 53, 0.4);
}

/* Light Mode */
:root[data-theme="light"] #cookie-consent {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(249, 250, 251, 0.98));
  border-top: 2px solid rgba(255, 107, 53, 0.3);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

:root[data-theme="light"] .cookie-text-content {
  color: #374151;
}

:root[data-theme="light"] .cookie-text-content h3 {
  color: #111827;
}

:root[data-theme="light"] .cookie-text-content p {
  color: #4B5563;
}

:root[data-theme="light"] .cookie-icon {
  background: rgba(255, 107, 53, 0.1);
}

:root[data-theme="light"] .cookie-btn-decline {
  background: rgba(243, 244, 246, 1);
  color: #4B5563;
  border: 1px solid #D1D5DB;
}

:root[data-theme="light"] .cookie-btn-decline:hover {
  background: rgba(229, 231, 235, 1);
  color: #1F2937;
}

:root[data-theme="light"] .cookie-btn-settings {
  background: transparent;
  color: #6B7280;
  border: 1px solid #D1D5DB;
}

:root[data-theme="light"] .cookie-btn-settings:hover {
  background: rgba(243, 244, 246, 1);
  color: #374151;
  border-color: #9CA3AF;
}

/* Responsive Design */
@media (min-width: 768px) {
  .cookie-consent-content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .cookie-consent-buttons {
    flex-shrink: 0;
  }
}

@media (max-width: 767px) {
  #cookie-consent {
    padding: 1.25rem;
  }

  .cookie-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

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

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

  .cookie-consent-buttons {
    flex-direction: column;
  }

  .cookie-btn {
    width: 100%;
    justify-content: center;
    padding: 0.875rem 1.25rem;
  }
}

/* Animation for smooth entry */
@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

#cookie-consent.show {
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Screen reader only class */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
