/* ===========================================================================
   ZOOGABOOG! Cookie Banner — Tier 2 (Accept All / Essentials Only)
   --------------------------------------------------------------------------
   Desktop  (≥ 641px): bottom-left corner card, max-width 380px
   Mobile   (≤ 640px): full-width bottom sheet, stacked buttons
   States   : .is-hidden (off-screen, not in flow for SR), .is-visible (slid in)
   =========================================================================== */

:root {
    /* Fall-through if the brand vars aren't in scope when this CSS loads first */
    --zoogaboog-blue: #01aade;
    --zoogaboog-dark-blue: #0085ae;
}

.zb-cookie-banner.zb-no-cat .zb-cookie-banner__cat {
    display: none;
}

.zb-cookie-banner__cat {
    position: absolute;
    bottom: 100%;
    left: 1.25rem;
    width: 120px;
    height: auto;
    pointer-events: none;
    margin-bottom: -4px; /* tuck feet slightly into card edge */
}

.zb-cookie-banner {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    z-index: 9990; /* below modals but above nav/chatbot */
    width: calc(100% - 3rem);
    max-width: 380px;
    background: #ffffff;
    border-radius: 16px;
    padding: 1.5rem 1.5rem 1.25rem;
    box-shadow:
        0 18px 48px rgba(15, 23, 42, 0.18),
        0 4px 12px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(15, 23, 42, 0.06);
    font-family: inherit;
    color: #0f172a;

    /* Entrance — banner starts off-screen and animates in */
    transform: translateY(120%);
    opacity: 0;
    pointer-events: none;
    transition:
        transform 360ms cubic-bezier(0.16, 1, 0.3, 1),
        opacity 280ms ease;
}

.zb-cookie-banner.is-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* When fully hidden, remove from a11y tree as well */
.zb-cookie-banner.is-hidden {
    visibility: hidden;
}

.zb-cookie-banner__close {
    position: absolute;
    top: 0.65rem;
    right: 0.75rem;
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.18s ease, background 0.18s ease;
}

.zb-cookie-banner__close:hover,
.zb-cookie-banner__close:focus-visible {
    color: #0f172a;
    background: rgba(15, 23, 42, 0.06);
    outline: none;
}

.zb-cookie-banner__title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 2rem 0.4rem 0; /* right gutter for close button */
    letter-spacing: -0.01em;
}

.zb-cookie-banner__body {
    font-size: 0.92rem;
    line-height: 1.55;
    color: #475569;
    margin: 0 0 1.1rem;
}

.zb-cookie-banner__actions {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 0.85rem;
}

.zb-cookie-banner__btn {
    flex: 1 1 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px; /* WCAG AAA touch target */
    padding: 0.7rem 1rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
    text-decoration: none;
    white-space: nowrap;
}

.zb-cookie-banner__btn:focus-visible {
    outline: 3px solid rgba(1, 170, 222, 0.45);
    outline-offset: 2px;
}

.zb-cookie-banner__btn--primary {
    background: var(--zoogaboog-blue);
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(1, 170, 222, 0.30);
}

.zb-cookie-banner__btn--primary:hover {
    background: var(--zoogaboog-dark-blue);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(1, 170, 222, 0.36);
    color: #ffffff;
}

.zb-cookie-banner__btn--secondary {
    background: #f1f5f9;
    color: #1e293b;
}

.zb-cookie-banner__btn--secondary:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.zb-cookie-banner__link {
    display: inline-block;
    font-size: 0.82rem;
    color: #64748b;
    text-decoration: none;
    border-bottom: 1px dashed rgba(100, 116, 139, 0.4);
    padding-bottom: 1px;
}

.zb-cookie-banner__link:hover,
.zb-cookie-banner__link:focus-visible {
    color: var(--zoogaboog-blue);
    border-bottom-color: var(--zoogaboog-blue);
    outline: none;
}

/* ---------------------------------------------------------------------------
   MOBILE — full-width bottom sheet
   --------------------------------------------------------------------------- */
@media (max-width: 640px) {
    .zb-cookie-banner {
        left: 0.75rem;
        right: 0.75rem;
        bottom: 0.75rem;
        width: auto;
        max-width: none;
        padding: 1.25rem 1.25rem 1rem;
        border-radius: 14px;
    }

    .zb-cookie-banner__title {
        font-size: 1rem;
    }

    .zb-cookie-banner__body {
        font-size: 0.9rem;
    }

    .zb-cookie-banner__actions {
        flex-direction: column-reverse; /* primary action on top for thumb reach */
        gap: 0.5rem;
    }

    .zb-cookie-banner__btn {
        width: 100%;
        padding: 0.85rem 1rem;
    }
}

/* ---------------------------------------------------------------------------
   REDUCED MOTION — disable slide-in
   --------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .zb-cookie-banner {
        transition: opacity 160ms ease;
        transform: none;
    }
}
