/*
    Cookiebanner (Views/Cookies.cshtml) op de klantsites: alleen indeling en neutrale kleuren.
    Kleuren, lettertype en knoppen zet elke site in zijn eigen {klant}-cookies.less, die na dit bestand laadt.
    De bestelomgeving gebruikt dit bestand niet, maar css/cookies.less (via de bestelthema's).
    Gewone css en geen less: less van een klantsite mag alleen less uit zijn eigen pakket importeren.
*/
.cookie-consent-container {
    position: fixed;
    z-index: 9999;
    right: 0;
    bottom: 0;
    left: 0;
    max-width: 100vw;
    max-height: 100vh;
    padding: 1rem;
    background: #fff;
    color: #000;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
}

@media (min-width: 768px) {
    .cookie-consent-container {
        padding: 1rem 3rem;
    }
}

.cookie-consent-container > .row > div {
    padding: 0.25rem;
}

.cookie-consent-container .cookies-title > span,
.cookie-consent-container .cookies-options-header > span {
    font-size: 1.5rem;
    font-weight: 700;
}

.cookie-consent-container .cookies-title,
.cookie-consent-container .cookies-options-header {
    padding-bottom: 0.5rem;
}

.cookie-consent-container a:not(.btn) {
    color: inherit;
    text-decoration: underline;
}

.cookie-consent-container .cookies-statement {
    display: inline-block;
    margin-top: 0.5rem;
}

.cookie-consent-container .row-main {
    align-items: center;
}

.cookie-consent-container .row-main.hidden {
    display: none;
}

.cookie-consent-container .cookies-buttons .row > div {
    margin-top: 0.5rem;
    text-align: end;
}

.cookie-consent-container .btn {
    width: 100%;
}

/* desktop: compacte knoppen rechts in plaats van de volle kolombreedte */
@media (min-width: 992px) {
    .cookie-consent-container .cookies-buttons .btn {
        width: auto;
        min-width: 200px;
    }
}

/* geen blauwe focusrand van Bootstrap 4 na een klik; wel een zichtbare rand bij toetsenbordfocus */
.cookie-consent-container .btn:focus {
    box-shadow: none;
}

.cookie-consent-container .btn:focus-visible,
.cookie-consent-container .cookies-notice-close:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* "Aanpassen" is een tekstlink met pijltje, geen knop */
.cookie-consent-container #btn-customize-expand {
    width: auto;
    min-width: 0;
    padding: 0.25rem 0;
    border: 0;
    background: none;
    color: inherit;
    /* geen font-weight: het knoplettertype van de site bepaalt het gewicht (Cal Sans van Ototol heeft geen bold; nep-vet smeert uit) */
}

.cookie-consent-container #btn-customize-expand:hover > span:first-child {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* chevron getekend met een rand: scherper dan een tekenpijltje en volgt de tekstkleur */
.cookie-consent-container #btn-customize-expand .icon {
    display: inline-block;
    margin-left: 0.5rem;
}

.cookie-consent-container #btn-customize-expand .icon::before {
    content: "";
    display: inline-block;
    width: 0.5em;
    height: 0.5em;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transition: transform 0.2s ease;
}

.cookie-consent-container #btn-customize-expand .icon-up::before {
    transform: translateY(15%) rotate(-135deg);
}

.cookie-consent-container #btn-customize-expand .icon-down::before {
    transform: translateY(-25%) rotate(45deg);
}

/* kruisje zonder het iconenfont van de bestelomgeving */
.cookie-consent-container .icon-remove-1::before { content: "\2715"; cursor: pointer; }

.cookie-consent-container .row-options {
    display: none;
}

.cookie-consent-container .row-options.visible {
    display: flex;
}

.cookie-consent-container .cookies-options-switch {
    display: flex;
    justify-content: end;
    align-items: start;
}

/* schakelaar: de klantsites hebben Bootstrap 4.0, dat geen form-switch kent (anders een gewoon vinkje) */
.cookie-consent-container .cookies-options-switch .form-check {
    padding-left: 0;
}

.cookie-consent-container .cookies-options-switch .form-check-input {
    position: relative;
    width: 48px;
    height: 24px;
    margin: 0;
    -webkit-appearance: none;
    appearance: none;
    border: 1px solid rgba(0, 0, 0, 0.25);
    border-radius: 999px;
    background: #e9ecef;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.cookie-consent-container .cookies-options-switch .form-check-input::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

.cookie-consent-container .cookies-options-switch .form-check-input:checked::before {
    transform: translateX(24px);
}

/* bewust minder specifiek dan de schakelaar zelf: de kleur zet elke site in {klant}-cookies.less */
.cookie-consent-container .form-check-input:checked {
    border-color: #555;
    background-color: #555;
}

.cookie-consent-container .cookies-options-switch .form-check-input:disabled {
    opacity: 0.6;
    cursor: default;
}

.cookie-consent-container .cookies-options-switch .form-check-input:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* text-end bestaat pas in Bootstrap 5 */
.cookie-consent-container .cookies-save-prefs,
.cookie-consent-container .cookies-options-close {
    text-align: right;
}

.cookie-consent-container .cookies-options-title,
.cookie-consent-container .cookies-save-prefs {
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.15);
}

.cookie-consent-container .cookies-options-title .h5 {
    font-size: 1.125rem;
    font-weight: 700;
}

.cookie-consent-container .cookies-options-explain {
    padding-bottom: 1rem;
}

/* melding bij "alleen functioneel": tekst met een kruisje */
.cookie-consent-notice .row-main {
    align-items: start;
    flex-wrap: nowrap;
}

.cookie-consent-container .cookies-notice-close {
    padding: 0.25rem 0.5rem;
    border: 0;
    background: none;
    color: inherit;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

/* footerlinks (Views/Partials/CookieLinks.cshtml); kleuren per site */
.cookie-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
}

@media (min-width: 992px) {
    .cookie-consent-container .cookies-save-prefs .btn {
        width: auto;
    }
}
