/* Cookie Banner Styles */

html.cookie-modal-open {
    overflow: hidden;
}

.cookiebanner-container {
    /* setting and modal/overlay */
    --max-text-width: 100%;
    --cookiebanner-padding: 16px 16px;
    --cookiebanner-dir: column;
    --cookiebanner-buttons-dir: column;
    --cookiebanner-buttons-dir: column;
    --accordion-border-color: #767676;
    --accordion-item-padding-y: 16px;
    --accordion-item-padding-x: 4px;

    z-index: 9999;


    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    pointer-events: none;

    .backdrop {
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        pointer-events: all;
    }

    h4 {
        font-weight: 700;
    }

    a {
        text-decoration: underline;
    }

    .h-md {
        font-size: 20px;
        line-height: 1.2;
        font-weight: 700;
    }
    p {
        margin-bottom: 0;
    }
    .text-sm {
        font-size: 16px;
        line-height: 1.5;
    }

    .close {
        position: absolute;
        top: 16px;
        right: 8px;
        min-width: 32px;
        height: 32px;
        width: 32px;

        padding: 4px;

        cursor: pointer;

        svg {
            width: 24px;
            height: 24px;
            transform: rotate(45deg);
            transition: all 0.3s ease-in-out;
        }
        &:after,
        &:before {
            content: none;
        }


        &:hover {
            svg {
                transform: rotate(225deg);
            }
        }

        &:focus-visible {
            outline-width: 1px;
        }
    }

    /* Settings banner only*/
    .cookiebanner {
        position: absolute;
        bottom: 0;

        display: flex;
        justify-content: space-between;
        flex-direction: var(--cookiebanner-dir);
        gap: 16px;

        width: 100%;
        max-width: 1440px;
        padding: var(--cookiebanner-padding);

        border: 1px solid #333333;
        border-bottom: none;
        border-top-left-radius: 24px;
        border-top-right-radius: 24px;

        pointer-events: all;
        overflow: hidden;

        &:after {
            content: "";
            position: absolute;
            inset: 0;
            background-color: #ffffff;
            z-index: -10;
        }

        &[aria-expanded="false"] {
            display: none;
        }
    }

    .cookiebanner-content {
        width: 100%;
        max-width: var(--max-text-width);

        h4 {
            font-size: 20px;
            font-weight: 700;
            margin-bottom: 16px;
        }

        p {
            font-size: 16px;
        }
    }

    .cookiebanner-buttons {
        list-style: none;
        display: flex;
        justify-content: flex-end;
        width: 100%;
        flex-direction: var(--cookiebanner-buttons-dir);

        gap: 16px;

        margin-bottom: 0;

        li {
            margin-bottom: 0;

            .zhaw-btn {
                width: 100%;
                font-size: 16px;
                cursor: pointer;
                padding: 8px 32px;
            }
        }

        @media (min-width: 1280px) {
            max-width: 384px;
        }
    }

    @media (min-width: 768px) {
        --max-text-width: 100%;
        --cookiebanner-buttons-dir: row;
    }

    @media (min-width: 1280px) {
        --cookiebanner-padding: 32px 144px;
        --max-text-width: 652px;
        --cookiebanner-dir: row;
        --cookiebanner-buttons-dir: column;

        .close {
            top: 24px;
            right: 24px;
        }
    }
}
