/* Avance additions on top of cookieconsent.css */

:root {
    --cc-avnc-border: #d5dee2;
    --cc-avnc-surface: #f0f4f7;
    --cc-avnc-text: #2c2f31;
}

#cc-main {
    /* Use the typeface of the website instead of the system font. */
    font-family: inherit;
    --cc-btn-primary-color: var(--cc-avnc-on-primary, #fff);
    --cc-btn-primary-hover-color: var(--cc-avnc-on-primary, #fff);
    --cc-btn-primary-hover-bg: color-mix(in srgb, var(--cc-btn-primary-bg) 82%, #000);
    --cc-btn-primary-hover-border-color: var(--cc-btn-primary-hover-bg);
    --cc-modal-border-radius: .75rem;
    --cc-overlay-bg: rgba(0, 0, 0, .5);
}

/* Consent modal */

#cc-main .cm--box {
    max-width: 30rem;
}

#cc-main .cm__title {
    font-size: 1.25em;
    line-height: 1.3;
}

#cc-main .cm__desc {
    font-size: .95em;
    line-height: 1.6;
}

/* Accept and reject side by side: same size, same colour, same effort.
   !important because the library forces a column on small screens. */
#cc-main .cm--box .cm__btn-group:first-child {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
}

#cc-main .cm--box .cm__btn-group:first-child .cm__btn {
    margin: 0 !important;
}

#cc-main .cm--box .cm__btn-group + .cm__btn-group {
    margin-top: .5rem !important;
}

#cc-main .cm__btn,
#cc-main .pm__btn {
    min-height: 44px;
}

#cc-main .cm__footer {
    background: none;
    border-top: 1px solid var(--cc-separator-border-color);
}

#cc-main .cm__link-group a {
    font-weight: 400;
    text-decoration: underline;
    text-underline-offset: 2px;
}

#cc-main :is(.cm__btn, .pm__btn, .pm__close-btn, .section__toggle, a):focus-visible {
    outline: 2px solid var(--cc-btn-primary-bg);
    outline-offset: 2px;
}

/* Preferences modal */

/* Toggles: off is a light track, on is the primary colour, and the state is
   spelled out next to it. */
#cc-main {
    --cc-toggle-off-bg: #aab3bd;
    --cc-toggle-off-knob-bg: #fff;
    --cc-toggle-on-knob-bg: #fff;
    --cc-toggle-readonly-bg: color-mix(in srgb, var(--cc-btn-primary-bg) 55%, #fff);
    --cc-toggle-readonly-knob-bg: #fff;
}

#cc-main .toggle__icon-off svg {
    stroke: #5e6266;
}

/* The arrow shares its colour with the read-only toggle in the library. */
#cc-main .pm__section--expandable .pm__section-arrow {
    background: var(--cc-avnc-border);
}

@supports selector(:has(*)) {
    #cc-main .pm__section--toggle .pm__section-title {
        padding-right: 9.5em;
    }

    #cc-main .pm__section--toggle > .pm__section-title-wrapper > .section__toggle-wrapper::before {
        content: 'Uit';
        position: absolute;
        top: 50%;
        right: calc(100% + .625rem);
        transform: translateY(-50%);
        color: var(--cc-secondary-color);
        font-size: .8125rem;
        font-weight: 600;
        line-height: 1;
        white-space: nowrap;
    }

    #cc-main .pm__section--toggle > .pm__section-title-wrapper > .section__toggle-wrapper:has(.section__toggle:checked)::before {
        content: 'Aan';
        color: var(--cc-primary-color);
    }

    #cc-main .pm__section--toggle > .pm__section-title-wrapper > .section__toggle-wrapper:has(.section__toggle:disabled)::before {
        content: 'Altijd aan';
    }
}

#cc-main .pm__section-desc {
    line-height: 1.6;
}

@media (max-width: 640px) {
    /* Keep room for the content: accept and reject share a row. */
    #cc-main .pm__footer .pm__btn-group:first-child {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: .5rem;
    }

    #cc-main .pm__footer .pm__btn-group:first-child .pm__btn {
        margin: 0 !important;
    }

    #cc-main .pm__footer .pm__btn-group + .pm__btn-group {
        margin-top: .5rem !important;
    }

    #cc-main .pm__section--toggle .pm__section-title {
        padding-right: 8.75em;
    }

    /* On small screens the cookie table is a list of label/value pairs. */
    #cc-main .pm__table td::before {
        overflow: visible;
        min-width: 6.5em;
        text-overflow: clip;
    }
}

.cc-avnc-consent-id {
    overflow-wrap: anywhere;
}

/* Placeholder for content of third parties */

.cc-avnc-embed {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    box-sizing: border-box;
    width: 100%;
    min-height: 12rem;
    padding: 1.5rem;
    border: 1px solid var(--cc-avnc-border);
    border-radius: .5rem;
    background: var(--cc-avnc-surface);
    color: var(--cc-avnc-text);
    font-size: .9375rem;
    line-height: 1.5;
    text-align: center;
}

.cc-avnc-embed p {
    max-width: 32rem;
    margin: 0;
}

/* WordPress keeps the aspect ratio of an embed with an absolutely positioned child. */
.wp-has-aspect-ratio .cc-avnc-embed {
    position: absolute;
    inset: 0;
    height: 100%;
}

/* Cookieverklaring on the privacy page */

.cc-avnc-declaration table {
    width: 100%;
    margin: 1rem 0 1.5rem;
    border-collapse: collapse;
    font-size: .9375em;
}

.cc-avnc-declaration :is(th, td) {
    padding: .5rem .75rem;
    border-bottom: 1px solid var(--cc-avnc-border);
    text-align: left;
    vertical-align: top;
}

.cc-avnc-declaration th {
    white-space: nowrap;
}

.cc-avnc-declaration td:first-child {
    overflow-wrap: anywhere;
}

/* Our own buttons outside the melding */

.cc-avnc-embed__load,
.cc-avnc-declaration__change {
    min-height: 44px;
    padding: .5rem 1.25rem;
    border: 0;
    border-radius: .4rem;
    background: var(--cc-btn-primary-bg);
    color: var(--cc-avnc-on-primary, #fff);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.cc-avnc-embed__load:focus-visible,
.cc-avnc-declaration__change:focus-visible,
.cc-avnc-reopen:focus-visible {
    outline: 2px solid var(--cc-btn-primary-bg);
    outline-offset: 2px;
}

/* Button to change or withdraw the choice, on every page */

.cc-avnc-reopen {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 9999;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 0;
    border-radius: 50%;
    background: var(--cc-btn-primary-bg);
    color: var(--cc-avnc-on-primary, #fff);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
    transition: transform .15s ease;
}

.cc-avnc-reopen:hover {
    transform: scale(1.08);
}

.cc-avnc-reopen svg {
    display: block;
    width: 24px;
    height: 24px;
}

.show--consent .cc-avnc-reopen,
.show--preferences .cc-avnc-reopen {
    display: none;
}

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

@media print {
    .cc-avnc-reopen {
        display: none;
    }
}
