/* Cookie consent banner (inc/consent.php + assets/js/consent.js). Navy glass card, orange accent,
   logical properties for RTL, bottom sheet on phones, no motion for prefers-reduced-motion. */

@property --apexa-cc-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

.apexa-cc {
  --cc-bg: rgba(29, 39, 45, 0.94);
  --cc-line: rgba(255, 255, 255, 0.1);
  --cc-text: rgba(255, 255, 255, 0.84);
  --cc-mute: rgba(255, 255, 255, 0.62);
  --cc-accent: #fd9d49;
  --cc-accent-2: #feaa5f;
  --cc-ink: #1d272d;
  --cc-ease: cubic-bezier(0.2, 0.9, 0.25, 1.12);
  position: fixed;
  z-index: 9999; /* above the page, below the custom cursor (.cursor-ring 10000, .cursor-dot 10001) */
  inset-inline-start: max(16px, env(safe-area-inset-left));
  bottom: max(16px, env(safe-area-inset-bottom));
  width: min(440px, calc(100vw - 32px));
  color: #fff;
  font-family: "aktiv-grotesk", "Inter", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.apexa-cc[hidden] { display: none; }

.apexa-cc__card {
  position: relative;
  isolation: isolate;
  padding: 22px 22px 16px;
  border-radius: 22px;
  background: var(--cc-bg);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 28px 70px -18px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--cc-line) inset;
  overflow: hidden;
  transform-origin: 30% 100%;
}

/* Slowly turning orange edge. */
.apexa-cc__glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(from var(--apexa-cc-angle), transparent 0deg, rgba(253, 157, 73, 0.9) 60deg, transparent 140deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: apexa-cc-spin 7s linear infinite;
  opacity: 0.85;
  pointer-events: none;
}
.apexa-cc__card::after {
  content: "";
  position: absolute;
  inset-inline-end: -60px;
  top: -80px;
  width: 220px;
  height: 220px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(253, 157, 73, 0.18), transparent);
  pointer-events: none;
}

.apexa-cc__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}
/* Lilly eating a cookie: a 6 s loop of three bites with chewing, falling crumbs and a fresh cookie,
   plus blinking and an ear twitch on their own rhythms. */
.apexa-cc__lilly {
  flex: 0 0 auto;
  width: 92px;
  height: 71px;
  margin: -12px -6px -6px -10px;
  overflow: visible;
}
.apexa-cc__lilly * { transform-box: fill-box; }
.apexa-cc__lilly-all { transform-origin: 50% 90%; }
.apexa-cc__lilly-head { transform-origin: 50% 80%; animation: apexa-cc-munch-head 6s ease-in-out infinite; }
.apexa-cc__jaw { transform-origin: 50% 0%; animation: apexa-cc-chew 6s ease-in-out infinite; }
.apexa-cc__eyes { transform-origin: 50% 50%; animation: apexa-cc-blink 4.3s ease-in-out infinite; }
.apexa-cc__ear--l { transform-origin: 90% 8%; animation: apexa-cc-ear-l 6s ease-in-out infinite; }
.apexa-cc__ear--r { transform-origin: 10% 8%; animation: apexa-cc-ear-r 6s ease-in-out infinite; }
.apexa-cc__tail { transform-origin: 85% 90%; animation: apexa-cc-wag 1.6s ease-in-out infinite; }
.apexa-cc__cookie { transform-origin: 30% 50%; animation: apexa-cc-cookie 6s cubic-bezier(0.3, 0.7, 0.3, 1) infinite; }
.apexa-cc__bite { transform-origin: 50% 50%; transform: scale(0); }
.apexa-cc__bite--1 { animation: apexa-cc-bite1 6s steps(1, end) infinite; }
.apexa-cc__bite--2 { animation: apexa-cc-bite2 6s steps(1, end) infinite; }
.apexa-cc__bite--3 { animation: apexa-cc-bite3 6s steps(1, end) infinite; }
.apexa-cc__crumb { opacity: 0; }
.apexa-cc__crumb--1 { animation: apexa-cc-crumb1 6s ease-in infinite; }
.apexa-cc__crumb--2 { animation: apexa-cc-crumb2 6s ease-in infinite; }
.apexa-cc__crumb--3 { animation: apexa-cc-crumb3 6s ease-in infinite; }
.apexa-cc__sparkles { opacity: 0; transform-origin: 50% 50%; }

.apexa-cc__title {
  margin: 0;
  font-family: "aktiv-grotesk-extended", "Plus Jakarta Sans", sans-serif;
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: #fff;
}
.apexa-cc__text {
  margin: 0 0 10px;
  color: var(--cc-text);
  font-size: 0.92rem;
}

/* Disclosure */
.apexa-cc__details-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 2px 0;
  border: 0;
  background: none;
  color: var(--cc-accent-2);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}
