/* SERP Expert 2.0.54 — формы заявок: всплывающие окна, состояния отправки, ошибки полей. */

/* ---------- Всплывающее окно ---------- */
.popup.se-lf-popup { background: rgba(7, 28, 49, .62); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.popup.se-lf-popup .popup__body { padding: 40px 16px; }

.popup__content.se-lf-modal {
    max-width: 560px;
    display: block;
    gap: 0;
    padding: 38px 38px 0;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 32px 90px rgba(7, 28, 49, .38);
    color: #071c31;
    font-family: var(--font-text, "Manrope", system-ui, sans-serif);
    text-align: left;
    overflow: hidden;
    opacity: 0;
    transform: translateY(18px) scale(.98);
    transition: transform .28s cubic-bezier(.2, .8, .2, 1), opacity .22s ease;
}
.popup.open .popup__content.se-lf-modal { opacity: 1; transform: none; }

.se-lf-modal__close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 3;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f2f4f7;
    color: #071c31;
    cursor: pointer;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}
.se-lf-modal__close:hover, .se-lf-modal__close:focus-visible { background: var(--se-red, #cb0000); color: #fff; transform: rotate(90deg); }
.se-lf-modal__close .se-lf-ico { width: 18px; height: 18px; pointer-events: none; }

.se-lf-modal__head { padding-right: 44px; }
.se-lf-modal__head::before { content: ""; display: block; width: 44px; height: 3px; margin-bottom: 18px; border-radius: 2px; background: var(--se-red, #cb0000); }
.se-lf-modal .popup__title.se-lf-modal__title {
    margin: 0;
    font-family: var(--font-heading, "Raleway", "Manrope", sans-serif);
    font-size: 30px;
    line-height: 36px;
    font-weight: 800;
    color: #071c31;
    text-align: left;
    letter-spacing: -.01em;
}
.se-lf-modal__text { margin: 10px 0 24px; color: #56636f; font-size: 15px; line-height: 23px; }

.se-lf-modal__hours {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 24px -38px 0;
    padding: 15px 38px;
    border-top: 1px solid #edf0f3;
    background: #f7f9fb;
    color: #56636f;
    font-size: 13px;
    line-height: 18px;
}
.se-lf-modal__hours .se-lf-ico { flex: 0 0 18px; width: 18px; height: 18px; color: var(--se-red, #cb0000); }

/* ---------- Поля ---------- */
.se-lf { margin: 0; }
.se-lf__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.se-lf-field { position: relative; display: block; margin: 0; }
.se-lf-field.is-wide, .se-lf-field--message { grid-column: 1 / -1; }
.se-lf-field > .se-lf-ico { position: absolute; z-index: 1; left: 16px; top: 17px; width: 18px; height: 18px; color: #7b8794; pointer-events: none; transition: color .18s ease; }
.se-lf-field input, .se-lf-field textarea {
    display: block;
    width: 100%;
    height: 52px;
    margin: 0;
    padding: 0 16px 0 46px;
    border: 1px solid #dde3ea;
    border-radius: 14px;
    background: #f7f9fb;
    color: #071c31;
    font: 400 15px/20px var(--font-text, "Manrope", sans-serif);
    outline: none;
    box-shadow: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
    -webkit-appearance: none;
    appearance: none;
}
.se-lf-field textarea { height: 104px; min-height: 80px; max-height: 260px; padding-top: 15px; padding-bottom: 12px; resize: vertical; }
.se-lf-field input::placeholder, .se-lf-field textarea::placeholder { color: #7b8794; opacity: 1; }
.se-lf-field input:hover, .se-lf-field textarea:hover { border-color: #c9d2dc; }
.se-lf-field input:focus, .se-lf-field textarea:focus { border-color: rgba(203, 0, 0, .55); background: #fff; box-shadow: 0 0 0 4px rgba(203, 0, 0, .08); }
.se-lf-field:focus-within > .se-lf-ico { color: var(--se-red, #cb0000); }

.se-lf__submit {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    height: 56px;
    margin: 18px 0 0;
    padding: 0 24px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(180deg, #e01a1a 0%, #c50808 55%, #b40606 100%);
    box-shadow: 0 12px 26px rgba(203, 0, 0, .26), inset 0 1px 0 rgba(255, 255, 255, .18);
    color: #fff;
    font: 700 16px/1 var(--font-text, "Manrope", sans-serif);
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.se-lf__submit .se-lf-ico { width: 18px; height: 18px; stroke-width: 2.2; transition: transform .18s ease; }
.se-lf__submit:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 16px 32px rgba(203, 0, 0, .34), inset 0 1px 0 rgba(255, 255, 255, .2); }
.se-lf__submit:hover .se-lf-ico { transform: translateX(3px); }
.se-lf__submit:focus-visible { outline: 3px solid rgba(203, 0, 0, .35); outline-offset: 3px; }

.se-lf__note { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0 0; color: #6b7682; font-size: 12px; line-height: 18px; }
.se-lf__note .se-lf-ico { flex: 0 0 16px; width: 16px; height: 16px; margin-top: 1px; color: #8a96a3; }
.se-lf__note a { color: #071c31; text-decoration: underline; text-underline-offset: 2px; }
.se-lf__note a:hover { color: var(--se-red, #cb0000); }

/* ---------- Ошибки полей (все формы заявок) ---------- */
.se-protected-form .se-invalid,
.se-protected-form .se-invalid:focus { border-color: #e5484d !important; box-shadow: 0 0 0 3px rgba(229, 72, 77, .16) !important; }
.se-protected-form .se-ferr {
    position: absolute;
    z-index: 3;
    top: 50%;
    right: 10px;
    max-width: 62%;
    margin: 0;
    padding: 3px 9px;
    border-radius: 7px;
    background: #fff1f0;
    box-shadow: 0 0 0 1px #f7c9c4;
    color: #c4271b;
    font-size: 12px;
    line-height: 16px;
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
    transform: translateY(-50%);
    animation: se-ferr-in .18s ease;
}
@keyframes se-ferr-in { from { opacity: 0; } to { opacity: 1; } }

.se-protected-form .se-form-msg {
    grid-column: 1 / -1;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    margin: 14px 0 0;
    padding: 12px 14px;
    border: 1px solid #f5c6c1;
    border-radius: 12px;
    background: #fff4f3;
    color: #8f1d14;
    font-size: 13.5px;
    line-height: 20px;
    text-align: left;
}
.se-protected-form .se-form-msg[hidden] { display: none; }
.se-protected-form .se-form-msg svg { flex: 0 0 20px; width: 20px; height: 20px; color: #d92d20; }
.se-protected-form .se-form-msg b { font-weight: 700; }
.se-form-msg__alt { display: block; margin-top: 3px; color: #6b2a24; }
.se-form-msg__alt a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Отправка ---------- */
.se-protected-form [type="submit"].is-loading { position: relative; color: transparent !important; pointer-events: none; }
.se-protected-form [type="submit"].is-loading > * { visibility: hidden; }
.se-protected-form [type="submit"].is-loading::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 22px;
    height: 22px;
    margin: -11px 0 0 -11px;
    border: 2.5px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: se-spin .7s linear infinite;
}
@keyframes se-spin { to { transform: rotate(360deg); } }

/* ---------- Заявка отправлена ---------- */
.se-form-host { position: relative; }
.se-form-done {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #071c31;
    font-family: var(--font-text, "Manrope", sans-serif);
    animation: se-done-in .3s ease;
}
.se-form-done:not(.se-form-done--modal) {
    position: absolute;
    inset: 0;
    z-index: 6;
    min-height: 100%;
    padding: 24px;
    background: #fff;
    border-radius: 16px;
}
.se-form-done--modal { padding: 26px 0 40px; }
.se-lf-modal.se-is-done > :not(.se-form-done):not(.se-lf-modal__close),
.popup__content.se-is-done > :not(.se-form-done):not(.close-popup) { display: none !important; }
.se-form-done__icon { width: 68px; height: 68px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 50%; background: #e8f7ee; color: #14995a; box-shadow: 0 0 0 10px #f3fbf6; }
.se-form-done__icon svg { width: 32px; height: 32px; }
.se-form-done__title { margin: 0; font-family: var(--font-heading, "Raleway", sans-serif); font-size: 26px; line-height: 32px; font-weight: 800; color: #071c31; }
.se-form-done__text { max-width: 400px; margin: 10px auto 0; color: #56636f; font-size: 15px; line-height: 23px; }
.se-form-done__alt { margin: 8px 0 0; color: #6b7682; font-size: 13.5px; line-height: 20px; }
.se-form-done__alt a { color: #071c31; font-weight: 700; text-decoration: none; white-space: nowrap; }
.se-form-done__alt a:hover { color: var(--se-red, #cb0000); }
.se-form-done__btn { min-height: 46px; margin-top: 22px; padding: 0 26px; border: 1px solid #d5dce4; border-radius: 999px; background: #fff; color: #071c31; font: 600 15px/1 var(--font-text, "Manrope", sans-serif); cursor: pointer; transition: border-color .18s ease, color .18s ease; }
.se-form-done__btn:hover, .se-form-done__btn:focus-visible { border-color: var(--se-red, #cb0000); color: var(--se-red, #cb0000); }
@keyframes se-done-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Сообщение после обычной отправки ---------- */
.se-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 10050;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: min(400px, calc(100vw - 32px));
    padding: 16px 44px 16px 16px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 20px 50px rgba(7, 28, 49, .22);
    border-left: 4px solid #14995a;
    color: #071c31;
    font-family: var(--font-text, "Manrope", sans-serif);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .25s ease, transform .25s ease;
}
.se-toast.is-on { opacity: 1; transform: none; }
.se-toast--err { border-left-color: #d92d20; }
.se-toast > svg { flex: 0 0 24px; width: 24px; height: 24px; color: #14995a; }
.se-toast--err > svg { color: #d92d20; }
.se-toast b { display: block; font-size: 15px; line-height: 20px; }
.se-toast span { display: block; margin-top: 3px; color: #56636f; font-size: 13.5px; line-height: 20px; }
.se-toast button { position: absolute; top: 8px; right: 10px; width: 30px; height: 30px; border: 0; background: none; color: #7b8794; font-size: 22px; line-height: 1; cursor: pointer; }

@media (max-width: 640px) {
    .popup.se-lf-popup .popup__body { padding: 16px 10px; align-items: flex-end; }
    .popup__content.se-lf-modal { padding: 28px 20px 0; border-radius: 22px; }
    .se-lf-modal__close { top: 12px; right: 12px; }
    .se-lf-modal .popup__title.se-lf-modal__title { font-size: 24px; line-height: 30px; }
    .se-lf-modal__text { margin-bottom: 18px; font-size: 14px; line-height: 21px; }
    .se-lf__grid { grid-template-columns: 1fr; gap: 10px; }
    .se-lf-modal__hours { margin: 20px -20px 0; padding: 13px 20px; }
    .se-toast { right: 16px; bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .popup__content.se-lf-modal, .se-form-done, .se-toast, .se-protected-form .se-ferr { transition: none; animation: none; }
}
