/* ============================================================
   COOKIE BANNER · cosmic glass, slide-up, GDPR-clean
   ============================================================ */

.cookie-banner{position:fixed;right:clamp(14px,1rem + .5vw,28px);bottom:clamp(14px,1rem + .5vw,28px);transform:translateY(140%);z-index:100;width:min(28rem,calc(100% - clamp(28px,5vw,60px)));padding:clamp(1rem,.85rem + .6vw,1.35rem) clamp(1.15rem,.95rem + .7vw,1.5rem);background:#0E1221;border:1px solid rgba(252,252,250,0.16);border-radius:clamp(16px,1.1rem + .25vw,20px);color:var(--fg);box-shadow:inset 0 1px 0 rgba(252,252,250,0.06),0 28px 60px -20px rgba(0,0,0,0.7),0 0 0 1px rgba(0,0,0,0.4);opacity:0;transition:transform .8s var(--ease-out-expo),opacity .6s var(--ease-out-quart);font-size:13px;line-height:1.55}
.cookie-banner.is-open{transform:translateY(0);opacity:1}

.cookie-banner-top{display:flex;align-items:flex-start;gap:12px;margin-bottom:clamp(.7rem,.55rem + .3vw,.9rem)}
.cookie-banner-glyph{flex-shrink:0;width:24px;height:24px;color:var(--teal);filter:drop-shadow(0 0 8px oklch(0.88 0.085 178 / 0.5));margin-top:1px}
.cookie-banner-glyph .ring-outer{animation:stargate-rot 32s linear infinite;transform-origin:center}
.cookie-banner-title{font-size:clamp(.98rem,.9rem + .25vw,1.1rem);color:#FCFCFA;font-weight:700;letter-spacing:-.01em;margin-bottom:5px}
.cookie-banner-text{color:rgba(252,252,250,0.78);font-size:12.5px;line-height:1.55;max-width:38ch}
.cookie-banner-text a{color:var(--fg);text-decoration:underline;text-decoration-color:var(--teal);text-underline-offset:3px;text-decoration-thickness:1px;transition:text-decoration-color .3s var(--ease)}
.cookie-banner-text a:hover{text-decoration-color:var(--fg)}

.cookie-banner-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end;align-items:center;border-top:1px solid var(--rule-dark);padding-top:clamp(.7rem,.55rem + .3vw,.95rem)}

.cookie-btn{display:inline-flex;align-items:center;gap:6px;padding:7px 14px;border-radius:999px;font-size:11.5px;font-weight:600;letter-spacing:-.002em;cursor:pointer;border:1px solid transparent;transition:transform .35s var(--ease),background .3s var(--ease),color .3s var(--ease),border-color .3s var(--ease),box-shadow .3s var(--ease);font-family:inherit;line-height:1}
.cookie-btn--primary{background:var(--fg);color:var(--bg-dark);border-color:var(--fg)}
.cookie-btn--primary:hover{transform:translateY(-1px);box-shadow:0 0 0 6px oklch(0.88 0.085 178 / 0.2),0 14px 30px -14px oklch(0.88 0.085 178 / 0.5)}
.cookie-btn--ghost{background:transparent;color:var(--fg-2);border-color:var(--rule-dark-strong)}
.cookie-btn--ghost:hover{color:var(--fg);border-color:var(--fg-dim);background:rgba(252,252,250,0.05)}
.cookie-btn--text{background:transparent;color:var(--fg-3);border-color:transparent;padding:9px 12px}
.cookie-btn--text:hover{color:var(--fg)}

.cookie-banner.is-prefs .cookie-banner-prefs{display:flex}
.cookie-banner-prefs{display:none;flex-direction:column;gap:10px;margin-top:14px;padding-top:14px;border-top:1px solid var(--rule-dark)}
/* when prefs panel is open, swap "Accept all" out for "Save preferences" */
.cookie-banner.is-prefs [data-cookie-accept-all]{display:none}
.cookie-banner.is-prefs [data-cookie-save]{display:inline-flex !important}
.cookie-banner.is-prefs [data-cookie-prefs]{display:none}
.cookie-pref{display:flex;align-items:flex-start;gap:14px;padding:12px 14px;background:rgba(252,252,250,0.04);border:1px solid var(--rule-dark);border-radius:14px}
.cookie-pref-info{flex:1;min-width:0}
.cookie-pref-title{font-size:12.5px;color:var(--fg);font-weight:700;margin-bottom:3px;letter-spacing:-.005em}
.cookie-pref-desc{font-size:11.5px;color:var(--fg-3);line-height:1.5}
.cookie-pref-toggle{flex-shrink:0;position:relative;display:inline-block;width:38px;height:22px;cursor:pointer}
.cookie-pref-toggle input{opacity:0;width:0;height:0;position:absolute}
.cookie-pref-slider{position:absolute;inset:0;background:rgba(252,252,250,0.08);border:1px solid var(--rule-dark-strong);border-radius:999px;transition:background .3s var(--ease),border-color .3s var(--ease)}
.cookie-pref-slider::before{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;background:var(--fg-3);border-radius:50%;transition:transform .35s var(--ease-out-expo),background .3s var(--ease)}
.cookie-pref-toggle input:checked + .cookie-pref-slider{background:oklch(0.88 0.085 178 / 0.32);border-color:var(--teal)}
.cookie-pref-toggle input:checked + .cookie-pref-slider::before{transform:translateX(16px);background:var(--teal);box-shadow:0 0 10px oklch(0.88 0.085 178 / 0.7)}
.cookie-pref-toggle input:disabled + .cookie-pref-slider{opacity:.55;cursor:not-allowed}
.cookie-pref-toggle input:disabled + .cookie-pref-slider::before{background:var(--fg-dim)}
.cookie-pref-locked{font-size:9.5px;letter-spacing:.16em;text-transform:uppercase;color:var(--fg-dim);font-weight:var(--fw-mono);margin-top:4px;display:inline-block}

@media (max-width:560px){
  .cookie-banner{bottom:0;right:0;border-radius:18px 18px 0 0;border-bottom:0;width:100%;transform:translateY(140%)}
  .cookie-banner.is-open{transform:translateY(0)}
  .cookie-banner-actions{justify-content:stretch}
  .cookie-btn{flex:1 1 auto;justify-content:center}
}

@media (prefers-reduced-motion:reduce){
  .cookie-banner{transition:opacity .2s linear}
  .cookie-banner-glyph .ring-outer{animation:none}
}
