/* =========================================================================
   order-modal.css — единый попап-стиль cloud-promo для форм классического veso.ru
   Автономный: копирует значения из cloud-promo-v2-popups.css / cloud-leaf.css,
   скоуплен под .cp-leaf-modal / .cp2-order / .cp2-success (этих классов на
   классических страницах нет — коллизий со style.css не будет).
   !important стоит там, где старый style.css перебивает базовые правила модалки.
   ========================================================================= */

/* ---- Кнопки ---- */
.cp-leaf-modal .cp2-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 14px 28px; border-radius: 8px; font-size: 15px; font-weight: 600;
    text-decoration: none; transition: all 0.2s; cursor: pointer;
    border: 2px solid transparent; white-space: nowrap; width: auto;
    font-family: inherit; line-height: 1.1;
}
.cp-leaf-modal .cp2-btn--primary { background: #0093C9; color: #fff; border-color: #0093C9; }
.cp-leaf-modal .cp2-btn--primary:hover { background: #0083b3; color: #fff; }
.cp-leaf-modal .cp2-btn--primary[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; pointer-events: none; }

/* ---- Оболочка модалки ---- */
.cp-leaf-modal .modal-dialog { max-width: 500px; }
.cp-leaf-modal .modal-content.cp2-order,
.cp-leaf-modal .modal-content.cp2-success {
    border: none !important; border-radius: 18px; overflow: hidden;
    background: #fff !important; box-shadow: 0 24px 70px rgba(0,0,0,0.28);
}

/* ---- Шапка попапа ---- */
.cp-leaf-modal .cp2-order__header {
    border: none !important; padding: 24px 28px 0 !important;
    align-items: flex-start; display: flex; justify-content: space-between;
}
.cp-leaf-modal .cp2-order__title {
    font-size: 24px !important; font-weight: 800; color: #0d1418;
    margin: 0 0 4px !important; padding: 0 !important; line-height: 1.2;
}
.cp-leaf-modal .cp2-order__sub { font-size: 14px !important; color: #9aa3a9; padding: 0 !important; display: block; }
.cp-leaf-modal .cp2-order .modal-body { padding: 18px 28px 26px !important; }
.cp-leaf-modal .cp2-order__header .close {
    font-size: 28px; color: #b0b8bd; opacity: 1; text-shadow: none;
    transition: color 0.2s; margin: 0; padding: 0; background: none; border: none;
    line-height: 1; cursor: pointer; flex: 0 0 auto;
}
.cp-leaf-modal .cp2-order__header .close:hover { color: #0093C9; }

/* ---- Поля ---- */
.cp-leaf-modal .cp2-order__input,
.cp-leaf-modal .cp2-order__select {
    width: 100%; padding: 14px 16px !important; margin-bottom: 12px;
    border: 1.5px solid #e3e9ed !important; border-radius: 10px !important;
    font-size: 16px !important; color: #0d1418; background: #fff;
    transition: border-color 0.2s; outline: none; box-shadow: none !important;
    font-family: inherit; height: auto;
}
.cp-leaf-modal .cp2-order__input:focus,
.cp-leaf-modal .cp2-order__select:focus { border-color: #0093C9 !important; }
.cp-leaf-modal .cp2-order__input::placeholder { color: #b0b8bd; opacity: 1; }
.cp-leaf-modal textarea.cp2-order__input { resize: vertical; min-height: 64px; }

.cp-leaf-modal .cp2-order__select {
    -webkit-appearance: none; appearance: none; cursor: pointer; font-weight: 600;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%230093C9' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 16px center; padding-right: 44px !important;
}

.cp-leaf-modal .cp2-order__label {
    display: block; font-size: 13px !important; font-weight: 700; color: #5a6469;
    text-transform: uppercase; letter-spacing: 0.5px; margin: 8px 0 10px;
}

/* ---- Красная звёздочка обязательного поля (поверх инпута справа) ---- */
.cp-leaf-modal .cp2-req-wrap { position: relative; }
.cp-leaf-modal .cp2-req-wrap .cp2-order__input { margin-bottom: 0; }
.cp-leaf-modal .cp2-req-star {
    position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
    color: #D93740; font-weight: 900; pointer-events: none; font-size: 16px;
}

/* ---- Подсказки / примечания ---- */
.cp-leaf-modal .cp2-order__hint { margin: 6px 0 12px; font-size: 12.5px; color: #9aa3ad; line-height: 1.4; }
.cp-leaf-modal .cp2-order__legal { margin: 0 0 4px; font-size: 12.5px; color: #9aa3ad; }
.cp-leaf-modal .cp2-order__req-note { margin: 0 0 4px; font-size: 12.5px; color: #9aa3ad; line-height: 1.4; }
.cp-leaf-modal .cp2-req-note-star { color: #D93740; font-weight: 900; }

/* ---- Кнопка отправки ---- */
.cp-leaf-modal .cp2-order__submit { width: 100%; padding: 15px !important; font-size: 16px; margin: 18px 0 14px !important; }

/* ---- Чекбокс согласия ---- */
.cp-leaf-modal .cp2-order__politic {
    display: flex !important; gap: 8px !important; align-items: flex-start !important;
    font-size: 13px !important; color: #8a949b; line-height: 1.45 !important; margin-top: 14px !important;
}
.cp-leaf-modal .cp2-order__politic input[type="checkbox"] {
    position: static !important; top: auto; left: auto;
    width: 16px !important; min-width: 16px; height: 16px !important; max-width: 16px;
    margin: 2px 0 0 0 !important; flex: 0 0 16px;
    -webkit-appearance: auto !important; appearance: auto !important; opacity: 1 !important;
    accent-color: #0093C9;
}
.cp-leaf-modal .cp2-order__politic label {
    font-size: 13px !important; font-weight: 400 !important; color: #8a949b !important;
    margin: 0 !important; padding: 0 !important; cursor: pointer; line-height: 1.45;
}
.cp-leaf-modal .cp2-order__politic a,
.cp-leaf-modal .cp2-politic-link { color: #0093C9 !important; font-weight: 600 !important; text-decoration: underline; }

/* ---- Быстрый Telegram-блок под формой ---- */
.cp-leaf-modal .popup-messanger-block { margin-top: 18px; padding-top: 16px; border-top: 1px solid #eef2f4; }
.cp-leaf-modal .popup-messanger-block p { margin: 0; font-size: 13.5px; color: #8a949b; text-align: center; }
.cp-leaf-modal .popup-tg-actions { display: flex; justify-content: center; margin-top: 12px; }
.cp-leaf-modal .cp-btn--tg {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: #f1f7fb; color: #0083b3 !important; border: 1px solid #d7e8f0; box-shadow: none;
    min-height: 44px; padding: 10px 18px; font-size: 13px; font-weight: 600;
    border-radius: 10px; text-decoration: none; transition: background .2s, color .2s;
}
.cp-leaf-modal .cp-btn--tg:hover { background: #e7f3f9; color: #00729d !important; text-decoration: none; }
.cp-leaf-modal .cp-btn--tg svg { width: 17px; height: 17px; flex: 0 0 auto; }

/* ---- Встроенный блок «успех» (используется формой скачивания ls-order) ---- */
.cp-leaf-modal .cp2-order .success { display: none; }
.cp-leaf-modal .cp2-order .success.active,
.cp-leaf-modal .cp2-order .success[style*="block"] {
    background: #eaf6fb; border-radius: 12px; padding: 18px 20px; margin-bottom: 14px;
    color: #0d1418; font-size: 14.5px; line-height: 1.5; text-align: center;
}
.cp-leaf-modal .cp2-order .success a { color: #0093C9; font-weight: 700; }

/* ---- Заголовок-подсказка внутри формы (ls-order) ---- */
.cp-leaf-modal .cp2-order__formhead { font-size: 15px; color: #5a6469; margin: -6px 0 14px; line-height: 1.4; }

/* ---- Капча ---- */
.cp-leaf-modal .smart-captcha { margin: 4px 0 6px; }

/* ---- Попап «Спасибо» ---- */
.cp-leaf-modal .cp2-success__body {
    padding: 48px 32px; text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.cp-leaf-modal .cp2-success__icon {
    width: 80px; height: 80px; border-radius: 50%;
    background: #eaf6fb; display: flex; align-items: center; justify-content: center;
    animation: cp2-success-pop 0.5s cubic-bezier(.2,.7,.3,1);
}
@keyframes cp2-success-pop {
    0%   { transform: scale(0); opacity: 0; }
    60%  { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}
.cp-leaf-modal .cp2-success__title { font-size: 22px; font-weight: 800; color: #0d1418; margin: 0; }
.cp-leaf-modal .cp2-success__text { font-size: 16px; color: #6a747a; margin: 0; line-height: 1.5; }
.cp-leaf-modal .cp2-success__btn { width: 100%; margin-top: 8px; }

/* ---- Встроенная форма-секция (не попап): tpl/trial.php «Пробное сканирование» ----
   Обёртка .cp-leaf-modal даёт полям тот же стиль, что и в попапе (без модального
   поведения); .cp-form-inline оформляет её как белую карточку на цветной секции. */
.cp-form-inline {
    background: #fff;
    border-radius: 16px;
    padding: 28px 28px 24px;
    box-shadow: 0 18px 50px rgba(0,0,0,0.14);
}
.cp-form-inline__head {
    font-size: 22px; font-weight: 800; color: #0d1418;
    margin: 0 0 18px; line-height: 1.2;
}
.cp-form-inline .cp2-order__submit { margin: 18px 0 12px; }
.cp-form-inline .success a { color: #0093C9; font-weight: 700; }

/* Exit-попап bioEp: контейнерные оверрайды (#bio_ep, карточка) инжектит сам
   js/veso-bioep-init.js — чтобы попап был одинаков и на страницах без order-modal.css. */

/* ---- Телефон ---- */
@media (max-width: 575px) {
    .cp-leaf-modal .cp2-order__header { padding: 20px 20px 0 !important; }
    .cp-leaf-modal .cp2-order .modal-body { padding: 16px 20px 22px !important; }
    .cp-leaf-modal .cp2-order__title { font-size: 21px !important; }
}
