/*
 * Compact, deferred cookie notice — US / opt-out regions ONLY.
 *
 * WHY: the Complianz opt-out notice paints as a ~235px slab (≈29% of a mobile
 * screen) the instant the page loads, fixed to the bottom. It does not BLOCK
 * interaction (opt-out, no overlay), but it (a) covers the bottom third where
 * the first card's actions live and (b) is a prime LCP element, so cold
 * Facebook in-app-browser visitors wait on it. This slims it to a small bar and
 * lets it ease in AFTER the first paint, so content wins LCP and users can
 * interact immediately.
 *
 * SCOPE + COMPLIANCE: every rule is scoped to `.cmplz-cookiebanner.optout` —
 * the US opt-out banner only. The EU/UK opt-in banner does NOT carry `.optout`
 * (it is `.optin`), so it is left full-size and prominent, exactly as GDPR
 * requires. This file is PRESENTATION ONLY; it changes nothing about what
 * Complianz blocks, when, or per which region.
 *
 * Specificity: a leading `body` prefix beats Complianz's own class selectors
 * without `!important` (house rule: never !important).
 */

/* Slim the opt-out bar: tighter padding + smaller type shrink the slab. */
body .cmplz-cookiebanner.optout {
    padding: 10px 14px;
    max-width: 420px;
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14);
    row-gap: 4px;
}

body .cmplz-cookiebanner.optout .cmplz-title {
    display: none; /* the one-line message carries it; drop the heading row */
}

/* Reclaim the empty header/logo spacer row (no logo on the opt-out notice;
   the Accept button is the dismiss control, so nothing is lost). */
body .cmplz-cookiebanner.optout .cmplz-header {
    display: none;
}

body .cmplz-cookiebanner.optout .cmplz-message {
    font-size: 13px;
    line-height: 1.35;
    margin: 0;
}

/* Full-width edge-to-edge bar on phones is what made it feel like a wall.
   Keep it a compact card pinned to the bottom, not a full-height slab. */
@media (max-width: 782px) {
    body .cmplz-cookiebanner.optout {
        left: 8px;
        right: 8px;
        bottom: 8px;
        width: auto;
        max-width: none;
    }
    body .cmplz-cookiebanner.optout .cmplz-message {
        font-size: 12px;
        line-height: 1.3;
    }
}

/* Ease it in AFTER first paint so it is never the LCP and never covers the
   first interaction during the opening moment. FAIL-SAFE by design: the
   banner's RESTING position is always on-screen and visible — the entrance
   only fades opacity (with a tiny rise), using `backwards` fill so the hidden
   state applies ONLY during the pre-start delay and reverts to the natural
   (visible, on-screen) state afterward. A visible tab always runs the
   animation; it can only pause while backgrounded, which no user is looking
   at — so the Accept control can never be stranded off-screen for a real
   viewer. Applies once Complianz shows the banner (adds .cmplz-show). */
@keyframes aphasia-consent-slidein {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

body .cmplz-cookiebanner.optout.cmplz-show {
    animation: aphasia-consent-slidein 0.42s ease 0.9s backwards;
    will-change: opacity, transform;
}

/* Respect reduced-motion: no slide, no delay — show it plainly. */
@media (prefers-reduced-motion: reduce) {
    body .cmplz-cookiebanner.optout.cmplz-show {
        animation: none;
    }
}
