/* Consent Banner & Modal Styles */
:root {
  --consent-primary: #EA580C;
  --consent-primary-hover: #C2410C;
  --consent-dark: #0F2742;
  --consent-light: #F8FAFC;
  --consent-border: #E2E8F0;
  --consent-text: #1E293B;
  --consent-text-light: #64748B;
  --consent-success: #059669;
  --consent-error: #DC2626;
  --consent-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --consent-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Banner Styles */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--consent-light);
  border-top: 1px solid var(--consent-border);
  padding: 1.5rem;
  box-shadow: var(--consent-shadow);
  z-index: 1000;
  transform: translateY(100%);
  transition: transform 0.3s ease-in-out;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

.cookie-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cookie-banner-text {
  color: var(--consent-text);
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0;
}

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

.cookie-banner-link:hover {
  color: var(--consent-primary-hover);
  text-decoration: none;
}

.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

/* Modal Styles */
#cookie-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

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

.cookie-modal-content {
  background: white;
  border-radius: 0.75rem;
  box-shadow: var(--consent-shadow-lg);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform 0.3s ease-in-out;
}

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

.cookie-modal-header {
  padding: 1.5rem 1.5rem 0 1.5rem;
  border-bottom: 1px solid var(--consent-border);
}

.cookie-modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--consent-text);
  margin: 0 0 0.5rem 0;
}

.cookie-modal-description {
  color: var(--consent-text-light);
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0 0 1rem 0;
}

.cookie-modal-body {
  padding: 1.5rem;
}

.cookie-consent-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid var(--consent-border);
}

.cookie-consent-item:last-child {
  border-bottom: none;
}

.cookie-consent-info {
  flex: 1;
  margin-right: 1rem;
}

.cookie-consent-title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--consent-text);
  margin: 0 0 0.25rem 0;
}

.cookie-consent-description {
  font-size: 0.875rem;
  color: var(--consent-text-light);
  line-height: 1.4;
  margin: 0;
}

.cookie-consent-toggle {
  position: relative;
  display: inline-block;
  width: 3rem;
  height: 1.5rem;
  flex-shrink: 0;
}

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

.cookie-consent-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 1.5rem;
}

.cookie-consent-slider:before {
  position: absolute;
  content: "";
  height: 1.125rem;
  width: 1.125rem;
  left: 0.1875rem;
  bottom: 0.1875rem;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.cookie-consent-toggle input:checked + .cookie-consent-slider {
  background-color: var(--consent-primary);
}

.cookie-consent-toggle input:checked + .cookie-consent-slider:before {
  transform: translateX(1.5rem);
}

.cookie-consent-toggle input:focus + .cookie-consent-slider {
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.2);
}

.cookie-modal-footer {
  padding: 0 1.5rem 1.5rem 1.5rem;
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

/* Button Styles */
.cookie-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.375rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  text-decoration: none;
  min-height: 2.5rem;
}

.cookie-btn:focus {
  outline: 2px solid var(--consent-primary);
  outline-offset: 2px;
}

.cookie-btn-primary {
  background-color: var(--consent-primary);
  color: white;
  border-color: var(--consent-primary);
}

.cookie-btn-primary:hover {
  background-color: var(--consent-primary-hover);
  border-color: var(--consent-primary-hover);
}

.cookie-btn-secondary {
  background-color: white;
  color: var(--consent-text);
  border-color: var(--consent-border);
}

.cookie-btn-secondary:hover {
  background-color: var(--consent-light);
  border-color: var(--consent-text-light);
}

.cookie-btn-ghost {
  background-color: transparent;
  color: var(--consent-text-light);
  border-color: transparent;
}

.cookie-btn-ghost:hover {
  background-color: var(--consent-light);
  color: var(--consent-text);
}

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

/* Responsive Design */
@media (max-width: 640px) {
  .cookie-banner-content {
    gap: 1rem;
  }
  
  .cookie-banner-actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .cookie-btn {
    width: 100%;
    justify-content: center;
  }
  
  .cookie-modal-content {
    margin: 0.5rem;
    max-height: calc(100vh - 1rem);
  }
  
  .cookie-consent-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  .cookie-consent-info {
    margin-right: 0;
  }
  
  .cookie-consent-toggle {
    align-self: flex-end;
  }
  
  .cookie-modal-footer {
    flex-direction: column;
  }
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

#cookie-banner.show {
  animation: slideUp 0.3s ease-out;
}

#cookie-modal.show {
  animation: fadeIn 0.3s ease-out;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --consent-border: #000000;
    --consent-text-light: #000000;
  }
  
  .cookie-consent-slider {
    border: 2px solid var(--consent-text);
  }
  
  .cookie-btn {
    border-width: 2px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  #cookie-banner,
  #cookie-modal,
  .cookie-consent-slider,
  .cookie-btn {
    transition: none;
  }
  
  #cookie-banner.show,
  #cookie-modal.show {
    animation: none;
  }
}
