.cookie{
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    z-index: 9999999;
}

button.btn {
    height: 35px;
    border-radius: 5px;
    border: 0;
}

button.btn.btn-primary.text-white.cookie__btn.cookie__btn_success {
    background: #002261;
    color: #fff;
}

button.btn.btn-outline-dark.cookie__btn {
    background: #afafaf;
}

.cookie_block.active{
    height: 100%;
}

.cookie.cookie_settings{
    height: 100%;
    overflow: scroll;
}

.cookie input[type="checkbox"]{
    display: none;
}

.cookie input[type="checkbox"] + label{
    position: relative;
    width: 100%;
    padding-right: 60px;
}

.cookie input[type="checkbox"] + label:before, .cookie input[type="checkbox"] + label:after{
    position: absolute;
    display: block;
    top: 50%;
    right: 0;
    content: "";
}

.cookie input[type="checkbox"] + label:before{
    background: #ecedf0;
    width: 46px;
    height: 24px;
    border-radius: 20px;
    margin-top: -12px;
    transition: background-color ease-in .2s;
}

.cookie input[type="checkbox"] + label:after{
    background: #fff;
    width: 20px;
    height: 20px;
    border-radius: 10px;
    margin: -10px 24px 0 0;
    transition: margin-right ease-in .2s;
}

.cookie input[type="checkbox"]:checked + label:before{
    background: #0b8c8c;
}

.cookie input[type="checkbox"]:checked + label:after{
    margin-right: 2px;
}

.cookie__shadow{
    position: fixed;
    left: 0;
    top: 0;
    opacity: 0;
    transition: opacity ease-in .3s;
    z-index: 0;
}

.cookie_block form[data-cookie-form].active .cookie__shadow{
    background: rgba(0,0,0,.6);
    width: 100%;
    height: 100%;
    opacity: 1;
}

.cookie:not(.cookie_block) form[data-cookie-form] .cookie__shadow{
    pointer-events: none;
}

form[data-cookie-form]:not(.active) .cookie__body{
    opacity: 0;
    pointer-events: none;
    transition: margin ease-in .2s, opacity ease-in .2s;
}

.cookie_block form[data-cookie-form]:not(.active) .cookie__body{
    margin-top: 50vh;
}

.cookie:not(.cookie_block) form[data-cookie-form]:not(.active) .cookie__body{
    margin-bottom: -30vh;
}

form[data-cookie-form]:not(.active) .cookie__body{
    position: fixed;
}

.cookie__body{
    background: #fff;
    font-size: 17px;
    line-height: 27px;
    transition: margin ease-in .3s, opacity ease-in .3s;
    z-index: 9;
}

