/* The cookie banner (Views/Shared/CookieConsent.cshtml, content/js/cookie-consent.js): a summary screen
   whose refuse link sits at the top, and a purposes screen with a Refuse / Accept pair per purpose.
   Colours fall back to literals because the article layouts do not load style.css, which defines the
   tokens; the tokens are what keep it readable in the dark theme. */

.cookie-consent {
    position: fixed;
    left: 50%;
    bottom: 16px;
    z-index: 2147483000;
    box-sizing: border-box;
    width: calc(100% - 32px);
    max-width: 640px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 20px 28px 24px;
    transform: translateX(-50%);
    border-radius: 8px;
    background: var(--white-bkg, #fff);
    color: var(--normal-text, #414549);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
    font-family: 'Nunito Sans', Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    text-align: left;
}

.cookie-consent:focus {
    outline: none;
}

/* The author rules below would otherwise beat the browser's own [hidden] rule. */
.cookie-consent[hidden],
.cookie-consent [hidden] {
    display: none !important;
}

/* Family only: a size or weight here would outrank every button class below (element + class). */
.cookie-consent button {
    font-family: inherit;
    line-height: 1.4;
    cursor: pointer;
}

/* Refusing is one click from the first screen, so the link must read as a link, not as fine print. */
.cookie-consent__refuse,
.cookie-consent__back {
    margin: 0 0 6px;
    text-align: right;
}

.cookie-consent__back {
    text-align: left;
}

.cookie-consent__refuse-link {
    padding: 0;
    border: 0;
    background: none;
    color: var(--dark-text, #212325);
    font-size: 15px;
    text-decoration: underline;
}

.cookie-consent__title {
    margin: 0 0 8px;
    color: var(--dark-text, #212325);
    font-size: 18px;
    font-weight: 700;
}

.cookie-consent__text p {
    margin: 0 0 10px;
}

.cookie-consent__text a {
    color: inherit;
    text-decoration: underline;
}

.cookie-consent__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 18px;
}

.cookie-consent__button {
    min-width: 180px;
    padding: 11px 22px;
    border: 1px solid #275EFE;
    border-radius: 4px;
    background: #275EFE;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

.cookie-consent__button--secondary {
    border-color: rgba(128, 128, 128, 0.35);
    background: var(--dark-gray-bkg, #eaedf0);
    color: var(--dark-text, #212325);
}

    .cookie-consent__button:hover,
    .cookie-consent__button:focus-visible {
        opacity: 0.88;
    }

/* The purposes. */
.cookie-consent__purposes {
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
}

.cookie-consent__purpose {
    padding: 10px 0;
    border-top: 1px solid rgba(128, 128, 128, 0.25);
}

.cookie-consent__purpose-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cookie-consent__toggle {
    padding: 0;
    border: 0;
    background: none;
    color: var(--dark-text, #212325);
    font-size: 15px;
    font-weight: 700;
    text-align: left;
}

    .cookie-consent__toggle::before {
        content: "+";
        display: inline-block;
        width: 18px;
    }

    .cookie-consent__toggle[aria-expanded="true"]::before {
        content: "\2212";
    }

.cookie-consent__always {
    color: var(--mid-text, #818589);
    font-size: 14px;
    white-space: nowrap;
}

.cookie-consent__choice {
    display: inline-flex;
    flex-shrink: 0;
    gap: 6px;
}

    /* Refuse and Accept look the same until one is chosen, and the chosen one looks the same either way. */
    .cookie-consent__choice button {
        min-width: 84px;
        padding: 5px 12px;
        border: 1px solid rgba(128, 128, 128, 0.35);
        border-radius: 3px;
        background: var(--gray-bkg, #f4f6f8);
        color: var(--normal-text, #414549);
        font-size: 13px;
        font-weight: 600;
    }

        .cookie-consent__choice button[aria-pressed="true"] {
            border-color: var(--black-bkg, #424252);
            background: var(--black-bkg, #424252);
            color: #fff;
        }

.cookie-consent__purpose-body {
    padding: 6px 0 0 18px;
    color: var(--light-text, #545559);
    font-size: 14px;
}

    .cookie-consent__purpose-body p {
        margin: 0 0 6px;
    }

.cookie-consent__partners {
    color: var(--mid-text, #818589);
}

/* The "Cookie settings" link the partial renders itself on a page with no footer. */
.cookie-consent-settings {
    margin: 24px 0;
    text-align: center;
    font-size: 13px;
}

@media (max-width: 500px) {
    .cookie-consent {
        padding: 16px 18px 20px;
    }

    .cookie-consent__button {
        flex: 1 1 100%;
        min-width: 0;
    }

    .cookie-consent__purpose-head {
        flex-wrap: wrap;
    }
}
