/* Убираем флажок */
.modal__input {
    display: none;
}

.modal__head {
    display: flex;
    padding-bottom: 14px;
    border-bottom: 1px solid #000000;
    margin-bottom: 14px;
    justify-content: space-between;
}

.modal__footer {
    display: flex;
    padding-top: 14px;
    border-top: 1px solid #000000;
    margin-top: 14px;
    justify-content: flex-end;
}

.modal__content {
    display: flex;
}

.modal__title {
    display: flex;
    font-size: 20px;
    font-weight: bold;
    flex-grow: 1;
    justify-content: center;
    padding-right: 4px;
}

.modal__close-in-button {
    display: flex;
    cursor: pointer;
    background: #c4c9ce;
    padding: 10px 30px;
    border-radius: 4px;
    transition: 0.6s;
}

.modal__close-in-button:hover {
    background: #93a4b5;
}

/* Кнопка для открытия */
.modal__label-button {
    display: inline-flex;
    margin: 10px;
    text-decoration: none;
    position: relative;
    font-size: 20px;
    line-height: 20px;
    padding: 12px 30px;
    color: #FFF;
    font-weight: bold;
    text-transform: uppercase;
    background: #e05817;
    cursor: pointer;
    border: 2px solid #ef602e;
    overflow: hidden;
    z-index: 1;
}

.modal__label-button:hover,
.modal__label-button:active,
.modal__label-button:focus {
    color: #FFF;
}

.modal__label-button:before {
    content: '';
    position: absolute;
    top: 0;
    right: -50px;
    bottom: 0;
    left: 0;
    border-right: 50px solid transparent;
    border-top: 50px solid #b34612;
    transition: transform 0.5s;
    transform: translateX(-100%);
    z-index: -1;
}

.modal__label-button:hover:before,
.modal__label-button:active:before,
.modal__label-button:focus:before {
    transform: translateX(0);
}

/* Контейнер, который затемняет страницу */
.modal__input+.modal__body {
    display: none;
}

.modal__input:checked+.modal__body {
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    animation: bg 0.5s ease;
    background: rgb(95 95 95 / 70%);
}

_:-ms-fullscreen,
:root .modal__input:checked+.modal__body .modal__body {
    box-shadow: 4px 4px 20px rgba(0, 0, 0, 0.8), 0px 16px 20px rgba(0, 0, 0, 0.8);
}

/* Модальное окно */
.modal__input:checked+.modal__body .modal__body {
    font-size: 16px;
    padding: 20px;
    width: 80%;
    max-width: 600px;
    max-height: 80%;
    transition: 0.5s;
    border: 1px solid #bdbdbd;
    border-radius: 12px;
    background: #FFF;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), 0 16px 20px rgba(0, 0, 0, 0.2);
    text-align: center;
    overflow: auto;
    animation: scale 0.5s ease;
}

/* Кнопка с крестиком закрывающая окно */
.modal__close {
    width: 30px;
    height: 30px;
    border: 2px solid #cccccc;
    border-radius: 12px;
    position: absolute;
    z-index: 10;
    top: 20px;
    right: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), 0 16px 20px rgba(0, 0, 0, 0.2);
    background-color: #FFF;
    background-size: cover;
    animation: move 0.5s ease;
    cursor: pointer;
    padding: 2px;
}

.modal__close-in {
    display: flex;
    width: 14px;
    height: 14px;
    border: 2px solid #cccccc;
    border-radius: 12px;
    background-color: #c4c9ce;
    background-size: cover;
    animation: move 0.5s ease;
    cursor: pointer;
    padding: 2px;
}

.modal__close-in img {
    display: block;
    width: 100%;
    height: 100%;
}

/* Анимации */
@keyframes scale {
    0% {
        transform: scale(0);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes move {
    0% {
        right: -80px;
    }

    100% {
        right: 20px;
    }
}

@keyframes bg {
    0% {
        background: rgba(51, 122, 183, 0);
    }

    100% {
        background: rgb(95 95 95 / 70%);
    }
}

@media (max-width: 992px) {
    .modal__footer {
        justify-content: center;
    }

    .modal__close-in-button {
        width: 60%;
        justify-content: center;
    }
}