.cookie__close{
    position: absolute;
    right: 18px;
    top: 18px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.cookie__close:before, .cookie__close:after{
    background: #2c3136;
    position: absolute;
    display: block;
    left: 0;
    top: 50%;
    width: 100%;
    height: 2px;
    content: "";
}

.cookie__close:before{
    transform: rotate(-45deg);
}

.cookie__close:after{
    transform: rotate(45deg);
}

.cookie__title{
    font-weight: 700;
}

.cookie__desc a, .cookie__desc button{
    background: transparent;
    font-weight: 500;
    padding: 0;
    border: 0;
    display: inline;
}

.cookie__desc a:hover, .cookie__desc button:hover{
    text-decoration: underline;
}

* + .cookie__btns{
    margin-top: 20px;
}

.cookie__btns{
    display: flex;
    align-items: center;
}

.cookie__btns:not(.cookie__btns_right){
    justify-content: space-between;
}

.cookie__btns_right{
    justify-content: flex-end;
}

.cookie__btns_grow button{
    flex-grow: 1;
}

/* Форма баннера */
.cookie_block .cookie__banner .cookie__title{
    font-size: 16px;
    line-height: 24px;
    margin-bottom: 12px;
    text-align: center;
}

.cookie_block .cookie__banner .cookie__btns .cookie__btn{
    width: 100%;
}

.cookie__btn{
    min-width: 126px;
    transition: opacity ease-in .2s;
}

.cookie__btn_hide{
    opacity: 0;
    pointer-events: none;
}

.cookie:not(.cookie_block) .cookie__banner .cookie__title{
    font-size: 20px;
    line-height: 26px;
    margin-bottom: 14px;
}

* + .cookie__quote{
    margin-top: 14px;
}

.cookie__quote{
    font-size: 12px;
    line-height: 18px;
    color: #999;
}

.cookie__quote a{
    font-weight: 400;
    text-decoration: underline;
}

.cookie__quote a:hover{
    text-decoration: none;
}

/* Форма настроек */
.cookie__fields{
    list-style: none;
    padding: 0;
    margin: 0;
}

.cookie__field + .cookie__field{
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #efefef;
}

.cookie__heading{
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie__label{
    font-weight: 700;
}

.cookie__label[for]{
    cursor: pointer;
}

.cookie__tag{
    font-size: 14px;
    line-height: 24px;
    border-radius: 4px;
    padding: 0 8px;
    white-space: nowrap;
}

/* Медиа */
@media (min-width: 1024px){
    .cookie__body{
        padding: 24px;
    }

    .cookie:not(.cookie_block) .cookie__banner .cookie__body{
        left: 50%;
        width: 810px;
        margin-left: -405px;
    }

    .cookie_block .cookie__settings .cookie__body{
        top: 50%;
    }

    .cookie__settings .cookie__body{
        width: 810px;
        left: 50%;
        min-height: 600px;
        margin: -300px 0 0 -405px;
    }

    .cookie__settings .cookie__title{
        font-size: 22px;
        line-height: 28px;
        margin-bottom: 22px;
    }

    .cookie__heading + *{
        margin-top: 16px;
    }

    .cookie__label{
        font-size: 18px;
        line-height: 24px;
        margin: 0 15px 0 0;
    }
}

@media (max-width: 1024px){
    .cookie__body{
        padding: 20px;
    }

    .cookie__settings .cookie__body{
		top: 10px;
        left: 1%;
        width: 87%;
        overflow-y: auto;
        height: 90vh;
    }

    .cookie__settings .cookie__title{
        font-size: 20px;
        line-height: 26px;
        margin-bottom: 18px;
    }

    .cookie__heading + *{
        margin-top: 10px;
    }

    .cookie__label{
        font-size: 16px;
        line-height: 22px;
        margin: 0 10px 0 0;
    }

    .cookie__brake_pc{
        display: none;
    }
}

@media (min-width: 768px){
    .cookie__body{
        position: absolute;
        border-radius: 12px;
    }

    .cookie:not(.cookie_block) .cookie__body{
        bottom: 15px;
        box-shadow: 0 0 7px rgba(0, 0, 0, .25);
    }

    .cookie_block .cookie__banner .cookie__body{
        left: 50%;
        top: 50%;
        width: 456px;
        margin: -130px 0 0 -228px;
    }

    .cookie_block .cookie__banner .cookie__desc{
        text-align: justify;
    }
}

@media (max-width: 768px){
    .cookie:not(.cookie_block) .cookie__body{
        box-shadow: 0 0 6px rgba(0, 0, 0, .2);
    }

    .cookie__banner .cookie__body{
        position: fixed;
        border-radius: 12px 12px 0 0;
        left: 0;
        bottom: 0;
        width: 100%;
    }

    .cookie__settings .cookie__body{
        position: absolute;
        border-radius: 12px;
    }
}

@media (min-width: 640px){
    .cookie__btns_grow button{
        max-width: 240px;
    }
}

@media (max-width: 640px){
    .cookie__btns_grow{
        flex-direction: column-reverse;
        align-items: initial;
    }

    .cookie__btns_grow button + button{
        margin-bottom: 8px;
    }
}

@media (min-width: 480px){
    .cookie_block .cookie__banner .cookie__btns > button + button{
        margin-left: 6px;
    }
}

@media (max-width: 480px){
    .cookie:not(.cookie_block) .cookie__banner .cookie__desc{
        text-align: justify;
    }
    
    .cookie__btns{
        flex-direction: column-reverse;
    }

    .cookie__btns > *{
        width: 100%;
    }

    .cookie__btns > button + button{
        margin-bottom: 8px;
    }

    * + .cookie__btns .cookie__right{
        margin-bottom: 9px;
    }

    .cookie__btns .cookie__right{
        display: flex;
    }

    .cookie__btns .cookie__right .cookie__btn{
        flex-grow: 1;
    }

    .cookie__btns .cookie__right .cookie__btn + .cookie__btn{
        margin-left: 8px;
    }
}