.apexa-cc__details-toggle svg { width: 16px; height: 16px; transition: transform 0.35s var(--cc-ease); }
.apexa-cc__details[data-open="true"] .apexa-cc__details-toggle svg { transform: rotate(180deg); }
.apexa-cc__details-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--cc-ease);
}
.apexa-cc__details[data-open="true"] .apexa-cc__details-panel { grid-template-rows: 1fr; }
.apexa-cc__details-inner { min-height: 0; overflow: hidden; }
.apexa-cc__cat {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 1px var(--cc-line) inset;
}
.apexa-cc__cat p { margin: 4px 0 0; color: var(--cc-mute); font-size: 0.82rem; line-height: 1.5; }
.apexa-cc__cat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 0.88rem; }
.apexa-cc__pill {
  flex: 0 0 auto;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(155, 227, 176, 0.14);
  color: #9be3b0;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.apexa-cc__pill--opt { background: rgba(253, 157, 73, 0.14); color: var(--cc-accent-2); }
.apexa-cc__more { margin: 10px 0 2px; font-size: 0.82rem; }
.apexa-cc__more a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* Equal-weight choices: declining is exactly as easy as accepting. */
.apexa-cc__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.apexa-cc__btn {
  position: relative;
  min-height: 46px;
  padding: 10px 14px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.2s var(--cc-ease), box-shadow 0.25s ease, background-color 0.25s ease;
}
.apexa-cc__btn--decline { background: rgba(255, 255, 255, 0.95); color: var(--cc-ink); }
.apexa-cc__btn--accept {
  background: linear-gradient(180deg, var(--cc-accent-2), var(--cc-accent));
  color: var(--cc-ink);
  box-shadow: 0 10px 24px -10px rgba(253, 157, 73, 0.75);
}
.apexa-cc__btn:hover { transform: translateY(-1px); }
.apexa-cc__btn--decline:hover { background: #fff; }
.apexa-cc__btn--accept:hover { box-shadow: 0 14px 30px -10px rgba(253, 157, 73, 0.9); }
.apexa-cc__btn:active { transform: scale(0.97); }
.apexa-cc__btn:focus-visible,
.apexa-cc__details-toggle:focus-visible,
.apexa-cc__more a:focus-visible,
.apexa-cc-open:focus-visible {
  outline: 2px solid var(--cc-accent);
  outline-offset: 3px;
}
.apexa-cc__note { margin: 10px 2px 0; color: var(--cc-mute); font-size: 0.74rem; line-height: 1.45; text-align: center; }

/* Entrance: card springs up, content follows in a short stagger. */
.apexa-cc.is-in .apexa-cc__card { animation: apexa-cc-rise 0.75s var(--cc-ease) both; }
.apexa-cc.is-in .apexa-cc__head,
.apexa-cc.is-in .apexa-cc__text,
.apexa-cc.is-in .apexa-cc__details,
.apexa-cc.is-in .apexa-cc__actions,
.apexa-cc.is-in .apexa-cc__note { animation: apexa-cc-fade-up 0.6s var(--cc-ease) both; }
.apexa-cc.is-in .apexa-cc__head { animation-delay: 0.12s; }
.apexa-cc.is-in .apexa-cc__text { animation-delay: 0.18s; }
.apexa-cc.is-in .apexa-cc__details { animation-delay: 0.24s; }
.apexa-cc.is-in .apexa-cc__actions { animation-delay: 0.3s; }
.apexa-cc.is-in .apexa-cc__note { animation-delay: 0.36s; }

/* Accepted: Lilly hops with joy + sparkle burst. Declined: a friendly head tilt, never a guilt trip. */
.apexa-cc.is-accepted .apexa-cc__lilly-all { animation: apexa-cc-yay 0.7s var(--cc-ease) both; }
.apexa-cc.is-accepted .apexa-cc__sparkles { animation: apexa-cc-burst 0.7s ease-out both; }
.apexa-cc.is-accepted .apexa-cc__tail { animation-duration: 0.28s; }
.apexa-cc.is-declined .apexa-cc__lilly-all { animation: apexa-cc-nod 0.5s ease-in-out both; }
.apexa-cc.is-out .apexa-cc__card { animation: apexa-cc-leave 0.45s cubic-bezier(0.4, 0, 0.7, 0.2) both; }

@keyframes apexa-cc-spin { to { --apexa-cc-angle: 360deg; } }
@keyframes apexa-cc-rise {
  0% { opacity: 0; transform: translateY(28px) scale(0.94); filter: blur(6px); }
  60% { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: none; filter: none; }
}
@keyframes apexa-cc-fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
/* Bites land at 12 %, 40 % and 68 %; the cookie is gone at 84 % and a fresh one pops in at 92 %. */
@keyframes apexa-cc-cookie {
  0% { transform: translateX(2px) scale(1); opacity: 1; }
  8%, 80% { transform: translateX(0) scale(1); opacity: 1; }
  84%, 89% { transform: translateX(0) scale(0.2); opacity: 0; }
  95% { transform: translateX(2px) scale(1.12); opacity: 1; }
  100% { transform: translateX(2px) scale(1); opacity: 1; }
}
@keyframes apexa-cc-bite1 { 0% { transform: scale(0); } 12% { transform: scale(1); } 90% { transform: scale(0); } }
@keyframes apexa-cc-bite2 { 0% { transform: scale(0); } 40% { transform: scale(1); } 90% { transform: scale(0); } }
@keyframes apexa-cc-bite3 { 0% { transform: scale(0); } 68% { transform: scale(1); } 90% { transform: scale(0); } }
@keyframes apexa-cc-munch-head {
  0%, 9%, 30%, 37%, 58%, 65%, 86%, 100% { transform: rotate(0); }
  11%, 39%, 67% { transform: translateY(2.5px) rotate(2deg); }
  16%, 44%, 72% { transform: translateY(0.5px) rotate(-1deg); }
  22%, 50%, 78% { transform: translateY(1.5px) rotate(1deg); }
}
@keyframes apexa-cc-chew {
  0%, 10%, 30%, 38%, 58%, 66%, 86%, 100% { transform: scaleY(1); }
  12%, 18%, 24%, 40%, 46%, 52%, 68%, 74%, 80% { transform: scaleY(0.55); }
  15%, 21%, 27%, 43%, 49%, 55%, 71%, 77%, 83% { transform: scaleY(1.05); }
}
@keyframes apexa-cc-blink { 0%, 44%, 50%, 100% { transform: scaleY(1); } 47% { transform: scaleY(0.1); } }
/* Hanging ears swing a beat behind each bite; the tail wags slowly all the time. */
@keyframes apexa-cc-ear-l {
  0%, 10%, 32%, 38%, 60%, 66%, 88%, 100% { transform: rotate(0); }
  14%, 42%, 70% { transform: rotate(6deg); }
  20%, 48%, 76% { transform: rotate(-3deg); }
  26%, 54%, 82% { transform: rotate(1.5deg); }
}
@keyframes apexa-cc-ear-r {
  0%, 10%, 32%, 38%, 60%, 66%, 88%, 100% { transform: rotate(0); }
  14%, 42%, 70% { transform: rotate(-4deg); }
  20%, 48%, 76% { transform: rotate(3deg); }
  26%, 54%, 82% { transform: rotate(-1.5deg); }
}
@keyframes apexa-cc-wag { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(8deg); } }
@keyframes apexa-cc-crumb1 { 0%, 12% { opacity: 0; transform: translate(0, 0); } 13% { opacity: 1; } 26% { opacity: 0; transform: translate(-2px, 12px); } 100% { opacity: 0; } }
@keyframes apexa-cc-crumb2 { 0%, 40% { opacity: 0; transform: translate(0, 0); } 41% { opacity: 1; } 54% { opacity: 0; transform: translate(1px, 10px); } 100% { opacity: 0; } }
@keyframes apexa-cc-crumb3 { 0%, 68% { opacity: 0; transform: translate(0, 0); } 69% { opacity: 1; } 82% { opacity: 0; transform: translate(3px, 12px); } 100% { opacity: 0; } }
@keyframes apexa-cc-yay {
  0% { transform: translateY(0) rotate(0); }
  35% { transform: translateY(-7px) rotate(-6deg); }
  70% { transform: translateY(1px) rotate(4deg); }
  100% { transform: translateY(0) rotate(0); }
}
@keyframes apexa-cc-burst { 0% { opacity: 0; transform: scale(0.6); } 30% { opacity: 1; } 100% { opacity: 0; transform: scale(1.35); } }
@keyframes apexa-cc-nod { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-10deg); } 65% { transform: rotate(6deg); } }
@keyframes apexa-cc-leave { to { opacity: 0; transform: translateY(22px) scale(0.95); filter: blur(4px); } }

