/*--------------------------------------------------------------
# The cookie notice (Views/Shared/_CookieConsentPartial.cshtml), on _Layout and the visitors' _Layout_landing: a card
# floating bottom left in the sign-in window's glass (tokens.css "Glass and ink", one set per scene, so day, sunset and
# night each take their own; Fast Mode makes the glass solid, fast.css §1). The partial loads this sheet only while the
# notice is shown. Its rise and its sink end at once in Fast Mode (fast.css §3).
--------------------------------------------------------------*/
.cookie-consent {
    position: fixed;
    left: 16px;
    /* Over the footer strips (the slim footer, the visitors' strip with its language switch), not on them. */
    bottom: 60px;
    /* Over the page and its back-to-top button, under the header's main menu (997) and the windows. */
    z-index: 996;
    width: min(520px, calc(100vw - 32px));
    padding: 18px 20px 16px;
    border: 1px solid var(--glass-modal-rim);
    border-radius: 16px;
    background: var(--glass-modal);
    box-shadow: var(--glass-modal-shadow);
    -webkit-backdrop-filter: var(--glass-modal-filter);
    backdrop-filter: var(--glass-modal-filter);
    color: var(--ink-body);
    font-size: 0.86rem;
    line-height: 1.5;
    animation: cc-rise 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) 0.6s both;
}

    .cookie-consent.is-leaving {
        animation: cc-sink 0.3s ease-in forwards;
    }

    .cookie-consent p {
        margin: 0;
    }

.cc-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.cc-icon {
    flex: none;
    color: var(--ink-accent);
    font-size: 1.25rem;
    line-height: 1;
}

.cc-title {
    color: var(--ink);
    font-family: "Roboto", sans-serif;
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.3;
}

.cc-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    margin-top: 12px;
}

.cc-links {
    min-width: 0;
    color: var(--ink-muted);
    font-size: 0.8rem;
}

    /* The id outweighs the night's link colour (v3-night.css, every link under body.shell-v3). */
    #cookieConsent .cc-links a {
        color: var(--ink-accent);
        font-weight: 600;
        text-decoration: none;
    }

        #cookieConsent .cc-links a:hover,
        #cookieConsent .cc-links a:focus-visible {
            color: var(--ink-accent);
            text-decoration: underline;
        }

/* The primary: the AL-MA blue in every scene (as the homepage's primaries), under a light sheen. */
.cc-accept {
    flex: none;
    margin-left: auto;
    padding: 8px 20px;
    border: 0;
    border-radius: 7px;
    background: linear-gradient(180deg, #ffffff24, #ffffff00 60%), var(--btn-primary-bg);
    box-shadow: 0 4px 14px #304f7f47, inset 0 1px 0 #ffffff38;
    color: var(--btn-primary-fg);
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
}

    .cc-accept:hover {
        background-color: var(--btn-primary-bg-h);
        background-image: linear-gradient(180deg, #ffffff24, #ffffff00 60%);
    }

    .cc-accept:active {
        background-color: var(--btn-primary-bg-a);
        background-image: none;
        box-shadow: inset 0 2px 4px #00000033;
    }

    .cc-accept:focus-visible {
        outline: 2px solid var(--ink-accent);
        outline-offset: 2px;
    }

html[data-v3-scene="night"] .cc-accept {
    box-shadow: 0 4px 14px #00000059, inset 0 1px 0 #ffffff2e;
}

/* While the notice is up the back-to-top button stays away: on a phone it would sit on the notice's button. */
body:has(.cookie-consent) .back-to-top {
    display: none !important;
}

@keyframes cc-rise {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
}

@keyframes cc-sink {
    to {
        opacity: 0;
        transform: translateY(18px);
    }
}

@media (max-width: 575.98px) {
    .cookie-consent {
        left: 12px;
        width: calc(100vw - 24px);
        padding: 16px 16px 14px;
        font-size: 0.82rem;
    }

    .cc-accept {
        width: 100%;
        padding: 10px 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cookie-consent,
    .cookie-consent.is-leaving {
        animation: none;
    }
}
