/* --- Cookie consent (js/consent.js) ---
   A bar fixed at the bottom, frosted glass, inset 30px on phones and iPads
   and sitting at the bottom centre on desktop. Hidden until the script
   shows it; slides up into view. Kept out of styles.css so the brand file
   stays the one the Meanwhile site copies verbatim. --- */
.consent {
    position: fixed;
    z-index: 210;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    left: calc(30px + env(safe-area-inset-left, 0px));
    right: calc(30px + env(safe-area-inset-right, 0px));
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    padding: 16px 20px;
    border-radius: 22px;
    background-color: rgb(255 255 255 / 0.75);
    box-shadow: 0 4px 24px rgb(17 17 17 / 0.08);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    backdrop-filter: blur(16px) saturate(1.4);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.consent[hidden] {
    display: none;
}

.consent.is-shown {
    opacity: 1;
    transform: none;
}

.consent__text {
    flex: 1 1 18em;
    margin: 0;
    color: var(--color-text);
    font-size: 15px;
    line-height: 1.4;
}

.consent__text a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.consent__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

/* both buttons the same pill: No thanks outlined, Accept filled */
.consent__decline,
.consent__accept {
    padding: 9px 19px;
    border: 1px solid var(--color-text);
    border-radius: 999px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
}

.consent__decline {
    background: none;
    color: var(--color-text);
}

.consent__decline:hover {
    background-color: rgb(17 17 17 / 0.06);
}

.consent__accept {
    background-color: var(--color-text);
    color: #fff;
}

.consent__accept:hover {
    background-color: #333;
}

.consent__decline:focus-visible,
.consent__accept:focus-visible {
    outline: 2px solid var(--color-red);
    outline-offset: 3px;
}

/* desktop: centred by layout, not translate(-50%), which lands on half
   pixels and blurs the text */
@media (min-width: 64.0625rem) {
    .consent {
        left: 0;
        right: 0;
        width: max-content;
        max-width: calc(100vw - 60px);
        margin-inline: auto;
        flex-wrap: nowrap;
    }

    .consent__text {
        flex: none;
        white-space: nowrap;
    }
}

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