/* Backstage 7.1 cookie dialog (via the kokkerelli.nl port). what-els.com defines the 7.1 colour
   variables itself, except --bodycolor4 (button background), mapped to the footer colour here */
#cookieprefs {
    --bodycolor4: var(--bodycolor3);
}
#cookieprefs {
    right: 0;
    bottom: 0;
    width: 500px;
    max-width: 500px;
    box-sizing: border-box;
    font-size: .9em;
    text-align: left;
    background-color: var(--bodycolor1);
    /*box-shadow: 0px 0px 30px rgb(from var(--textcolor1) r g b / 0.2);*/
    -moz-user-select: none;
    -khtml-user-select: none;
    -webkit-user-select: none;
    user-select: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transition: all 600ms ease-out;
    opacity: 0;
    transform: translateY(500px);
    scrollbar-width: thin;
    /* bottom-right corner of the viewport instead of the default dialog centering */
    margin: 0;
    position: fixed;
    top: auto;
    left: auto;
    bottom: 32px;
    right: 32px;
    border: none;
    border-radius: 8px;
    padding: 30px;
}
dialog#cookieprefs[open]::backdrop {
    background-color: rgba(122, 122, 122, 0.7);
    mix-blend-mode: multiply;
}
@media screen and (max-width: 1100px) {
    
    dialog#cookieprefs[open]::backdrop {
        opacity: 0.3;
    }
    
}



#cookieprefs.not-static {
    position: fixed;
}
#cookieprefs.appear {
    opacity: 1;
    transform: translateY(0px);
}
#cookieprefs h2.cookietitle {
    font-size: 1.6em;
    color: var(--textcolor1);
    font-weight: 600;
    margin-bottom: 15px;
    
}
#cookieprefs .cookieintro,
#cookieprefs details p {
    position: relative;
    box-sizing: border-box;
    font-size: .9em;
    line-height: 1.5;
    margin-bottom: 10px;
}
#cookieprefs .cookieintro {
    margin-bottom: 20px;
}
#cookieprefs .cookieintro p {
    margin-bottom: 0;
}

#cookieprefs .cookieopt {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    /*column-gap: 1em;*/
    margin-bottom: 0em;
    
}
#cookieprefs .cookieopt details {
    flex-grow: 1;
    text-align: left;
}
#cookieprefs .cookieopt details summary {
    position: relative;
    left: 1px;
    cursor: pointer;
    font-weight: 600;
}
#cookieprefs .cookieopt details p {
    margin-top: 0px;
    width: calc(100% + 60px);
}
#cookieprefs .cookieopt label.cookieopt-toggle {
    position: relative;
    display: inline-block;
    right: 2px;
    width: 70px;
    min-width: 70px;
    height: 16px;
}
#cookieprefs .cookieopt label.cookieopt-toggle .toggle-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 30px;
    background-color: #ccc;
    transition: background-color 300ms ease-in-out;
}
#cookieprefs .cookieopt label.cookieopt-toggle .toggle-background:after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--bodycolor1);
    transition: transform 300ms ease-in-out;
}
#cookieprefs .cookieopt label.cookieopt-toggle input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
}
#cookieprefs .cookieopt label.cookieopt-toggle input[type="checkbox"]:not(:disabled) + .toggle-background {
    cursor: pointer;
}
#cookieprefs .cookieopt label.cookieopt-toggle input[type="checkbox"]:checked + .toggle-background {
    background-color: var(--success);
}
#cookieprefs .cookieopt label.cookieopt-toggle input[type="checkbox"]:disabled + .toggle-background {
    background-color: #aaa;
}
#cookieprefs .cookieopt label.cookieopt-toggle input[type="checkbox"]:checked + .toggle-background:after {
    transform: translateX(54px);
}
#cookieprefs p a {
    color: var(--color1);
}
#cookieprefs .button-row {
    display: flex;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 1em;
    margin-top: 10px;
    position: sticky;
    bottom: 0;
    background-color: var(--bodycolor1);
    /*box-shadow: 0px 30px 30px 50px #fff;*/
    padding-top: 10px;
}
#cookieprefs .button-row .btn {
    background-color: var(--color1);
}
#cookieprefs .button-row .btn#cookies-deny-all {
    background-color: var(--bodycolor4);
    color: var(--textcolor1);
}
#cookieprefs .button-row .btn#cookies-save-preferences {
    background-color: var(--bodycolor4);
    color: var(--textcolor1);
}
#cookieprefs .button-row .btn#cookies-accept-all {
    background-color: var(--success);
    color: var(--textcolor1);
}
#cookieprefs .button-row .btn:hover {
    filter: brightness(1.1);
}
/* what-els.com: the site's .btn draws bracket borders, which the filled 7.1 buttons don't use,
   and its 16px uppercase text wraps the labels in three buttons of 500px (checked nl/en/de/fr) */
#cookieprefs .button-row .btn {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0 12px 2px;
    font-size: 14px;
    letter-spacing: .5px;
    white-space: nowrap;
}
#cookieprefs .button-row .btn:before,
#cookieprefs .button-row .btn:after {
    display: none;
}
@media screen and (max-width: 1100px) {
    
    #cookieprefs {
        font-size: .8em;
        line-height: 1.5;
        max-width: calc(100% - 60px);
        right:  30px;
        bottom: 30px;
    }
    #cookieprefs .button-row {
        flex-direction: column;
    }
    
}



/* Verwijder de blauwe rand bij muisklik/automatische focus, maar behoud duidelijke styling voor toetsenbordgebruikers */
#cookieprefs summary:focus-visible {
    outline: 2px solid var(--bodycolor2); /* Gebruik je eigen merkkleur */
    outline-offset: 2px;
}

/* Verwijder de focus-rand op het summary-element (de eerste optie) */
#cookieprefs summary:focus,
#cookieprefs summary:focus-visible {
    outline: none;
}

/* Of algemeen voor alle focusbare elementen in het cookiemenu */
#cookieprefs *:focus {
    outline: none;
}