.cookie-consent[hidden],
.cookie-consent-toggle[hidden] {
    display: none !important;
}

/* Keep the cookie launcher aligned with the assistant controls on the right rail. */
@media (max-width: 575px) {
    html body .cookie-consent-toggle {
        left: auto !important;
        right: -16px !important;
        top: calc(50% + 7px) !important;
        bottom: auto !important;
    }

    html body .cookie-consent-toggle:hover,
    html body .cookie-consent-toggle:focus {
        transform: translateX(-3px) !important;
    }
}

.cookie-consent {
    position: fixed;
    inset: 0;
    z-index: 1080;
    pointer-events: none;
}

.cookie-consent__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 24, 40, 0.22);
    pointer-events: auto;
}

.cookie-consent__panel {
    position: absolute;
    right: 1rem;
    bottom: calc(var(--app-sticky-footer-height, 64px) + 1rem);
    width: min(720px, calc(100vw - 2rem));
    max-height: calc(100vh - var(--app-sticky-navbar-offset, 64px) - var(--app-sticky-footer-height, 64px) - 2rem);
    overflow: auto;
    padding: 1.25rem;
    border: 1px solid rgba(16, 24, 40, 0.12);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(16, 24, 40, 0.24);
    pointer-events: auto;
}

.cookie-consent__copy h2 {
    margin: 0 0 0.5rem;
    font-size: 1.45rem;
    font-weight: 800;
    color: #1f2937;
}

.cookie-consent__copy p {
    margin-bottom: 0.75rem;
    color: #4b5563;
}

.cookie-consent__eyebrow {
    margin-bottom: 0.25rem !important;
    color: #dc3545 !important;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.cookie-consent__link {
    color: #dc3545;
    font-weight: 700;
    text-decoration: none;
}

.cookie-consent__link:hover {
    text-decoration: underline;
}

.cookie-consent__preferences {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.cookie-consent__preferences[hidden] {
    display: none !important;
}

.cookie-consent__option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #f9fafb;
}

.cookie-consent__option strong {
    display: block;
    color: #111827;
}

.cookie-consent__option small {
    display: block;
    color: #6b7280;
}

.cookie-consent__option input {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: #dc3545;
    flex: 0 0 auto;
}

.cookie-consent__option--locked {
    background: #fff5f5;
}

.cookie-consent__actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.cookie-consent-toggle {
    position: fixed;
    left: auto;
    right: -18px;
    top: calc(50% + 8px);
    bottom: auto;
    z-index: 1070;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    min-width: 52px;
    height: 54px;
    min-height: 54px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-right: 0;
    border-radius: 18px 0 0 18px;
    background: linear-gradient(135deg, var(--voice-red, #e72c37), var(--voice-red-dark, #bd131f));
    color: #fff;
    box-shadow: 0 12px 28px rgba(153, 16, 27, 0.28);
    font-size: 1.15rem;
    font-weight: 700;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.cookie-consent-toggle:hover,
.cookie-consent-toggle:focus-visible {
    color: #fff;
    transform: translateX(-3px);
    box-shadow: 0 16px 34px rgba(153, 16, 27, 0.35);
}

.cookie-consent-toggle__face {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    line-height: 1;
    text-shadow: 0 2px 8px rgba(96, 8, 15, 0.28);
}

.cookie-consent-toggle__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 575px) {
    .cookie-consent__panel {
        right: 0.75rem;
        left: 0.75rem;
        bottom: calc(var(--app-sticky-footer-height, 82px) + 0.75rem);
        width: auto;
        padding: 1rem;
        border-radius: 16px;
    }

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

    .cookie-consent-toggle {
        left: auto;
        right: -16px;
        top: calc(50% + 7px);
        bottom: auto;
        width: 48px;
        min-width: 48px;
        height: 50px;
        min-height: 50px;
        padding: 0;
        border: 1px solid rgba(255, 255, 255, 0.5);
        border-right: 0;
        border-radius: 18px 0 0 18px;
        background: linear-gradient(135deg, var(--voice-red, #e72c37), var(--voice-red-dark, #bd131f));
        box-shadow: 0 12px 28px rgba(153, 16, 27, 0.28);
        color: #fff;
        overflow: visible;
    }

    .cookie-consent-toggle:hover,
    .cookie-consent-toggle:focus {
        color: #fff;
        transform: translateX(-3px);
        box-shadow: 0 16px 34px rgba(153, 16, 27, 0.35);
    }

    .cookie-consent-toggle::before,
    .cookie-consent-toggle::after {
        display: none;
    }

    .cookie-consent-toggle__face {
        position: static;
        display: inline-flex;
        width: auto;
        height: auto;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        color: inherit;
        font-size: 1.15rem;
    }

    .cookie-consent-toggle__label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

}
