/* ==========================================================
   Cookie Consent
========================================================== */

:root {

    --cookie-radius: 18px;
    --cookie-shadow: 0 20px 60px rgba(0,0,0,.20);

}

/* ===========================
   Backdrop
=========================== */

.cookie-backdrop {

    position: fixed;
    inset: 0;

    background: rgba(0,0,0,.45);

    backdrop-filter: blur(3px);

    opacity: 0;
    visibility: hidden;

    transition: .25s ease;

    z-index: 9998;

}

.cookie-backdrop.show {

    opacity: 1;
    visibility: visible;

}

/* ===========================
   Banner
=========================== */

.cookie-banner {

    position: fixed;

    left: 50%;
    bottom: 25px;

    transform: translateX(-50%) translateY(30px);

    width: min(95%, 760px);

    background: #fff;

    border-radius: var(--cookie-radius);

    box-shadow: var(--cookie-shadow);

    padding: 2rem;

    opacity: 0;
    visibility: hidden;

    transition: .3s ease;

    z-index: 9999;

}

.cookie-banner.show {

    opacity: 1;
    visibility: visible;

    transform: translateX(-50%) translateY(0);

}

/* ===========================
   Header
=========================== */

.cookie-header h2 {

    margin-bottom: .75rem;

    font-size: 1.6rem;
    font-weight: 700;

}

.cookie-header p {

    color: #666;
    line-height: 1.6;

    margin-bottom: 2rem;

}

/* ===========================
   Optionen
=========================== */

.cookie-options {

    display: flex;
    flex-direction: column;

    gap: 1rem;

}

.cookie-option {

    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 2rem;

    padding: 1rem 0;

    border-bottom: 1px solid #ececec;

}

.cookie-option:last-child {

    border-bottom: none;

}

.cookie-option h3 {

    font-size: 1.05rem;
    margin-bottom: .35rem;

}

.cookie-option p {

    margin: 0;
    color: #666;

}

/* ===========================
   Buttons
=========================== */

.cookie-buttons {

    display: flex;
    gap: 1rem;

    margin-top: 2rem;

    flex-wrap: wrap;

}

.cookie-buttons .btn {

    flex: 1;
    min-width: 180px;

}

/* ===========================
   Switch
=========================== */

.cookie-switch {

    position: relative;

    width: 56px;
    height: 30px;

    flex-shrink: 0;

}

.cookie-switch input {

    display: none;

}

.cookie-switch .slider {

    position: absolute;

    inset: 0;

    background: #ccc;

    border-radius: 30px;

    cursor: pointer;

    transition: .25s;

}

.cookie-switch .slider::before {

    content: "";

    position: absolute;

    width: 22px;
    height: 22px;

    left: 4px;
    top: 4px;

    background: #fff;

    border-radius: 50%;

    transition: .25s;

}

.cookie-switch input:checked + .slider {

    background: #198754;

}

.cookie-switch input:checked + .slider::before {

    transform: translateX(26px);

}

.cookie-switch input:disabled + .slider {

    opacity: .7;
    cursor: default;

}

/* ===========================
   Responsive
=========================== */

@media (max-width: 768px) {

    .cookie-banner {

        left: 15px;
        right: 15px;
        bottom: 15px;

        width: auto;

        transform: translateY(30px);

        padding: 1.5rem;

    }

    .cookie-banner.show {

        transform: translateY(0);

    }

    .cookie-option {

        flex-direction: column;
        align-items: flex-start;

    }

    .cookie-switch {

        align-self: flex-end;

    }

    .cookie-buttons {

        flex-direction: column;

    }

}