/* Action Force consent manager (SPEC-1017 s.0 tokens). Dependency-free.
   Deliberately UNLAYERED: site stylesheets use @layer, and unlayered rules win over layered ones,
   so the banner renders the same on every page regardless of the page's own CSS.
   Every selector is prefixed afc-. Light only. First layer is a full-width bottom bar (13px+ copy, 44px+ buttons). */

.afc-root,
.afc-footer-link {
  --afc-ink: var(--af-ink, #111318);
  --afc-ground: var(--af-ground, #f7f9fc);
  --afc-surface: var(--af-surface-strong, #ffffff);
  --afc-line: var(--af-line, #cbd3de);
  --afc-muted: var(--af-muted, #5d6673);
  --afc-red: var(--af-red, #d12828);
  --afc-ink-hover: #2a2e36;
  --afc-font-display: var(--af-font-force, "Barlow Condensed", "Arial Narrow", sans-serif);
  --afc-font-body: var(--af-font-body, Geist, ui-sans-serif, system-ui, sans-serif);
}

.afc-root[hidden],
.afc-root [hidden],
.afc-sr[hidden] { display: none !important; }

.afc-root {
  position: fixed;
  z-index: 2147483000;
  left: 0;
  right: 0;
  bottom: 0;
  box-sizing: border-box;
  width: 100%;
  max-height: 85vh;
  max-height: 85dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  background: var(--afc-surface);
  color: var(--afc-ink);
  border: 1px solid var(--afc-line);
  border-top: 4px solid var(--afc-ink);
  border-radius: 0;
  box-shadow: none;
  font-family: var(--afc-font-body);
  font-size: 16px;
  line-height: 1.5;
  text-align: left;
  -webkit-text-size-adjust: 100%;
  /* overlay: off-screen + transparent until consent.js adds .afc-open; closing removes it again (slide down), then hides */
  transform: translateY(100%);
  opacity: 0;
  transition: transform 300ms ease-out, opacity 300ms ease-out;
  will-change: transform, opacity;
}

.afc-root.afc-open { transform: none; opacity: 1; }
.afc-root.afc-leaving { pointer-events: none; }

.afc-root *,
.afc-root *::before,
.afc-root *::after { box-sizing: border-box; }

@media (min-width: 720px) {
  .afc-root { padding: 16px 24px calc(16px + env(safe-area-inset-bottom, 0px)); }
}

.afc-title {
  margin: 0 0 8px;
  font-family: var(--afc-font-display);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: .01em;
  text-transform: uppercase;
  color: var(--afc-ink);
}

.afc-title:focus { outline: none; }
.afc-title:focus-visible { outline: 3px solid var(--afc-ink); outline-offset: 4px; }

.afc-body,
.afc-line,
.afc-gpc,
.afc-links {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--afc-ink);
}

.afc-gpc {
  padding: 10px 12px;
  border-left: 4px solid var(--afc-ink);
  background: var(--afc-ground);
  font-weight: 600;
}

.afc-links { margin-bottom: 18px; }

.afc-root a {
  color: var(--afc-ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.afc-root a:hover { text-decoration-thickness: 2px; }

.afc-root :focus-visible {
  outline: 3px solid var(--afc-ink);
  outline-offset: 4px;
}

/* Buttons */
.afc-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 720px) {
  .afc-actions { flex-direction: row; align-items: stretch; }
}

.afc-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--afc-ink);
  border-radius: 0;
  background: var(--afc-ink);
  color: #fff;
  font-family: var(--afc-font-body);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  width: 100%;
  transition: background-color 120ms ease-out;
}

@media (min-width: 720px) {
  .afc-btn { flex: 1 1 0; width: auto; min-width: 0; }
  .afc-btn--auto { flex: 0 0 auto; padding-left: 20px; padding-right: 20px; }
}

.afc-btn:hover { background: var(--afc-ink-hover); border-color: var(--afc-ink-hover); }

.afc-btn--outline {
  background: transparent;
  color: var(--afc-ink);
  border-color: var(--afc-ink);
}

.afc-btn--outline:hover { background: rgba(17, 19, 24, .06); border-color: var(--afc-ink); }

.afc-nw { white-space: nowrap; }

.afc-back {
  appearance: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: -8px 0 4px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--afc-ink);
  font-family: var(--afc-font-body);
  font-size: 15px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

/* Layer 2 rows */
.afc-rows { margin: 12px 0 8px; }

.afc-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 16px;
  row-gap: 4px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--afc-line);
}

.afc-row:last-child { border-bottom: 1px solid var(--afc-line); }

.afc-row-name {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--afc-ink);
}

.afc-row-desc {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--afc-muted);
}

.afc-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 0;
  background: #e7ecf2; /* --af-pearl: a status label, deliberately not button-like */
  color: var(--afc-ink);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

