.cookie-consent-preview {
    position: relative;
    overflow: hidden;

    img {
        width: 100%;
        height: auto;
        cursor: pointer;
    }

    p {
        cursor: pointer;
        text-align: center;
    }

    img ~ p {
        position: absolute;
        top: 40%;
        right: 0;
        left: 0;
        background-color: rgba(255, 255, 255, 0.8);
        color: #333;
        padding: 4px 10px;
        margin: 0;
        text-overflow: ellipsis;
    }
}

.cookie-consent {
    width: 100%;
    max-height: 100%;
    position: fixed;
    bottom: 0;
    left: 0;
    overflow: auto;
    z-index: 999999;
    color: white;

    input:checked ~ .cookie-option__label {
        &:before {
            transform: rotate(90deg);
        }

        &:after {
            opacity: 1;
        }
    }

    @media only screen and (min-width: 600px) {
        .cookie-consent__explanation {
            max-width: 70%;
        }

        .cookie-consent__lower__accept {
            margin: 1em 0 0;
        }

        .cookie-consent__upper__controls {
            flex-direction: row;
        }

        .cookie-consent__lower__options {
            flex-direction: row;
            align-items: flex-start;
        }

        .cookie-option:first-child {
            margin-left: 0;
        }

        .cookie-option {
            margin-left: 32px;
        }
    }
}

.cookie-consent__upper,
.cookie-consent__lower {
    padding: 2rem 5%;
}

.cookie-consent__title {
    font-size: 1.5em;
}

.cookie-consent__upper {
    background-color: #3c3f46;
}

.cookie-consent__lower__options,
.cookie-consent__lower__explanations {
    list-style: none;
    padding-left: 0;
}

.cookie-consent__lower {
    padding-bottom: 48px;
    display: flex;
    flex-direction: column;
    background-color: #585d68;
}

.cookie-consent__lower__accept {
    margin: 1.25em 0 1.5em;
    order: 2;
}

.cookie-explanation__description {
    line-height: 24px;
    margin-top: 2px;
}

.cookie-explanation__title {
    color: white;
    font-size: 16px;
    margin-top: 24px;
    margin-bottom: 0;
}

.cookie-consent__upper__buttons {
    display: flex;
    flex-direction: column;
    margin-top: 16px;
}

.cookie-consent__accept {
    padding: 12px 25px;
    display: flex;
    align-items: center;
    margin-right: 3px;
    border: none;
}

.cookie-consent__accept-icon {
    margin-left: 5px;
}

.cookie-consent__accept:hover {
    background-color: lightgray;
}

.cookie-consent__upper__controls {
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    .cookie-consent__upper__text {
        flex-grow: 1;
    }
}

.cookie-consent-toggle {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 16px 0;
    margin: 0;
    transition: opacity 0.2s;
    font-weight: 500;
    background: none;
    border: none;
    white-space: nowrap;

    img {
        transform: rotate(90deg);
    }
}

.cookie-consent-toggle:hover {
    opacity: 0.8;
}

.cookie-consent-toggle:hover.anchor-down {
    animation: bounce 0.5s;
}

.cookie-consent-privacy {
    text-decoration: underline;
    color: white;
}

.cookie-consent-privacy:hover {
    text-decoration: none;
    color: white;
}

.cookie-consent__lower__options {
    padding: 0;
    display: flex;
    flex-direction: column;
    list-style: none;
    margin-bottom: 16px;
}

.cookie-option {
    width: auto;
    margin-left: 0;
    margin-bottom: 8px;
}

.cookie-option__label {
    width: 100%;
    margin: 0;
    position: relative;
    display: flex;
}

.cookie-option__checkbox:disabled:checked + label:before {
        border: 2px solid grey;
        background-color: grey;
}

.cookie-option__checkbox {
    opacity: 0;
    position: absolute;
}

.cookie-option__label:before {
    content: "";
    width: 22px;
    height: 22px;
    margin-right: 16px;
    display: inline-block;
    flex-shrink: 0;
    position: relative;
    top: 0;
    border: 2px solid white;
    transition: all 0.3s;
}

.cookie-option__label:after {
    content: "";
    width: 7px;
    height: 13px;
    opacity: 0;
    flex-shrink: 0;
    position: absolute;
    top: 5px;
    left: 7px;
    border-bottom: 2px solid white;
    border-right: 2px solid white;
    transform: rotate(35deg);
}

.cookie-option__checkbox:focus+label:before {
    outline: 2px dotted white;
    outline-offset: 2px;
}

.cookie-consent__lower__accept {
    text-align: left;
    display: flex;
    justify-content: flex-end;
}

.anchor-down {
    margin-left: 8px;
}