/*
 * Privacy choice banner: a calm card, bottom left on wide screens and full width on
 * phones. Not a blocking modal; accept and reject share one button style.
 */

.consent {
    position: fixed;
    z-index: 1046;
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    left: max(1rem, env(safe-area-inset-left, 0px));
    display: grid;
    width: min(28rem, calc(100vw - 2rem));
    max-height: calc(100dvh - 2rem);
    gap: 0.875rem;
    overflow-y: auto;
    padding: 1.25rem;
    border: 1px solid var(--amtecco-line-strong);
    border-radius: var(--amtecco-radius);
    background: var(--amtecco-graphite);
    box-shadow: 0 1.5rem 3.5rem rgba(0, 0, 0, 0.5);
    color: var(--amtecco-paper);
    font-family: var(--amtecco-sans);
}

.consent[hidden] {
    display: none;
}

.consent h2 {
    margin: 0;
    color: var(--amtecco-paper) !important;
    font-family: var(--amtecco-display);
    font-size: 1.125rem !important;
    font-weight: 600 !important;
    letter-spacing: -0.02em !important;
}

.consent p {
    margin: 0;
    color: var(--amtecco-paper-soft) !important;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.consent a {
    color: var(--amtecco-paper);
    text-underline-offset: 0.2em;
}

.consent__choices {
    display: grid;
    gap: 0.5rem;
}

.consent__choices[hidden] {
    display: none;
}

.consent__choice {
    display: grid;
    grid-template-columns: 1.125rem minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--amtecco-line);
    border-radius: var(--amtecco-radius);
    cursor: pointer;
}

.consent__choice input {
    width: 1.125rem;
    height: 1.125rem;
    margin-top: 0.15rem;
    accent-color: var(--amtecco-paper);
}

.consent__choice span {
    display: grid;
}

.consent__choice strong {
    font-size: 0.9375rem;
    font-weight: 600;
}

.consent__choice small {
    color: var(--amtecco-steel);
    font-size: 0.875rem;
    line-height: 1.4;
}

.consent__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.consent button {
    min-height: 2.75rem;
    font: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
}

/* Accept and reject: one shared style, equal prominence. */
.consent__button,
.consent__save {
    flex: 1 1 8rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--amtecco-paper);
    border-radius: var(--amtecco-radius);
    background: var(--amtecco-paper);
    color: var(--amtecco-carbon) !important;
}

.consent__link {
    padding: 0.5rem 0.25rem;
    border: 0;
    background: transparent;
    color: var(--amtecco-paper-soft) !important;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.consent button:focus-visible,
.consent a:focus-visible,
.consent__choice:focus-within {
    outline: 2px solid var(--amtecco-paper);
    outline-offset: 2px;
}

.footer-link--button {
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

@media (max-width: 575.98px) {
    .consent {
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
        border-width: 1px 0 0;
    }
}

@media print {
    .consent {
        display: none !important;
    }
}
