/* Cookie Consent Custom Styles */

:root {
  --background: #2a9df4;
  --collection: #002147;
}

.cookie-consent-wrapper {
  position: relative;
}

.cookie-consent-dialog {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1050;
  background-color: #ffffff;
  border-top: 1px solid #dee2e6;
  box-shadow: 0 -0.5rem 1rem rgba(0, 0, 0, 0.15);
  padding: 1rem 0;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideDown {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(100%);
    opacity: 0;
  }
}

.cookie-consent-content {
  padding-right: 1rem;
}

.cookie-consent-title {
  color: #212529;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.cookie-consent-text {
  color: #6c757d;
  font-size: 0.9rem;
  line-height: 1.4;
}

.cookie-consent-text a {
  color: #0d6efd;
  text-decoration: none;
}

.cookie-consent-text a:hover {
  text-decoration: underline;
}

.cookie-consent-buttons {
  min-width: 200px;
}

@media (max-width: 767.98px) {
  .cookie-consent-dialog {
    padding: 0.75rem 0;
  }

  .cookie-consent-content {
    padding-right: 0;
    margin-bottom: 1rem;
  }

  .cookie-consent-buttons {
    min-width: auto;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .cookie-consent-dialog {
    background-color: #212529;
    border-top-color: #495057;
  }

  .cookie-consent-title {
    color: #f8f9fa;
  }

  .cookie-consent-text {
    color: #adb5bd;
  }
}

/* Cookie category styles */
.cookie-category {
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  padding: 1rem;
  background-color: #f8f9fa;
  margin-bottom: 1rem;
  transition: background-color 0.2s ease;
  cursor: pointer;
}

.cookie-category:hover:not([data-category=""]) {
  background-color: #e9ecef;
}

.cookie-category h6 {
  margin-bottom: 0.5rem;
  color: #212529;
}

.cookie-category p {
  margin-bottom: 0;
  font-size: 0.875rem;
}

/* Custom form switch styles to ensure compatibility */
.cookie-form-switch {
  position: relative;
  display: inline-block;
  min-width: 60px;
  height: 34px;
}

.cookie-form-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
  user-select: none;
}

.cookie-slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

.cookie-slider:hover {
  background-color: #bbb;
}

input:checked + .cookie-slider {
  background-color: #0d6efd;
}

input:checked + .cookie-slider:hover {
  background-color: #0b5ed7;
}

.blue-btn {
  background: var(--background) !important;
}

.blue-btn:hover {
  background: var(--collection) !important;
}

input:focus + .cookie-slider {
  box-shadow: 0 0 1px #0d6efd;
}

input:checked + .cookie-slider:before {
  transform: translateX(26px);
}

input:disabled + .cookie-slider {
  background-color: #28a745;
  cursor: not-allowed;
}

input:disabled + .cookie-slider:hover {
  background-color: #28a745;
}

/* Fixed modal display issues */
.modal-body {
  max-height: 70vh;
  overflow-y: auto;
}

/* Ensure modal content is visible */
#cookiePreferencesModal .modal-content {
  background-color: #ffffff;
  border: 1px solid #dee2e6;
}

#cookiePreferencesModal .modal-body {
  background-color: #ffffff;
  color: #212529;
}

/* Toast container positioning */
.toast-container {
  z-index: 1055;
}
