/* Optional analytics consent shown on public marketing pages. */

.cookie-consent {
    position: fixed;
    inset: auto 0 0;
    z-index: 10000;
    padding: clamp(.75rem, 2vw, 1.25rem);
    pointer-events: none;
}

.cookie-consent[hidden] {
    display: none;
}

.cookie-consent::before {
    position: fixed;
    inset: 0;
    background: rgba(3, 25, 34, .28);
    content: "";
    opacity: 0;
    pointer-events: auto;
    transition: opacity .22s ease;
}

.cookie-consent__panel {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(1rem, 3vw, 2.5rem);
    width: min(100%, 1120px);
    margin-inline: auto;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 1.1rem;
    background: #052833;
    padding: clamp(1.15rem, 3vw, 1.65rem);
    box-shadow: 0 24px 70px rgba(0, 20, 27, .34);
    color: #fff;
    opacity: 0;
    pointer-events: auto;
    transform: translateY(calc(100% + 2rem));
    transition: opacity .22s ease, transform .22s ease;
}

.cookie-consent.is-visible::before {
    opacity: 1;
}

.cookie-consent.is-visible .cookie-consent__panel {
    opacity: 1;
    transform: translateY(0);
}

.cookie-consent.is-closing .cookie-consent__panel {
    opacity: 0;
    transform: translateY(calc(100% + 2rem));
}

.cookie-consent__copy {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: .85rem;
    align-items: start;
}

.cookie-consent__icon {
    display: grid;
    width: 2.5rem;
    height: 2.5rem;
    place-items: center;
    border-radius: .75rem;
    background: rgba(6, 174, 213, .16);
    color: #46d7f6;
    font-size: 1.25rem;
}

.cookie-consent h2 {
    margin: 0 0 .35rem;
    color: #fff;
    font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.cookie-consent p {
    max-width: 70ch;
    margin: 0;
    color: rgba(255, 255, 255, .76);
    font-size: .88rem;
    line-height: 1.65;
}

.cookie-consent a {
    color: #7ce6fb;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: .16em;
}

.cookie-consent__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .65rem;
}

.cookie-consent__actions .button {
    min-width: 8.5rem;
}

.public-footer__cookie-button {
    border: 0;
    background: transparent;
    padding: 0;
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.public-footer__cookie-button:hover,
.public-footer__cookie-button:focus-visible {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: .16em;
}

@media (max-width: 760px) {
    .cookie-consent__panel {
        grid-template-columns: 1fr;
    }

    .cookie-consent__actions {
        justify-content: stretch;
    }

    .cookie-consent__actions .button {
        flex: 1 1 10rem;
    }
}

@media (max-width: 480px) {
    .cookie-consent__copy {
        grid-template-columns: 1fr;
    }

    .cookie-consent__icon {
        width: 2.25rem;
        height: 2.25rem;
    }

    .cookie-consent__actions {
        display: grid;
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cookie-consent::before,
    .cookie-consent__panel {
        transition: none;
    }
}
