/* Cookie consent banner (SPCA-88). Brand palette: #ff5d22 accent, #221638 ink. */

.cookie-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  /* Above all site chrome (sticky nav, go-top, any future chat widget). */
  z-index: 99999;
  background: #ffffff;
  box-shadow: 0 -6px 30px rgba(34, 22, 56, 0.18);
  border-top: 3px solid #ff5d22;
  animation: cookieConsentIn 0.35s ease;
}

.cookie-consent[hidden] { display: none; }

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

.cookie-consent__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.cookie-consent__body { flex: 1 1 420px; min-width: 280px; }

.cookie-consent__title {
  font-size: 19px;
  font-weight: 700;
  color: #221638;
  margin: 0 0 8px;
}

.cookie-consent__text {
  font-size: 14px;
  line-height: 1.7;
  color: #6b6b84;
  margin: 0;
}

.cookie-consent__text a {
  color: #ff5d22;
  text-decoration: underline;
  margin-left: 4px;
}

/* Per-category toggles (revealed by "Customize"). */
.cookie-consent__categories {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.cookie-consent__categories[hidden] { display: none; }

.cookie-consent__category {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.55;
  color: #6b6b84;
  margin: 0;
  cursor: pointer;
}

.cookie-consent__category input {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: #ff5d22;
  flex: 0 0 auto;
}

.cookie-consent__category input:disabled { cursor: not-allowed; }
.cookie-consent__category strong { color: #221638; font-weight: 600; }

/* "This overrides your GPC signal" notice — informs a deliberate opt-in. */
.cookie-consent__gpc-notice {
  margin: 4px 0 0;
  padding: 9px 12px;
  font-size: 12.5px;
  line-height: 1.5;
  color: #8a4b00;
  background: #fff4e9;
  border-left: 3px solid #ff5d22;
  border-radius: 3px;
}
.cookie-consent__gpc-notice[hidden] { display: none; }

/* Actions. Accept and Reject are the same size and weight (no dark pattern). */
.cookie-consent__actions {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.cookie-consent__btn {
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  padding: 13px 24px;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.cookie-consent__btn:focus-visible {
  outline: 3px solid rgba(255, 93, 34, 0.5);
  outline-offset: 2px;
}

.cookie-consent__btn--primary {
  background: #ff5d22;
  color: #ffffff;
  border-color: #ff5d22;
}
.cookie-consent__btn--primary:hover { background: #e84d16; border-color: #e84d16; }

/* Reject is visually equal to Accept: same footprint, solid dark fill. */
.cookie-consent__btn--secondary {
  background: #221638;
  color: #ffffff;
  border-color: #221638;
}
.cookie-consent__btn--secondary:hover { background: #150c24; border-color: #150c24; }

.cookie-consent__btn--ghost {
  background: transparent;
  color: #221638;
  border-color: #c9c4d4;
}
.cookie-consent__btn--ghost:hover { border-color: #221638; }

/* Footer "Your Privacy Choices" re-entry link (GDPR withdraw + CCPA §1798.135). */
.js-cookie-settings {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.js-cookie-settings .privacy-choices-icon {
  flex: 0 0 auto;
  vertical-align: middle;
}
.js-cookie-settings:focus-visible {
  outline: 2px solid #ff5d22;
  outline-offset: 2px;
}

/* Opt-out confirmation badge (CCPA 2026). */
.cookie-opt-out-badge {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100000; /* above the banner itself */
  background: #221638;
  color: #ffffff;
  padding: 14px 20px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  max-width: calc(100vw - 40px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  animation: optOutBadgeIn 0.3s ease;
}

.cookie-opt-out-badge[hidden] { display: none; }

.cookie-opt-out-badge__close {
  background: none;
  border: none;
  color: inherit;
  font-size: 20px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}
.cookie-opt-out-badge__close:focus-visible {
  outline: 2px solid #ff5d22;
  outline-offset: 2px;
}

@keyframes optOutBadgeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 767px) {
  .cookie-consent__inner { padding: 20px 16px; gap: 18px; }
  .cookie-consent__actions { width: 100%; }
  .cookie-consent__btn { flex: 1 1 calc(50% - 6px); text-align: center; padding: 12px 14px; }
}
