#cookieconsent {
    --nowo-cc-font-family: var(--font);
    --nowo-cc-bg: var(--bg);
    --nowo-cc-primary: var(--ink);
    --nowo-cc-secondary: var(--muted);
    --nowo-cc-btn-primary-bg: var(--btn-bg);
    --nowo-cc-btn-primary-color: var(--btn-ink);
    --nowo-cc-btn-primary-hover-bg: var(--petrol);
    --nowo-cc-btn-primary-hover-color: var(--btn-ink);
    --nowo-cc-btn-secondary-bg: var(--bg);
    --nowo-cc-btn-secondary-color: var(--ink);
    --nowo-cc-btn-secondary-border: var(--card-line-strong);
    --nowo-cc-btn-secondary-hover-bg: var(--quiet);
    --nowo-cc-btn-secondary-hover-color: var(--ink);
    --nowo-cc-btn-secondary-hover-border: var(--petrol);
    --nowo-cc-btn-radius: 999px;
    --nowo-cc-modal-radius: calc(var(--r) / 2);
    --nowo-cc-separator: var(--line);
    --nowo-cc-category-block-bg: var(--quiet);
    --nowo-cc-category-block-border: var(--line);
    --nowo-cc-category-block-hover-bg: var(--beige);
    --nowo-cc-category-block-hover-border: var(--card-line-strong);
    --nowo-cc-card-required-bg: var(--quiet);
    --nowo-cc-card-required-border: var(--line);
    --nowo-cc-card-preferences-bg: var(--quiet);
    --nowo-cc-card-preferences-border: var(--line);
    --nowo-cc-footer-bg: var(--quiet);
    --nowo-cc-footer-border: var(--line);
    --nowo-cc-toggle-on-bg: var(--petrol);
    --nowo-cc-toggle-off-bg: var(--muted);

    position: fixed;
    inset: 0;
    box-sizing: border-box;
}

#cookieconsent.show {
    justify-content: flex-end;
    padding-inline: var(--gut);
}

#cookieconsent.nowo-cookie-consent--preferences-view.show {
    justify-content: center;
}

#cookieconsent .modal-dialog {
    max-width: 36rem;
}

#cookieconsent:focus {
    outline: none;
}

#cookieconsent .nowo-cookie-consent__title {
    font-weight: var(--h2-w);
    letter-spacing: var(--tracking-h2);
}

#cookieconsent :is(.modal-header, .modal-body, .modal-footer) {
    padding: 0.75rem 1rem;
}

#cookieconsent .nowo-cookie-consent__form {
    gap: 0;
    margin-top: 0;
}

#cookieconsent .nowo-cookie-consent__step--preferences.nowo-cookie-consent__step--active {
    grid-template-rows: auto minmax(0, 1fr);
}

#cookieconsent .futurelab-consent-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

#cookieconsent:not(.nowo-cookie-consent--preferences-view) #cookie_consent_save,
#cookieconsent.nowo-cookie-consent--preferences-view [data-nowo-show-preferences] {
    display: none;
}

#cookieconsent .futurelab-consent-policies {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 1rem;
    margin: 0.75rem 0 0;
    padding: 0;
    list-style: none;
}

#cookieconsent .futurelab-consent-policies a {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    color: var(--muted);
    font-size: var(--small);
    text-underline-offset: 3px;
}

#cookieconsent .futurelab-consent-policies a:hover {
    color: var(--accent-ink);
}

#cookieconsent .nowo-cookie-consent__category-title-row {
    box-sizing: border-box;
}

#cookieconsent [data-nowo-category="required"] .nowo-cookie-consent__category-title-row {
    padding-inline-end: 1rem;
}

#cookieconsent [data-nowo-category="required"] .nowo-cookie-consent__toggle-wrapper {
    display: none;
}

#cookieconsent .nowo-cookie-consent__btn {
    min-height: 44px;
    font-weight: 500;
}

#cookieconsent .nowo-cookie-consent__btn:is(.nowo-cookie-consent__btn--reject, .nowo-cookie-consent__btn--accept) {
    border-color: var(--btn-bg);
    background: var(--btn-bg);
    color: var(--btn-ink);
}

#cookieconsent .nowo-cookie-consent__btn:is(.nowo-cookie-consent__btn--reject, .nowo-cookie-consent__btn--accept):hover {
    border-color: var(--petrol);
    background: var(--petrol);
}

#cookieconsent :is(button, summary, a):focus-visible,
#cookieconsent input:focus-visible ~ .nowo-cookie-consent__toggle-track {
    outline: 2px solid var(--petrol);
    outline-offset: 3px;
}

#cookieconsent summary:focus-visible {
    outline-offset: -3px;
}

[data-controller="cookie-consent"] .nowo-cookie-consent__preferences-bubble {
    --nowo-cc-bubble-accent: var(--petrol);
    --nowo-cc-bubble-display-while-open: none;

    width: 48px;
    height: 48px;
    background: var(--bg);
}

.ft-legal .nowo-cookie-consent__manage-link {
    min-height: 24px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ft-muted);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.ft-legal .nowo-cookie-consent__manage-link:hover {
    color: var(--ft-ink);
}

.ft-legal .nowo-cookie-consent__manage-link:focus-visible {
    outline: 2px solid var(--ft-ink);
    outline-offset: 2px;
}

@media (max-width: 639.98px) {
    #cookieconsent .futurelab-consent-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #cookieconsent :is([data-nowo-show-preferences], #cookie_consent_save) {
        grid-column: 1 / -1;
    }

    #cookieconsent .futurelab-consent-actions .nowo-cookie-consent__btn {
        padding-inline: 0.625rem;
    }
}