/* Footer "Cookie settings" link looks like the legal links next to it. */
.apexa-cc-open {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.apexa-cc-open:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer-v6__legal-links .apexa-cc-open { position: relative; color: rgba(255, 255, 255, 0.7); font-size: inherit; }
.footer-v6__legal-links .apexa-cc-open:hover { color: var(--fv6-accent, #fd9d49); text-decoration: none; }
.footer-v6__legal-links a + .apexa-cc-open::before { content: "·"; position: absolute; inset-inline-start: -0.6rem; color: rgba(255, 255, 255, 0.25); }

/* Phones: a bottom sheet across the full width. */
@media (max-width: 560px) {
  .apexa-cc {
    inset-inline: max(10px, env(safe-area-inset-left)) max(10px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    width: auto;
  }
  .apexa-cc__card { padding: 18px 16px 14px; border-radius: 20px; max-height: calc(100vh - 20px); overflow-y: auto; }
  .apexa-cc__lilly { width: 78px; height: 60px; }
  .apexa-cc__title { font-size: 1.04rem; }
}

@media (prefers-reduced-motion: reduce) {
  .apexa-cc *,
  .apexa-cc *::before,
  .apexa-cc *::after,
  .apexa-cc__card { animation: none !important; transition: none !important; }
  .apexa-cc.is-in .apexa-cc__card { animation: apexa-cc-fade 0.2s linear both !important; }
  .apexa-cc.is-out .apexa-cc__card { opacity: 0; }
  .apexa-cc__bite--1 { transform: scale(1); } /* still picture: one bite taken */
}
@keyframes apexa-cc-fade { from { opacity: 0; } to { opacity: 1; } }
