/* ============================================================
   RUNO — forms-modal.css
   Модальное окно результата отправки AJAX-форм (.js-runo-help-form).
   Разметка окна создаётся из js/forms.js (singleton).
   JS-хуки — только js-классы; здесь — стилевые классы (без js-).
   Палитра сайта: accent #e84c3d, ink #171b20, шрифт Onest.
   ============================================================ */

.runo-form-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(21, 23, 27, .55);
    font-family: Onest, "Onest Variable", Arial, sans-serif;
    box-sizing: border-box;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    animation: runo-form-modal-fade .18s ease;
}

.runo-form-modal[hidden] {
    display: none;
}

.runo-form-modal__dialog {
    position: relative;
    box-sizing: border-box;
    width: min(420px, 100%);
    max-height: calc(100dvh - 40px);
    overflow: auto;
    padding: 36px 30px 30px;
    border-radius: 22px;
    background: #fff;
    color: #171b20;
    text-align: center;
    box-shadow: 0 24px 80px rgba(24, 38, 50, .24);
    animation: runo-form-modal-pop .2s ease;
}

.runo-form-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f2f4f5;
    color: #4c5964;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.runo-form-modal__close:hover {
    background: #e7eaec;
    color: #171b20;
}

.runo-form-modal__close:focus-visible {
    outline: 3px solid #2469a5;
    outline-offset: 2px;
}

.runo-form-modal__icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 18px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 30px;
    line-height: 1;
    font-weight: 700;
}

.runo-form-modal.is-success .runo-form-modal__icon {
    background: #e8f5ec;
    color: #2f8a4c;
}

.runo-form-modal.is-success .runo-form-modal__icon::before {
    content: "\2713";
}

.runo-form-modal.is-error .runo-form-modal__icon {
    background: #fdecea;
    color: #c0392b;
}

.runo-form-modal.is-error .runo-form-modal__icon::before {
    content: "!";
}

.runo-form-modal__title {
    margin: 0 0 8px;
    font-family: Unbounded, Onest, Arial, sans-serif;
    font-size: 19px;
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: -.02em;
    color: #171b20;
}

.runo-form-modal.is-success .runo-form-modal__title {
    color: #2f8a4c;
}

.runo-form-modal.is-error .runo-form-modal__title {
    color: #c0392b;
}

.runo-form-modal__text {
    margin: 0;
    font-size: 15px;
    line-height: 1.45;
    color: #5f6870;
}

@keyframes runo-form-modal-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes runo-form-modal-pop {
    from { opacity: 0; transform: translateY(12px) scale(.98); }
    to { opacity: 1; transform: none; }
}

@media (max-width: 520px) {
    .runo-form-modal {
        padding: 14px;
    }
    .runo-form-modal__dialog {
        padding: 32px 22px 24px;
        border-radius: 18px;
    }
    .runo-form-modal__title {
        font-size: 17px;
    }
    .runo-form-modal__text {
        font-size: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .runo-form-modal,
    .runo-form-modal__dialog {
        animation: none;
    }
}
