.modal {
    pointer-events: none;
    opacity: 0;
    transition: .2s linear opacity;
    position: fixed;
    z-index: 101;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(31, 31, 32, 0.649);
    display: flex;
    padding: 32px 0;
}

.modal-content {
    background-color: var(--white);
    margin: auto;
    padding: 24px 15px;
    width: 100%;
    max-width: 500px;
}

.modal-content h3 {
    font-size: 20px;
    margin: 0;
}

.modal_opened,
.modal_opened body,
.modal_opened_unhidable,
.modal_opened_unhidable body {
    overflow: hidden;
}

.modal.opened {
    opacity: 1;
    pointer-events: all;
}

.modal_header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.modal .close {
    width: 20px;
    height: 20px;
    cursor: pointer;
    position: relative;
    display: inline-block;
}

.modal .close::before,
.modal .close::after {
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    margin: auto;
    content: "";
    position: absolute;
    width: 2px;
    height: 16px;
    border-radius: 3px;
    background-color: var(--lightgray);
    transition: 0.3s;
}

.modal .close::before {
    transform: rotate(45deg);
}

.modal .close::after {
    transform: rotate(-45deg);
}

.modal .close:hover::before,
.modal .close:hover::after {
    background-color: var(--secondary);
}

@media (min-width: 500px) {
    .modal-content {
        border-radius: var(--radius);
        padding: 32px 24px;
    }
    .modal-content h3 {
        font-size: 25px;
    }
}

@media (min-width: 768px) {
    .modal-content {
        border-radius: var(--radius);
        padding: 40px 32px;
        box-sizing: content-box;
    }
}
