/**
 * GDPR Cookie Consent Banner Styles
 * Modern, accessible, and mobile-responsive
 */

.cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  z-index: 10000;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: Inter, system-ui, -apple-system, sans-serif;
}

.cookie-consent-banner.show {
  transform: translateY(0);
}

.cookie-consent-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.cookie-consent-text {
  flex: 1;
}

.cookie-consent-title {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 8px 0;
}

.cookie-consent-description {
  font-size: 14px;
  line-height: 1.6;
  color: #64748b;
  margin: 0;
}

.cookie-consent-link {
  color: #0a6cff;
  text-decoration: none;
  font-weight: 600;
}

.cookie-consent-link:hover {
  text-decoration: underline;
}

.cookie-consent-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.cookie-consent-btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  outline: none;
  white-space: nowrap;
}

.cookie-consent-btn:focus-visible {
  outline: 2px solid #0a6cff;
  outline-offset: 2px;
}

.cookie-consent-btn-accept {
  background: #0a6cff;
  color: white;
}

.cookie-consent-btn-accept:hover {
  background: #0958d6;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(10, 108, 255, 0.3);
}

.cookie-consent-btn-decline {
  background: #f1f5f9;
  color: #64748b;
}

.cookie-consent-btn-decline:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.cookie-consent-btn-settings {
  background: transparent;
  color: #0a6cff;
  border: 2px solid #0a6cff;
}

.cookie-consent-btn-settings:hover {
  background: #eef4ff;
}

/* Cookie Settings Modal */
.cookie-settings-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.cookie-settings-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.cookie-settings-content {
  position: relative;
  background: white;
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.cookie-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 1px solid #e2e8f0;
}

.cookie-settings-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.cookie-settings-close {
  background: none;
  border: none;
  font-size: 28px;
  color: #64748b;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.cookie-settings-close:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.cookie-settings-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.cookie-category {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e2e8f0;
}

.cookie-category:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.cookie-category-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.cookie-category-header h4 {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 8px 0;
}

.cookie-category-header p {
  font-size: 14px;
  line-height: 1.6;
  color: #64748b;
  margin: 0;
}

/* Toggle Switch */
.cookie-toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}

.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: 0.3s;
  border-radius: 24px;
}

.cookie-toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
  background-color: #0a6cff;
}

.cookie-toggle input:checked + .cookie-toggle-slider:before {
  transform: translateX(24px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
  cursor: not-allowed;
  opacity: 0.5;
}

.cookie-settings-footer {
  padding: 24px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .cookie-consent-content {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 16px;
  }
  
  .cookie-consent-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .cookie-consent-btn {
    width: 100%;
    text-align: center;
  }
  
  .cookie-settings-modal {
    padding: 0;
  }
  
  .cookie-settings-content {
    max-height: 100vh;
    border-radius: 0;
    height: 100%;
  }
  
  .cookie-settings-footer {
    flex-direction: column-reverse;
  }
  
  .cookie-settings-footer .cookie-consent-btn {
    width: 100%;
  }
  
  .cookie-category-header {
    flex-direction: column-reverse;
    gap: 12px;
  }
  
  .cookie-toggle {
    align-self: flex-start;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  .cookie-consent-banner,
  .cookie-settings-modal,
  .cookie-settings-content,
  .cookie-consent-btn,
  .cookie-toggle-slider,
  .cookie-toggle-slider:before {
    transition: none;
    animation: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .cookie-consent-banner {
    border-top: 2px solid black;
  }
  
  .cookie-consent-btn-accept {
    border: 2px solid black;
  }
  
  .cookie-settings-content {
    border: 2px solid black;
  }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
  .cookie-consent-banner {
    background: rgba(30, 41, 59, 0.98);
    border-top-color: rgba(255, 255, 255, 0.1);
  }
  
  .cookie-consent-title {
    color: #f1f5f9;
  }
  
  .cookie-consent-description {
    color: #cbd5e1;
  }
  
  .cookie-consent-btn-decline {
    background: #334155;
    color: #cbd5e1;
  }
  
  .cookie-consent-btn-decline:hover {
    background: #475569;
    color: #f1f5f9;
  }
  
  .cookie-settings-content {
    background: #1e293b;
  }
  
  .cookie-settings-header {
    border-bottom-color: #334155;
  }
  
  .cookie-settings-header h3,
  .cookie-category-header h4 {
    color: #f1f5f9;
  }
  
  .cookie-category-header p {
    color: #cbd5e1;
  }
  
  .cookie-category {
    border-bottom-color: #334155;
  }
  
  .cookie-settings-footer {
    border-top-color: #334155;
  }
  
  .cookie-settings-close:hover {
    background: #334155;
    color: #f1f5f9;
  }
}

