/* Sage Store cookie consent — scoped styles only. */
.sage-cookie-banner[hidden],
.sage-cookie-preferences[hidden] {
    display: none !important;
}

.sage-cookie-banner,
.sage-cookie-preferences {
    --sage-cookie-bg: #08151b;
    --sage-cookie-panel: #0d2028;
    --sage-cookie-border: #2b5864;
    --sage-cookie-text: #edf7fa;
    --sage-cookie-muted: #a5bbc3;
    --sage-cookie-accent: #63e6ef;
    --sage-cookie-focus: #9cf6ff;
    color: var(--sage-cookie-text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.sage-cookie-banner {
    position: fixed;
    z-index: 10020;
    left: 50%;
    bottom: max(16px, env(safe-area-inset-bottom));
    width: min(920px, calc(100vw - 28px));
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
    align-items: center;
    gap: 22px;
    padding: 22px 24px;
    border: 1px solid var(--sage-cookie-border);
    border-radius: 18px;
    background: linear-gradient(135deg, #0a1b22 0%, var(--sage-cookie-bg) 72%);
    box-shadow: 0 18px 60px rgba(0, 0, 0, .55), 0 0 0 1px rgba(99, 230, 239, .04);
    box-sizing: border-box;
}

    /* Entrance animation: the banner gently rises from the bottom and fades in. */
    .sage-cookie-banner:not([hidden]) {
        animation: sage-cookie-banner-rise-in 850ms cubic-bezier(.22, .8, .28, 1) 100ms both;
        will-change: opacity, transform;
    }

@keyframes sage-cookie-banner-rise-in {
    from {
        opacity: 0;
        transform: translate(-50%, 36px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.sage-cookie-banner-copy {
    min-width: 0;
}

.sage-cookie-eyebrow {
    display: inline-block;
    margin-bottom: 6px;
    color: var(--sage-cookie-accent);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .16em;
    line-height: 1.4;
}

.sage-cookie-banner h2,
.sage-cookie-preferences h2 {
    margin: 0 0 8px;
    color: var(--sage-cookie-text);
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
}

.sage-cookie-banner p,
.sage-cookie-preferences p {
    margin: 0;
    color: var(--sage-cookie-muted);
    font-size: 12px;
    line-height: 1.65;
}

.sage-cookie-policy-link {
    display: inline-block;
    margin-top: 8px;
    color: var(--sage-cookie-accent);
    font-size: 11px;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.sage-cookie-actions,
.sage-cookie-preferences-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    min-width: 0;
}

.sage-cookie-button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #3b707d;
    border-radius: 10px;
    background: #102730;
    color: var(--sage-cookie-text);
    font: inherit;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.25;
    text-align: center;
    cursor: pointer;
    transition: border-color .16s ease, background-color .16s ease, transform .16s ease;
    box-sizing: border-box;
}

    .sage-cookie-button:hover {
        background: #173743;
        border-color: var(--sage-cookie-accent);
    }

    .sage-cookie-button:active {
        transform: translateY(1px);
    }

    .sage-cookie-button:focus-visible,
    .sage-cookie-settings-link:focus-visible,
    .sage-cookie-close:focus-visible,
    .sage-cookie-switch input:focus-visible + .sage-cookie-switch-ui {
        outline: 2px solid var(--sage-cookie-focus);
        outline-offset: 3px;
    }

.sage-cookie-settings-link {
    padding: 0;
    border: 0;
    background: transparent;
    color: #8899a3;
    font: inherit;
    font-size: 11px;
    text-align: left;
    cursor: pointer;
}

    .sage-cookie-settings-link:hover {
        color: var(--sage-cookie-accent);
    }

.sage-cookie-preferences {
    position: fixed;
    z-index: 10030;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 18px;
    box-sizing: border-box;
}

.sage-cookie-preferences-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(1, 7, 10, .78);
    backdrop-filter: blur(5px);
}

.sage-cookie-preferences-panel {
    position: relative;
    width: min(640px, 100%);
    max-height: min(88vh, 780px);
    overflow: auto;
    padding: 24px;
    border: 1px solid var(--sage-cookie-border);
    border-radius: 18px;
    background: var(--sage-cookie-bg);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .6);
    box-sizing: border-box;
}

.sage-cookie-preferences-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

    .sage-cookie-preferences-heading h2 {
        margin-bottom: 10px;
    }

.sage-cookie-close {
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid #315c67;
    border-radius: 9px;
    background: #10252d;
    color: var(--sage-cookie-text);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.sage-cookie-preferences-intro {
    margin-bottom: 16px !important;
}

.sage-cookie-category {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 0;
    border-top: 1px solid rgba(91, 137, 149, .24);
}

.sage-cookie-category-copy {
    min-width: 0;
}

    .sage-cookie-category-copy strong {
        display: block;
        margin-bottom: 5px;
        color: var(--sage-cookie-text);
        font-size: 13px;
    }

    .sage-cookie-category-copy p {
        max-width: 470px;
    }

.sage-cookie-switch {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

    .sage-cookie-switch input {
        position: absolute;
        width: 1px;
        height: 1px;
        opacity: 0;
        pointer-events: none;
    }

.sage-cookie-switch-ui {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
    border: 1px solid #50717a;
    border-radius: 999px;
    background: #172c33;
    transition: background .16s ease, border-color .16s ease;
}

    .sage-cookie-switch-ui::after {
        position: absolute;
        top: 3px;
        left: 3px;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background: #bfd0d5;
        content: "";
        transition: transform .16s ease, background .16s ease;
    }

.sage-cookie-switch input:checked + .sage-cookie-switch-ui {
    border-color: var(--sage-cookie-accent);
    background: #174b56;
}

    .sage-cookie-switch input:checked + .sage-cookie-switch-ui::after {
        transform: translateX(18px);
        background: var(--sage-cookie-accent);
    }

.sage-cookie-switch input:disabled + .sage-cookie-switch-ui {
    opacity: .8;
    cursor: not-allowed;
}

.sage-cookie-required-label {
    color: var(--sage-cookie-muted);
    font-size: 10px;
    white-space: nowrap;
}

.sage-cookie-retention-note {
    margin-top: 12px !important;
    font-size: 11px !important;
}

.sage-cookie-preferences-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 18px;
}

.sage-privacy-page {
    width: min(920px, calc(100% - 36px));
    margin: 40px auto 64px;
    padding: clamp(22px, 4vw, 38px);
    border: 1px solid #244752;
    border-radius: 18px;
    background: linear-gradient(145deg, #0c1c23, #071116);
    color: #eaf5f8;
    box-sizing: border-box;
}

    .sage-privacy-page h1 {
        margin: 0 0 18px;
        color: #f2fbfd;
        font-size: clamp(28px, 4vw, 38px);
        font-weight: 850;
    }

    .sage-privacy-page h2 {
        margin: 26px 0 8px;
        color: #73e9f1;
        font-size: 18px;
    }

    .sage-privacy-page p {
        color: #b4c7ce;
        font-size: 14px;
        line-height: 1.8;
    }

    .sage-privacy-page a {
        color: #70e6ef;
        text-underline-offset: 3px;
    }

.sage-privacy-back {
    margin-top: 28px;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (max-width: 760px) {
    .sage-cookie-banner {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
        padding: 18px;
        bottom: max(10px, env(safe-area-inset-bottom));
        width: calc(100vw - 20px);
        border-radius: 15px;
        max-height: min(78vh, 620px);
        overflow-y: auto;
    }

        .sage-cookie-banner h2 {
            font-size: 18px;
        }

    .sage-cookie-actions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .sage-cookie-button {
        min-height: 44px;
        padding: 9px 6px;
        font-size: 11px;
    }

    .sage-cookie-preferences-panel {
        padding: 18px;
    }

    .sage-cookie-preferences-actions {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 420px) {
    .sage-cookie-actions {
        grid-template-columns: minmax(0, 1fr);
    }

    .sage-cookie-category {
        align-items: flex-start;
        gap: 10px;
    }

    .sage-cookie-preferences {
        padding: 10px;
    }

    .sage-cookie-preferences-panel {
        max-height: 94vh;
        padding: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sage-cookie-banner:not([hidden]) {
        animation: none;
        will-change: auto;
    }

    .sage-cookie-button,
    .sage-cookie-switch-ui,
    .sage-cookie-switch-ui::after {
        transition: none;
    }
}
