/* ─── Cookie consent banner ──────────────────────────────────────────
   z-index is the theme's absolute maximum on purpose — this must sit above
   every other full-viewport overlay (matrix rain / arcade / golf-cart / CRT
   takeover all use very high but lower values). */
.ef-cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 2147483647;
  background: #fff;
  border-top: 1px solid var(--line, rgba(0,0,0,.08));
  box-shadow: 0 -12px 40px -16px rgba(11,11,31,.25);
  padding: 18px 32px;
  font-family: 'Outfit', system-ui, sans-serif;
}
.ef-cookie-banner[hidden] { display: none; }
.ef-cookie-banner.is-hiding { animation: ef-cookie-out .3s ease forwards; }
@keyframes ef-cookie-out { to { transform: translateY(100%); opacity: 0; } }

.ef-cookie-inner {
  max-width: 1240px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
}
.ef-cookie-text {
  margin: 0; font-size: 14px; line-height: 1.6; color: var(--text, #111127); max-width: 760px;
}
.ef-cookie-text a { color: var(--brand-purple, #4B1F8B); font-weight: 600; text-decoration: underline; }

.ef-cookie-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
/* Same animated conic-gradient stroke as the hero's primary CTA (.btn-stroke in
   theme.css) — just re-colored for a white background instead of the dark hero. */
.ef-cookie-actions .btn-stroke { color: var(--brand-purple, #4B1F8B); padding: 11px 22px; font-size: 14px; }
.ef-cookie-actions .btn-outline { padding: 11px 22px; font-size: 14px; }
.ef-cookie-manage-link {
  background: none; border: none; padding: 8px 4px; cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 600;
  color: var(--brand-purple, #4B1F8B); text-decoration: underline;
}

@media (max-width: 720px) {
  .ef-cookie-banner { padding: 16px 20px; }
  .ef-cookie-inner { flex-direction: column; align-items: stretch; gap: 14px; }
  .ef-cookie-actions { justify-content: stretch; flex-wrap: wrap; }
  .ef-cookie-actions .btn-stroke, .ef-cookie-actions .btn-outline { flex: 1; justify-content: center; }
  .ef-cookie-manage-link { flex-basis: 100%; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .ef-cookie-banner.is-hiding { animation: none; }
}

/* ─── Collapsed reopener (floating cookie icon) ─────────────────────
   Left edge, sitting just under the re:Invent tab's bottom:62px — that tab is
   homepage-only + temporary (removed after re:Invent), so this is the common
   case, not a hard collision guarantee; nudge `bottom` here if it ever visibly
   overlaps. Single-color purple stroke icon, same family as the other purple
   SVG icons on the site (blocks/icons.php: stroke-width 2.5, round caps). */
.ef-cookie-fab {
  position: fixed; left: 24px; bottom: 16px; z-index: 9998;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: #fff; border: 1px solid var(--line, rgba(0,0,0,.08));
  box-shadow: 0 8px 20px -6px rgba(75,31,139,.3);
  color: var(--brand-purple, #4B1F8B);
  cursor: pointer; padding: 0;
  transition: transform .2s ease, box-shadow .2s ease;
}
.ef-cookie-fab[hidden] { display: none; }
.ef-cookie-fab:hover { transform: scale(1.08); box-shadow: 0 10px 24px -6px rgba(75,31,139,.4); }
.ef-cookie-fab:focus-visible { outline: 2px solid var(--brand-purple, #4B1F8B); outline-offset: 2px; }

/* ─── Cookie settings modal (traditional category-toggle popup) ─────────
   Same max z-index as the banner — the two never show at once (opening the
   modal hides the banner underneath), but both need to clear every other
   full-viewport overlay on the site. */
.ef-cookie-modal {
  position: fixed; inset: 0; z-index: 2147483647;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(11,11,31,.5);
  font-family: 'Outfit', system-ui, sans-serif;
}
.ef-cookie-modal[hidden] { display: none; }
.ef-cookie-modal-card {
  width: 100%; max-width: 520px; max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: #fff; border-radius: var(--radius, 16px);
  box-shadow: 0 24px 70px -20px rgba(11,11,31,.4);
  padding: 28px 28px 24px;
}
.ef-cookie-modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 12px;
}
.ef-cookie-modal-head h2 { font-size: 20px; margin: 0; color: var(--text, #111127); }
.ef-cookie-modal-close {
  flex-shrink: 0; width: 32px; height: 32px; display: grid; place-items: center;
  background: none; border: none; border-radius: 8px; cursor: pointer;
  color: var(--muted, #6B7280);
}
.ef-cookie-modal-close:hover { background: rgba(11,11,31,.06); color: var(--text, #111127); }
.ef-cookie-modal-close:focus-visible { outline: 2px solid var(--brand-purple, #4B1F8B); outline-offset: 2px; }
.ef-cookie-modal-intro { font-size: 13.5px; line-height: 1.6; color: var(--muted, #6B7280); margin: 0 0 20px; }
.ef-cookie-modal-intro a { color: var(--brand-purple, #4B1F8B); font-weight: 600; text-decoration: underline; }

.ef-cookie-category { padding: 14px 0; border-top: 1px solid var(--line, rgba(0,0,0,.08)); }
.ef-cookie-category:last-of-type { border-bottom: 1px solid var(--line, rgba(0,0,0,.08)); }
.ef-cookie-category-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.ef-cookie-category-head strong { font-size: 14.5px; color: var(--text, #111127); }
.ef-cookie-category p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--muted, #6B7280); }
.ef-cookie-always-on {
  margin-left: auto; font-size: 11.5px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted, #6B7280);
}

/* Toggle switch: a checkbox visually hidden behind a pill track + thumb. */
.ef-cookie-toggle { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.ef-cookie-toggle input {
  position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer;
}
.ef-cookie-toggle-track {
  position: absolute; inset: 0; border-radius: 999px;
  background: rgba(11,11,31,.18);
  transition: background .18s ease;
}
.ef-cookie-toggle-track::before {
  content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(11,11,31,.3);
  transition: transform .18s ease;
}
.ef-cookie-toggle input:checked + .ef-cookie-toggle-track { background: var(--brand-purple, #4B1F8B); }
.ef-cookie-toggle input:checked + .ef-cookie-toggle-track::before { transform: translateX(18px); }
.ef-cookie-toggle input:focus-visible + .ef-cookie-toggle-track { outline: 2px solid var(--brand-purple, #4B1F8B); outline-offset: 2px; }
.ef-cookie-toggle.is-locked { opacity: .6; }
.ef-cookie-toggle.is-locked input { cursor: not-allowed; }

.ef-cookie-modal-actions {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px;
}
.ef-cookie-modal-actions .btn-outline, .ef-cookie-modal-actions .btn-stroke {
  padding: 11px 18px; font-size: 13.5px; flex: 1; justify-content: center; white-space: nowrap;
}
.ef-cookie-modal-actions .btn-stroke { color: var(--brand-purple, #4B1F8B); }

@media (max-width: 480px) {
  .ef-cookie-modal-card { padding: 22px 20px 20px; }
  .ef-cookie-modal-actions { flex-direction: column; }
  .ef-cookie-modal-actions .btn-outline, .ef-cookie-modal-actions .btn-stroke { flex: none; }
}
