/* ============================================================
   COOKIE CONSENT BANNER (CCPA / CPRA)
   Loads site-wide, so it can't rely on the Aileron design-system
   tokens (those are scoped to the page templates). Colours are
   inlined here and chosen for WCAG AA contrast on the dark panel.
   ============================================================ */

.as-consent,
.as-consent *,
.as-consent-reopen { box-sizing: border-box; }

.as-consent {
  position: fixed;
  z-index: 2147483000;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  max-width: 660px;
  margin-inline: auto;
  padding: clamp(1rem, 2.4vw, 1.4rem) clamp(1.1rem, 2.6vw, 1.5rem);
  background: #0b0d16;                         /* panel */
  color: #f3efe6;                              /* bone — 15.9:1 on panel */
  border: 1px solid rgba(243, 239, 230, 0.22);
  border-radius: 14px;
  box-shadow: 0 18px 50px -12px rgba(0, 0, 0, 0.75);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.95rem;
  line-height: 1.5;
}
.as-consent[hidden] { display: none; }

.as-consent__title {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
}
.as-consent__text {
  margin: 0 0 1rem;
  color: rgba(243, 239, 230, 0.86);           /* 13.7:1 on panel */
}
.as-consent__text a {
  color: #ff6faa;                             /* 6.6:1 on panel */
  text-decoration: underline;
  text-underline-offset: 2px;
}
.as-consent__text a:hover { text-decoration-thickness: 2px; }

.as-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.as-consent__btn {
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  padding: 0.62rem 1.1rem;
  border: 1px solid transparent;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}
.as-consent__btn--accept {
  background: #d81b60;                         /* accessible brand magenta, #fff text = 4.6:1 */
  color: #ffffff;
}
.as-consent__btn--accept:hover { background: #c2185b; }
.as-consent__btn--decline {
  background: transparent;
  color: #f3efe6;
  border-color: rgba(243, 239, 230, 0.55);    /* 3.6:1 boundary */
}
.as-consent__btn--decline:hover {
  border-color: #f3efe6;
  background: rgba(243, 239, 230, 0.08);
}

/* persistent re-open control — only shown after a choice is made */
.as-consent-reopen {
  position: fixed;
  z-index: 2147482000;
  left: 1rem;
  bottom: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  background: #0b0d16;
  color: #f3efe6;
  border: 1px solid rgba(243, 239, 230, 0.3);
  border-radius: 999px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.as-consent-reopen[hidden] { display: none; }
.as-consent-reopen::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #ff6faa;                   /* toggle glyph */
  flex: none;
}
.as-consent-reopen:hover { border-color: rgba(243, 239, 230, 0.6); }

/* visible focus for every interactive part */
.as-consent__btn:focus-visible,
.as-consent__text a:focus-visible,
.as-consent-reopen:focus-visible {
  outline: 2px solid #ff6faa;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: no-preference) {
  .as-consent { animation: as-consent-in 0.3s ease both; }
}
@keyframes as-consent-in {
  from { transform: translateY(14px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
