/* ===== COOKIE CONSENT STYLING ===== */

.cookie-consent-banner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.3s ease-out;
}

.consent-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.consent-content {
  position: relative;
  background: white;
  border-radius: 16px;
  padding: 2rem;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  border: 3px solid #1e3a8a;
}

.consent-header {
  margin-bottom: 1.5rem;
  text-align: center;
}

.consent-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e3a8a;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.consent-description {
  color: #374151;
  line-height: 1.6;
  font-size: 1rem;
}

.consent-options {
  margin: 2rem 0;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
  background: #f9fafb;
}

.consent-toggle-group {
  margin-bottom: 1.5rem;
}

.consent-toggle-group:last-child {
  margin-bottom: 0;
}

.consent-toggle-header {
  margin-bottom: 0.5rem;
}

.consent-toggle-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  color: #1f2937;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.consent-toggle-label:hover {
  background: #f3f4f6;
}

.consent-toggle-label:focus-within {
  outline: 3px solid #1d4ed8;
  outline-offset: 2px;
  background: #eff6ff;
}

.consent-checkbox {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid #6b7280;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.consent-checkbox:checked {
  background: #1e3a8a;
  border-color: #1e3a8a;
}

.consent-checkbox:checked::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-weight: bold;
  font-size: 0.875rem;
}

.consent-checkbox:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.consent-checkbox:focus {
  outline: 3px solid #1d4ed8;
  outline-offset: 2px;
}

.consent-toggle-text {
  flex: 1;
  font-size: 1rem;
}

.consent-toggle-description {
  color: #6b7280;
  font-size: 0.875rem;
  line-height: 1.5;
  margin-left: 2rem;
  padding-left: 0.75rem;
  border-left: 3px solid #e5e7eb;
}

.consent-info {
  margin: 1.5rem 0;
  text-align: center;
  padding: 1rem;
  background: #eff6ff;
  border-radius: 8px;
  border: 1px solid #bfdbfe;
}

.consent-info a {
  color: #1e3a8a;
  text-decoration: underline;
  font-weight: 600;
}

.consent-info a:hover {
  color: #1e40af;
}

.consent-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 2rem;
}

.consent-actions .btn {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
  min-width: 140px;
  text-align: center;
}

.btn-primary {
  background: #1e3a8a;
  color: white;
  border-color: #1e3a8a;
}

.btn-primary:hover {
  background: #1e40af;
  border-color: #1e40af;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

.btn-primary:focus {
  outline: 3px solid #1d4ed8;
  outline-offset: 2px;
}

.btn-secondary {
  background: #059669;
  color: white;
  border-color: #059669;
}

.btn-secondary:hover {
  background: #047857;
  border-color: #047857;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.btn-secondary:focus {
  outline: 3px solid #10b981;
  outline-offset: 2px;
}

.btn-outline {
  background: white;
  color: #374151;
  border-color: #d1d5db;
}

.btn-outline:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-outline:focus {
  outline: 3px solid #6b7280;
  outline-offset: 2px;
}

/* Cookie Settings Button in Footer */
.cookie-settings-btn {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  background: #1e3a8a;
  color: white;
  border: none;
  padding: 0.75rem 1rem;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
  transition: all 0.3s ease;
  z-index: 1000;
}

.cookie-settings-btn:hover {
  background: #1e40af;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30, 58, 138, 0.4);
}

.cookie-settings-btn:focus {
  outline: 3px solid #60a5fa;
  outline-offset: 2px;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .cookie-consent-banner {
    padding: 0.5rem;
  }

  .consent-content {
    padding: 1.5rem;
    border-radius: 12px;
    max-height: 95vh;
  }

  .consent-title {
    font-size: 1.25rem;
  }

  .consent-actions {
    flex-direction: column;
    gap: 0.5rem;
  }

  .consent-actions .btn {
    width: 100%;
    min-width: unset;
  }

  .consent-toggle-description {
    margin-left: 1rem;
    padding-left: 0.5rem;
  }

  .cookie-settings-btn {
    bottom: 0.5rem;
    right: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .consent-content {
    padding: 1rem;
    margin: 0.5rem;
  }

  .consent-options {
    padding: 1rem;
  }

  .consent-toggle-label {
    gap: 0.5rem;
  }

  .consent-toggle-description {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e5e7eb;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .consent-content {
    border: 4px solid #000;
    background: #fff;
    color: #000;
  }

  .consent-title {
    color: #000;
  }

  .btn-primary {
    background: #000;
    border-color: #000;
    color: #fff;
  }

  .btn-secondary {
    background: #000;
    border-color: #000;
    color: #fff;
  }

  .btn-outline {
    background: #fff;
    border-color: #000;
    color: #000;
  }

  .consent-checkbox {
    border-color: #000;
  }

  .consent-checkbox:checked {
    background: #000;
    border-color: #000;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .cookie-consent-banner {
    animation: none;
  }

  .consent-content,
  .cookie-settings-btn,
  .consent-actions .btn {
    transition: none;
  }

  .btn-primary:hover,
  .btn-secondary:hover,
  .btn-outline:hover,
  .cookie-settings-btn:hover {
    transform: none;
  }
}

/* Print Styles */
@media print {
  .cookie-consent-banner,
  .cookie-settings-btn {
    display: none !important;
  }
}

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

/* Focus Improvements for Better Keyboard Navigation */
.consent-content:focus {
  outline: 3px solid #1d4ed8;
  outline-offset: 2px;
}

/* Loading State */
.consent-loading {
  opacity: 0.7;
  pointer-events: none;
}

.consent-loading .consent-actions .btn {
  position: relative;
}

.consent-loading .consent-actions .btn::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  margin: auto;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
