/* ================================================================
   SHEEPSLEEP — Cookie-Consent Banner (N6)
   Loaded from includes/cookie-consent.php (body-end, public pages).
   Uses only existing :root tokens + rgba(35,50,47,…) tints — no new
   tokens, no hardcoded brand hex. Mobile-first (min-width queries only).
   ================================================================ */

/* The banner ships with [hidden]; keep it display:none regardless of any
   global rule, so there is zero flash / layout shift before JS decides. */
.cookie-consent[hidden] { display: none; }

.cookie-consent {
    position: fixed;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    z-index: 9000;                 /* below modals/megamenu overlays, above page */
    background: color-mix(in srgb, var(--c-cloud) 70%, transparent); /* footer token @ 30% transparency */
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: var(--c-forest);
    border: 1px solid rgba(35, 50, 47, .08);
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(35, 50, 47, .18);
    padding: 1rem 1.1rem;
    font-family: var(--ff-ge-all);
}

.cc-inner {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.cc-title {
    margin: 0 0 0.15rem;
    font-size: 1.05rem;
    line-height: 1.25;
    color: var(--c-forest);
    text-transform: none;          /* GE heading is pre-cased via mtavruli() */
}

.cc-desc {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: rgba(35, 50, 47, .82);
}

.cc-policy-link {
    color: var(--c-forest);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.cc-policy-link:hover { color: var(--c-twilight); }

/* Two centered actions, mirroring the PDP size-selector pills. */
.cc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
}

/* White rounded-full pills, dark text — same recipe as .pdp-size-btn.
   Accept-all = WITH the dark ring (like a selected size pill);
   Necessary-only = WITHOUT the ring (like an unselected size pill). */
.cc-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.6rem;
    border-radius: 9999px;
    border: none;
    background: #fff;
    color: var(--c-forest);
    font-family: inherit;
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1.2;
    cursor: pointer;
    transition: box-shadow .15s;
    box-shadow: 0 1px 4px rgba(35, 50, 47, .1);
}
.cc-btn:hover { box-shadow: 0 2px 8px rgba(35, 50, 47, .15); }

.cc-btn--accept {
    box-shadow: 0 0 0 2.5px var(--c-forest), 0 1px 4px rgba(35, 50, 47, .1);
}
.cc-btn--accept:hover {
    box-shadow: 0 0 0 2.5px var(--c-forest), 0 2px 8px rgba(35, 50, 47, .15);
}

/* ----- Accessible focus rings (forest) ----- */
.cookie-consent .cc-btn:focus-visible,
.cc-policy-link:focus-visible {
    outline: 2px solid var(--c-forest);
    outline-offset: 2px;
}

/* ----- Tablet / desktop: single-row bar, centered max-width ----- */
@media (min-width: 720px) {
    .cookie-consent {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        max-width: 680px;
        padding: 1.15rem 1.35rem;
    }
}

/* ----- Reduced motion: kill any inherited button transitions ----- */
@media (prefers-reduced-motion: reduce) {
    .cookie-consent .cc-btn {
        transition: none;
    }
    .cookie-consent .cc-btn:hover { transform: none; }
}
