/* Стили для подложки */

.overlay {

    /* Скрываем подложку  */
    opacity: 0;
    visibility: hidden;

    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, .5);
    z-index: 99999;
    transition: .3s all;
}


/* Стили для модальных окон */

.modal {

    /* Скрываем окна  */
    opacity: 0;
    visibility: hidden;


    /*  Установаем ширину окна  */
    width: 100%;
    max-width: 545px;

    /*  Центрируем и задаем z-index */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999999;

    /*  Побочные стили   */
    transition: 0.3s all;

    background: #FFFFFF;
    border: 1px solid #F2F3F5;
    box-shadow: 0px 4px 16px rgba(17, 17, 26, 0.05), 0px 8px 32px rgba(17, 17, 26, 0.05);
    border-radius: 5px;

    padding: 32px;

    overflow: scroll;
    max-height: 100%;

    display: block;
}

/* Стили для кнопки закрытия */

.modal__cross {
    width: 15px;
    height: 15px;
    position: absolute;
    top: 20px;
    right: 20px;
    fill: #A0A4BA;
    cursor: pointer;
    transition-duration: .3s;
}

.modal__cross:hover{
    fill: #333333;
}

.modal.active,
.overlay.active{
    opacity: 1;
    visibility: visible;
}

.modal__title{
    font-weight: 600;
    font-size: 24px;
    line-height: 29px;
    display: flex;
    align-items: center;
    text-align: center;
    color: #292D32;
    justify-content: center;
}