.form-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.form-modal.active {
    display: block;
}

/* overlay на весь экран */
.form-modal_overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

/* центрируем через flex */
.form-modal_content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    width: 100%;
    max-width: 640px;

    background: #fff;
    padding: 64px;
    border-radius: 30px;
    z-index: 2;
}

@media (max-width: 600px) {
    .form-modal_content {
        padding: 30px;
        width: 96%;
    }
}
/* крестик */
.form-modal_close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    cursor: pointer;
}

.form-modal_close::before,
.form-modal_close::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 2px;
    background: #333;
    transform-origin: center;
}

.form-modal_close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.form-modal_close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* ошибки */
.form-error {
    display: block;
    font-size: 12px !important;
    color: red !important;
    margin-top: 4px;
}

input.error {
    border: 1px solid red;
}