/* Cookie consent banner + modal (CMP-lite) */

.cookie-consent-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 2000;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 14px;
  color: rgba(0, 0, 0, 0.9);
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.cookie-consent-text {
  font-size: 0.95rem;
  line-height: 1.25rem;
  margin: 0;
  color: rgba(0, 0, 0, 0.82);
}

.cookie-consent-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.cookie-consent-actions .btn {
  border-radius: 10px;
}

.cookie-consent-actions .btn,
#cookieConsentModal .modal-footer .btn,
.cookie-policy-actions .btn {
  /* Enforce bootstrap-like btn-sm sizing even if overridden elsewhere */
  font-size: 0.875rem !important;
  padding: 0.25rem 0.5rem !important;
  line-height: 1.5 !important;
}

/* Cookie policy page: title sizing */
.cookie-policy-title {
  font-size: 25.6px !important;
  line-height: 1.2 !important;
}

/* Cookie policy page: dark mode readability */
body.dark-mode .cookie-policy-page,
body.dark-mode .cookie-policy-page p,
body.dark-mode .cookie-policy-page li,
body.dark-mode .cookie-policy-page h1,
body.dark-mode .cookie-policy-page h2,
body.dark-mode .cookie-policy-page h3,
body.dark-mode .cookie-policy-page h4,
body.dark-mode .cookie-policy-page h5,
body.dark-mode .cookie-policy-page h6 {
  color: rgba(255, 255, 255, 0.95) !important;
}

body.dark-mode .cookie-policy-page .lead {
  color: rgba(255, 255, 255, 0.85) !important;
}

/* Cookie policy page: table styling for dark mode */
body.dark-mode .cookie-policy-page .cookie-policy-table {
  background-color: rgba(20, 20, 20, 0.85) !important;
  color: rgba(255, 255, 255, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
}
body.dark-mode .cookie-policy-page .cookie-policy-table th,
body.dark-mode .cookie-policy-page .cookie-policy-table td {
  background-color: transparent !important;
  color: rgba(255, 255, 255, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
}
body.dark-mode .cookie-policy-page .cookie-policy-table thead th,
body.dark-mode .cookie-policy-page .cookie-policy-table thead td,
body.dark-mode .cookie-policy-page .cookie-policy-table thead.table-light th {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: rgba(255, 255, 255, 0.98) !important;
}
body.dark-mode .cookie-policy-page .cookie-policy-table code {
  color: rgba(255, 255, 255, 0.95) !important;
  background-color: rgba(255, 255, 255, 0.10) !important;
  border-radius: 6px;
  padding: 2px 6px;
}

/* Cookie policy table: compact rows + prevent horizontal overflow */
.cookie-policy-page .cookie-policy-table th,
.cookie-policy-page .cookie-policy-table td {
  padding-top: 4px !important;
  padding-bottom: 4px !important;
  padding-left: 8px !important;
  padding-right: 8px !important;
}
.cookie-policy-page .cookie-policy-table {
  width: 100%;
  table-layout: fixed;
}
.cookie-policy-page .cookie-policy-table td {
  word-break: break-word;
}
.cookie-policy-page .cookie-policy-table code {
  white-space: normal;
  word-break: break-word;
}

.cookie-consent-link {
  color: rgba(0, 0, 0, 0.82);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-consent-link:hover {
  color: rgba(0, 0, 0, 0.95);
}

/* Defensive overrides: landing/main dark-mode styles sometimes force <p> colors */
body.dark-mode .cookie-consent-banner,
body.dark-mode .cookie-consent-banner .cookie-consent-text,
body.dark-mode .cookie-consent-banner .cookie-consent-text * {
  color: rgba(255, 255, 255, 0.95) !important;
}
body.dark-mode .cookie-consent-banner .cookie-consent-link {
  color: rgba(255, 255, 255, 0.92) !important;
}

/* Dark mode banner surface */
body.dark-mode .cookie-consent-banner {
  border-color: rgba(255, 255, 255, 0.12) !important;
  background: rgba(20, 20, 20, 0.92) !important;
}

/* Light mode button styling (override bootstrap light-outline classes) */
body:not(.dark-mode) .cookie-consent-banner .btn.btn-outline-light {
  color: rgba(0, 0, 0, 0.88) !important;
  border-color: rgba(0, 0, 0, 0.28) !important;
  background: transparent !important;
}
body:not(.dark-mode) .cookie-consent-banner .btn.btn-outline-light:hover {
  background: rgba(0, 0, 0, 0.04) !important;
}
body:not(.dark-mode) .cookie-consent-banner .btn.btn-light {
  background: #111 !important;
  border-color: #111 !important;
  color: #fff !important;
}
body:not(.dark-mode) .cookie-consent-banner .btn.btn-light:hover {
  background: #000 !important;
  border-color: #000 !important;
  color: #fff !important;
}

/* Footer "Cookie Preferences" link should stay inline */
.footer-cookie-pref,
.footer-cookie-pref a {
  display: inline !important;
  white-space: nowrap;
}

/* Cookie Preferences links (no underline; black in light, white in dark) */
.cookie-pref-link {
  text-decoration: none !important;
  color: rgba(0, 0, 0, 0.9) !important;
}
body.dark-mode .cookie-pref-link {
  color: rgba(255, 255, 255, 0.95) !important;
}
.cookie-pref-link:hover,
.cookie-pref-link:focus {
  text-decoration: none !important;
}

/* Cookie preferences modal: switch ON color */
#cookieConsentModal .form-check-input:checked {
  background-color: #8B5CDC !important;
  border-color: #8B5CDC !important;
}

#cookieConsentModal .form-check-input:focus {
  border-color: #8B5CDC !important;
  box-shadow: 0 0 0 0.25rem rgba(139, 92, 220, 0.25) !important;
}

/* Floating Cookie Preferences button removed by design */

.cookie-consent-category {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
}

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

.cookie-consent-category-title {
  font-weight: 600;
}

.cookie-consent-category-desc {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-top: 2px;
}

@media (max-width: 576px) {
  .cookie-consent-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 12px;
    flex-direction: column;
    align-items: stretch;
  }
  .cookie-consent-actions {
    justify-content: center;
  }
}

