/**
 * GDPR Cookie Consent Styles
 * ==========================
 * 
 * CSS styles for the cookie consent banner and settings modal.
 * Styled to match Elite Wheel Works design.
 */

/* Cookie Consent Banner - Compact, positioned bottom-left */
#cookieConsentBanner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: auto;
  z-index: 1050;
  padding: 0;
  max-width: 380px;
  transform: translateY(calc(100% + 20px));
  opacity: 0;
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
  pointer-events: auto;
}

#cookieConsentBanner:not(.d-none) {
  transform: translateY(0);
  opacity: 1;
}

/* Ensure banner doesn't interfere with page content */
#cookieConsentBanner .card {
  max-width: 100%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #fff;
  margin: 0;
}

#cookieConsentBanner .card-body {
  background: #fff;
  padding: 0.75rem !important;
}

#cookieConsentBanner h6 {
  font-size: 0.875rem;
  margin-bottom: 0.375rem;
  line-height: 1.3;
}

#cookieConsentBanner p {
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

#cookieConsentBanner .bi-cookie {
  font-size: 1rem !important;
  margin-right: 0.5rem;
  margin-top: 0.125rem;
  flex-shrink: 0;
}

#cookieConsentBanner .btn {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  line-height: 1.3;
}

#cookieConsentBanner .gap-2 {
  gap: 0.375rem !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #cookieConsentBanner {
    bottom: 15px;
    left: 15px;
    max-width: calc(100% - 30px);
  }
  
  #cookieConsentBanner .card-body {
    padding: 0.625rem !important;
  }
  
  #cookieConsentBanner h6 {
    font-size: 0.8125rem;
  }
  
  #cookieConsentBanner p {
    font-size: 0.6875rem;
  }
  
  #cookieConsentBanner .btn {
    font-size: 0.6875rem;
    padding: 0.2rem 0.4rem;
  }
  
  #cookieConsentBanner .d-flex.flex-md-row {
    flex-direction: column !important;
  }
  
  #cookieConsentBanner .gap-2 {
    gap: 0.25rem !important;
  }
}

@media (max-width: 480px) {
  #cookieConsentBanner {
    bottom: 10px;
    left: 10px;
    max-width: calc(100% - 20px);
  }
}

/* Cookie Settings Modal Enhancements */
#cookieSettingsModal .card {
  transition: all 0.3s ease;
  border: 1px solid #dee2e6;
}

#cookieSettingsModal .card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#cookieSettingsModal .form-check-input:checked {
  background-color: var(--primary, #D81324);
  border-color: var(--primary, #D81324);
}

#cookieSettingsModal .form-check-input:focus {
  border-color: var(--primary, #D81324);
  box-shadow: 0 0 0 0.25rem rgba(216, 19, 36, 0.25);
}

/* Badge styling */
#cookieSettingsModal .badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}

/* Link styling in banner */
#cookieConsentBanner a {
  color: var(--primary, #D81324);
  text-decoration: underline;
}

#cookieConsentBanner a:hover {
  color: var(--secondary, #0B2154);
}

/* Ensure banner is above other content */
#cookieConsentBanner {
  z-index: 1050;
}

/* Print styles - hide banner when printing */
@media print {
  #cookieConsentBanner,
  #cookieSettingsModal {
    display: none !important;
  }
}

/* Animation for banner appearance */
@keyframes slideUp {
  from {
    transform: translateY(calc(100% + 20px));
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Cookie icon styling */
#cookieConsentBanner .bi-cookie {
  color: var(--primary, #D81324);
}

/* Button styling to match site design */
#cookieConsentBanner .btn-primary {
  background-color: var(--primary, #D81324);
  border-color: var(--primary, #D81324);
}

#cookieConsentBanner .btn-primary:hover {
  background-color: var(--secondary, #0B2154);
  border-color: var(--secondary, #0B2154);
}

#cookieConsentBanner .btn-outline-primary {
  color: var(--primary, #D81324);
  border-color: var(--primary, #D81324);
}

#cookieConsentBanner .btn-outline-primary:hover {
  background-color: var(--primary, #D81324);
  border-color: var(--primary, #D81324);
  color: #fff;
}

/* Modal header styling */
#cookieSettingsModal .modal-header {
  background-color: var(--secondary, #0B2154);
  color: #fff;
}

#cookieSettingsModal .btn-close-white {
  filter: invert(1) grayscale(100%) brightness(200%);
}

/* Card header styling for cookie categories */
#cookieSettingsModal .card-header.bg-success {
  background-color: rgba(40, 167, 69, 0.1) !important;
  border-color: rgba(40, 167, 69, 0.2) !important;
}

/* Ensure modal is accessible */
#cookieSettingsModal .modal-dialog {
  max-height: 90vh;
  overflow-y: auto;
}

#cookieSettingsModal .modal-content {
  max-height: 90vh;
  overflow-y: auto;
}

