.modal-form {
    position: fixed;
    inset: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}

.modal-form[aria-hidden="false"] {
    pointer-events: all;
    opacity: 1;
}

.modal-form__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.modal-form__box {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    width: calc(100% - 32px);
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-form__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.modal-form__close:hover {
    color: var(--text-main);
}

.modal-form__title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 12px;
    padding-right: 32px;
}

.modal-form__text {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 24px;
}

body.modal-open {
    overflow: hidden;
}

@media (max-width: 540px) {
    .modal-form {
        align-items: flex-end;
    }

    .modal-form__box {
        border-radius: 16px 16px 0 0;
        padding: 28px 20px 36px;
        max-height: 92vh;
    }
}