/* Switch: whole <label> row and the button are both hit targets (>=44px) */
.afc-switch-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.afc-switch-text {
  min-width: 28px;
  font-size: 14px;
  font-weight: 700;
  text-align: right;
  color: var(--afc-ink);
}

.afc-switch {
  appearance: none;
  position: relative;
  flex: none;
  width: 56px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.afc-switch::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 56px;
  height: 28px;
  border: 2px solid var(--afc-ink);
  border-radius: 0;
  background: var(--afc-surface);
  transition: background-color 120ms ease-out;
}

.afc-switch::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 14px;
  width: 16px;
  height: 16px;
  border-radius: 0;
  background: var(--afc-ink);
  transition: transform 120ms ease-out, background-color 120ms ease-out;
}

.afc-switch[aria-checked="true"]::before { background: var(--afc-ink); }
.afc-switch[aria-checked="true"]::after { background: #fff; transform: translateX(28px); }

.afc-label { cursor: pointer; display: block; }

/* Visually hidden live region */
.afc-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Footer re-open link: looks like the sibling <a> footer links */
.afc-footer-link {
  appearance: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.afc-footer-link:focus-visible { outline: 3px solid #111318; outline-offset: 4px; }

@media (prefers-reduced-motion: reduce) {
  .afc-root { transition: none; will-change: auto; }
  .afc-btn,
  .afc-switch::before,
  .afc-switch::after { transition: none; }
}

/* Layer 2 (roast fixes): Save leads; Accept + Reject are an identical outline pair; actions stay
   pinned at the bottom of the scrolling card so Reject is never below the fold on phones. */
.afc-actions--settings {
  position: sticky;
  bottom: -14px;
  margin: 0 -16px -14px;
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  background: var(--afc-surface);
  border-top: 1px solid var(--afc-line);
  flex-direction: column;
}
.afc-pair { display: flex; gap: 12px; }
.afc-pair .afc-btn { flex: 1 1 0; min-width: 0; width: auto; }
@media (min-width: 720px) {
  .afc-actions--settings { bottom: -16px; margin: 0 -24px -16px; padding: 12px 24px 16px; flex-direction: column; }
  .afc-actions--settings > .afc-btn { flex: none; width: 100%; }
}
.afc-row--compact { padding: 10px 0; }
.afc-hint { color: var(--afc-muted); font-size: 14px; }
.afc-rows .afc-row:last-child { border-bottom: 0; }

/* First layer: ONE sentence in a full-width fixed bottom overlay at every width. It slides over the page (it may cover
   the footer while open; it never pads or pushes the page). Accept + Reject are identical; Customize is an outline button.
   <1100px: copy above, three equal buttons below. >=1100px: copy left, buttons right, 2 lines at 1440+. */
.afc-view[data-afc-view="summary"] { display: flex; flex-direction: column; gap: 10px; max-width: 1232px; margin: 0 auto; }
.afc-view[data-afc-view="settings"] { max-width: 640px; margin: 0 auto; }
.afc-view[data-afc-view="summary"] .afc-title { /* screen-reader name of the dialog; the bar needs no visible heading */
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.afc-copy { margin: 0; font-size: 13px; line-height: 1.4; color: var(--afc-ink); }
.afc-copy .afc-body { display: inline; margin: 0; font-size: inherit; line-height: inherit; }
.afc-copy a { margin-left: 4px; white-space: nowrap; }
.afc-copy .afc-gpc { display: block; margin: 8px 0 0; }
.afc-view[data-afc-view="summary"] .afc-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.afc-view[data-afc-view="summary"] .afc-btn { width: auto; min-width: 0; min-height: 48px; padding: 6px 8px; font-size: 14px; }
/* Narrow phones: three equal columns are ~90px; let labels wrap so "Reject non-essential" never overflows. Sizes stay identical. */
@media (max-width: 379px) {
  .afc-view[data-afc-view="summary"] .afc-btn { white-space: normal; line-height: 1.15; overflow-wrap: anywhere; font-size: 13px; }
}
@media (min-width: 720px) {
  .afc-copy { font-size: 14px; }
  .afc-view[data-afc-view="summary"] .afc-actions { gap: 12px; }
  .afc-view[data-afc-view="summary"] .afc-btn { min-height: 52px; padding: 10px 12px; font-size: 16px; }
}
@media (min-width: 1100px) {
  .afc-view[data-afc-view="summary"] { flex-direction: row; align-items: center; gap: 24px; }
  .afc-copy { flex: 1 1 auto; min-width: 0; font-size: 15px; }
  .afc-view[data-afc-view="summary"] .afc-actions { flex: 0 0 auto; grid-template-columns: 200px 200px auto; }
  .afc-view[data-afc-view="summary"] .afc-btn--auto { padding-left: 20px; padding-right: 20px; }
}
