/* mod_em_order — форма заявки (новый дизайн). Цвета и скругления меняются переменными ниже. */
.emo {
    --emo-primary: #1D4B73;
    --emo-accent: #B70928;
    --emo-accent-hover: #970720;
    --emo-text: #1B2733;
    --emo-muted: #66758A;
    --emo-border: #C9D3DF;
    --emo-bg: #FFFFFF;
    --emo-field-bg: #FFFFFF;
    --emo-ok: #1B7F4B;
    --emo-radius: 18px;
    --emo-field-radius: 10px;

    position: fixed;
    inset: 0;
    top: 0; right: 0; bottom: 0; left: 0;
    z-index: 100000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 24px 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.4;
    color: var(--emo-text);
    text-align: left;
}
.emo[hidden],
.emo [hidden] { display: none !important; }
.emo *, .emo *::before, .emo *::after { box-sizing: border-box; }
html.emo-lock, html.emo-lock body { overflow: hidden; }

.emo__overlay {
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    background: rgba(13, 30, 48, .62);
    animation: emo-fade .18s ease-out;
}

.emo__dialog {
    position: relative;
    width: 100%;
    max-width: 440px;
    margin: auto;
    padding: 36px 32px 28px;
    background: var(--emo-bg);
    border-radius: var(--emo-radius);
    box-shadow: 0 24px 60px rgba(13, 30, 48, .28);
    outline: none;
    animation: emo-rise .22s ease-out;
}

.emo__close {
    position: absolute;
    top: 12px; right: 12px;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    margin: 0; padding: 0;
    border: 0; border-radius: 50%;
    background: transparent;
    color: var(--emo-muted);
    cursor: pointer;
    transition: background-color .15s, color .15s;
}
.emo__close:hover { background: #EEF2F6; color: var(--emo-text); }

.emo__title {
    margin: 0 28px 6px 0;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--emo-primary);
}
.emo__subtitle { margin: 0 0 4px; font-size: 15px; color: var(--emo-muted); }
.emo__course {
    display: inline-block;
    margin: 6px 0 0;
    padding: 5px 12px;
    border-radius: 999px;
    background: #EAF0F6;
    font-size: 14px;
    font-weight: 600;
    color: var(--emo-primary);
}

.emo__form { margin: 20px 0 0; padding: 0; }
.emo__field { margin: 0 0 14px; }

.emo__label {
    display: block;
    margin: 0 0 6px;
    padding: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--emo-text);
    cursor: pointer;
}
.emo__optional { font-weight: 400; color: var(--emo-muted); }

.emo .emo__input {
    display: block;
    width: 100%;
    height: 50px;
    margin: 0;
    padding: 0 14px;
    border: 1.5px solid var(--emo-border);
    border-radius: var(--emo-field-radius);
    background: var(--emo-field-bg);
    box-shadow: none;
    font: inherit;
    font-size: 16px;      /* не меньше 16px, иначе iOS увеличивает страницу при фокусе */
    line-height: 1.2;
    color: var(--emo-text);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color .15s, box-shadow .15s;
}
.emo .emo__input::placeholder { color: #9AA7B6; opacity: 1; }
.emo .emo__input:hover { border-color: #9FB0C3; }
.emo .emo__input:focus {
    border-color: var(--emo-primary);
    box-shadow: 0 0 0 3px rgba(29, 75, 115, .16);
}
.emo__field--error .emo__input,
.emo__field--error .emo__input:hover { border-color: var(--emo-accent); background: #FFF6F7; }
.emo__field--error .emo__input:focus { box-shadow: 0 0 0 3px rgba(183, 9, 40, .14); }
.emo__field--ok .emo__input { border-color: var(--emo-ok); }

.emo__msg { font-size: 13px; line-height: 1.35; color: var(--emo-accent); }
.emo__msg:empty { display: none; }
.emo__field .emo__msg { margin: 6px 0 0; }
.emo__field--ok .emo__msg { color: var(--emo-ok); }
.emo__field--hint .emo__msg { color: var(--emo-muted); }
.emo__msg--form { margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; background: #FFF1F3; }

.emo__fix {
    display: inline;
    margin: 0; padding: 0;
    border: 0; background: none;
    font: inherit;
    color: var(--emo-primary);
    text-decoration: underline;
    cursor: pointer;
}

.emo__check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 2px 0 16px;
    padding: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    color: var(--emo-text);
    cursor: pointer;
}
.emo__check--small { margin: 8px 0 0; font-size: 13px; color: var(--emo-muted); }
.emo .emo__check input {
    flex: 0 0 auto;
    width: 20px; height: 20px;
    margin: 0;
    accent-color: var(--emo-primary);
    cursor: pointer;
}

/* поле-ловушка для роботов */
.emo__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.emo__captcha--checkbox { margin: 0 0 14px; min-height: 100px; }

.emo .emo__submit {
    display: block;
    width: 100%;
    min-height: 54px;
    margin: 0;
    padding: 12px 20px;
    border: 0;
    border-radius: var(--emo-field-radius);
    background: var(--emo-accent);
    box-shadow: none;
    font: inherit;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    text-align: center;
    text-transform: none;
    cursor: pointer;
    transition: background-color .15s, transform .05s;
}
.emo .emo__submit, .emo__close { -webkit-tap-highlight-color: transparent; }
.emo .emo__submit:hover { background: var(--emo-accent-hover); }
.emo .emo__submit:active { transform: translateY(1px); }
.emo .emo__submit:disabled { background: #C7949D; cursor: default; }
.emo .emo__submit--ghost {
    background: transparent;
    border: 1.5px solid var(--emo-border);
    color: var(--emo-primary);
}
.emo .emo__submit--ghost:hover { background: #F3F6F9; }

.emo__close:focus-visible,
.emo__submit:focus-visible,
.emo__fix:focus-visible,
.emo__check input:focus-visible { outline: 3px solid rgba(29, 75, 115, .45); outline-offset: 2px; }

.emo__note { margin: 12px 0 0; font-size: 12px; line-height: 1.4; color: var(--emo-muted); text-align: center; }
.emo__note p { margin: 0; }
.emo__note a { color: var(--emo-primary); text-decoration: underline; }

.emo__success { text-align: center; padding: 12px 0 4px; outline: none; }
.emo__success-icon { display: block; margin: 0 auto 16px; color: var(--emo-ok); }
.emo__success .emo__title { margin: 0 0 10px; }
.emo__success-text { margin: 0 0 24px; font-size: 16px; color: var(--emo-text); }
.emo__success-text p { margin: 0 0 8px; }
.emo__success-text a { color: var(--emo-primary); text-decoration: underline; }

@keyframes emo-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes emo-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (max-width: 520px) {
    .emo { padding: 12px 10px; }
    .emo__dialog { padding: 28px 18px 20px; border-radius: 16px; }
    .emo__title { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
    .emo__overlay, .emo__dialog { animation: none; }
    .emo .emo__input, .emo .emo__submit, .emo__close { transition: none; }
}
