/* Cookie consent: a slim bar pinned to the bottom edge of the screen.
   Always visible, but compact and full-width so it never sits over the middle of the page. */
.webmason-consent {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 32px;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 14px max(24px, calc((100% - var(--content-width)) / 2));
    border: 0;
    border-top: 1px solid color-mix(in srgb, var(--color-white) var(--opacity-inverse-border-medium), transparent);
    border-radius: 0;
    background: var(--color-ink);
    color: var(--color-white);
    box-shadow: 0 -6px 24px rgb(0 0 0 / 14%);
    font-family: var(--font-body);
    font-size: 0.9rem;
    line-height: 1.5;
    box-sizing: border-box;
}

.webmason-consent-message {
    flex: 1 1 420px;
    margin: 0;
    color: color-mix(in srgb, var(--color-white) var(--opacity-inverse-text-section), var(--color-ink));
}

.webmason-consent-privacy {
    color: var(--color-white);
    font-weight: var(--weight-label);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.webmason-consent-privacy:hover,
.webmason-consent-privacy:focus-visible {
    color: var(--color-accent);
}

.webmason-consent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Accept and Decline look the same: no nudging either way */
.webmason-consent-button,
.webmason-consent-accept,
.webmason-consent-decline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 7px 20px;
    border: 1px solid color-mix(in srgb, var(--color-white) var(--opacity-inverse-border-strong), transparent);
    border-radius: var(--border-radius-small);
    background: transparent;
    color: var(--color-white);
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: var(--weight-button);
    line-height: 1.2;
    cursor: pointer;
    transition:
        color var(--transition-speed) var(--transition-easing),
        background-color var(--transition-speed) var(--transition-easing),
        border-color var(--transition-speed) var(--transition-easing);
}

.webmason-consent-button:hover,
.webmason-consent-button:focus-visible {
    border-color: var(--color-white);
    background: color-mix(in srgb, var(--color-white) 10%, transparent);
    color: var(--color-white);
}

/* The button that reopens the panel: a small text link under the footer, not a floating button */
.webmason-consent-settings {
    position: static;
    inset: auto;
    z-index: auto;
    display: block;
    width: 100%;
    margin: 0;
    padding: 0 max(24px, calc((100% - var(--content-width)) / 2)) 20px;
    border: 0;
    border-radius: 0;
    background: var(--color-ink);
    color: color-mix(in srgb, var(--color-white) var(--opacity-inverse-text-section), var(--color-ink));
    box-shadow: none;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: var(--weight-body);
    text-align: left;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    box-sizing: border-box;
}

.webmason-consent-settings:hover,
.webmason-consent-settings:focus-visible {
    color: var(--color-white);
}

@media (max-width: 640px) {
    .webmason-consent {
        padding: 14px 16px;
        font-size: 0.85rem;
    }

    .webmason-consent-actions {
        width: 100%;
    }

    .webmason-consent-button {
        flex: 1 1 0;
    }

    .webmason-consent-settings {
        padding: 0 20px 20px;
    }
}
