/* ── COOKIE BANNER ──
 * Floating consent banner pinned to the viewport bottom. Carries its
 * own `.ays-light` scope so descendants pick up the cream-theme
 * tokens regardless of which page is mounted below it (Home, legal
 * cohort, etc.). Surface uses `--ays-surface-base` (white) over the
 * cream backdrop so the panel reads as elevated content rather than
 * blending into the page.
 *
 * Button shapes mirror the `/pricing` plan CTAs — outline (reject) +
 * gradient fill (accept) — keeping the consent CTA visually aligned
 * with the rest of the brand's primary actions. */
.ays-cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 16px;
  margin-inline: auto;
  /* Hug content centered on desktop, capped so a long body still
   * wraps to ≤ 720px instead of pushing the banner edge-to-edge. The
   * `calc(100% - 32px)` keeps a 16px gutter on either side when the
   * cap is reached on narrow viewports. */
  width: fit-content;
  max-width: min(720px, calc(100% - 32px));
  /* `.ays-light` in ays-base.css applies `min-height: 100vh` to extend
   * the cream backdrop full-viewport on page wrappers. The banner
   * only carries the class for token scoping — its height must hug
   * its own content, so reset the inherited minimum here. */
  min-height: auto;
  z-index: 200;
  background: var(--ays-surface-base);
  border: 1px solid var(--ays-border-base);
  /* No `--ays-theme-card-*` semantic yet; logged in
   * docs/bds-coverage-gaps.md. 16px matches the pre-redesign banner
   * shape, so leaving it hardcoded keeps the visual continuity. */
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 16px 40px oklch(27.12% 0.0201 311.81 / 0.12);
  animation: ays-cookie-banner-in 0.32s ease both;
  color: var(--ays-text-primary);
}

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

.ays-cookie-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.ays-cookie-banner-text {
  flex: 1 1 auto;
  min-width: 0;
}

.ays-cookie-banner-title {
  margin: 0 0 4px;
  font-family: var(--font-marketing-heading);
  font-weight: var(--fw-h5);
  color: var(--ays-text-primary);
}

.ays-cookie-banner-body {
  margin: 0;
  color: var(--ays-text-secondary);
}

.ays-cookie-banner-body a {
  color: var(--ays-text-brand);
  text-decoration: none;
  font-weight: var(--fw-p-medium);
}
.ays-cookie-banner-body a:hover {
  text-decoration: underline;
}

.ays-cookie-banner-actions {
  flex: 0 0 auto;
  display: flex;
  gap: var(--ays-spacing-12);
}

/* Shared button shape — type ramp + radius come from BDS marketing
 * scale variables. Per-variant fill/border/color overrides below. */
.ays-cookie-btn {
  font-family: var(--font-marketing-body);
  font-size: var(--fs-button-m);
  font-weight: var(--fw-p-medium);
  letter-spacing: var(--ls-marketing);
  padding: var(--ays-spacing-12) var(--ays-spacing-24);
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* Accept — primary gradient fill, mirrors `.ays-light .plan-btn-fill`
 * so the consent banner's main action reads with the same weight as
 * the rest of the site's primary CTAs. */
.ays-cookie-btn-fill {
  background: var(--grad-button);
  color: var(--ays-color-neutral-000);
  box-shadow: 0 6px 16px oklch(54.18% 0.2112 314.87 / 0.28);
}
.ays-cookie-btn-fill:hover {
  transform: scale(1.02);
  opacity: 0.94;
}

/* Reject — outline mirrors `.ays-light .plan-btn-outline`. Brand
 * border + brand text on transparent, with a soft brand-tinted
 * background on hover. */
.ays-cookie-btn-outline {
  background: transparent;
  border-color: var(--ays-text-brand);
  color: var(--ays-text-brand);
}
.ays-cookie-btn-outline:hover {
  background: var(--ays-color-primary-100);
}

@keyframes ays-cookie-banner-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── RESPONSIVE ── */
@media (max-width: 720px) {
  /* On mobile the inner stacks vertically and buttons stretch to fill
   * the row — fit-content would shrink the banner around the
   * narrowest content. Reset to fluid width with 12px gutters so the
   * stacked layout has room to breathe and tap targets stay wide. */
  .ays-cookie-banner {
    left: 12px;
    right: 12px;
    bottom: 12px;
    margin-inline: 0;
    width: auto;
    max-width: none;
    padding: 18px 20px;
  }
  .ays-cookie-banner-inner {
    flex-direction: column;
    align-items: stretch;
    gap: var(--ays-spacing-16);
  }
  .ays-cookie-banner-actions {
    justify-content: stretch;
  }
  .ays-cookie-btn {
    flex: 1 1 0;
  }
}
