/* INVENTO — форма заявки, телефон с выбором страны (PhoneField), экран «заявка принята», модальное окно (page-assets/global/request-modal). */

.lead-form { display: grid; gap: 16px; }

/* ── Телефон: разметку строит assets/js/phone/phone-input.js (PhoneField), здесь — только вид.
      Без JS в .phone-field остаётся обычное поле .input ── */
.phone-field { position: relative; }
.modern-phone-field { position: relative; }
[data-tone="ink"] .modern-phone-field { color-scheme: dark; }
.phone-input-container { display: flex; align-items: stretch; min-height: 54px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--field); transition: border-color var(--dur), box-shadow var(--dur); }
.phone-input-container:focus-within { border-color: var(--sun); box-shadow: 0 0 0 4px rgb(244 205 84 / .28); }
.field.is-invalid .phone-input-container { border-color: var(--err); }
.country-button { display: flex; align-items: center; gap: 8px; flex: none; padding: 0 12px 0 14px; border-right: 1.5px solid var(--line); border-radius: 13px 0 0 13px; font: 800 15px/1 var(--font-body); font-variant-numeric: tabular-nums; white-space: nowrap; transition: background-color var(--dur); }
.country-button:hover, .country-button.active { background: color-mix(in srgb, var(--fg) 7%, transparent); }
.country-button:focus-visible { outline-offset: -3px; border-radius: 13px 0 0 13px; }
.modern-phone-field .flag { font-size: 18px; line-height: 1; }
.country-button .arrow { width: 12px; height: 12px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: rotate .3s var(--ease-out); }
.country-button.active .arrow { rotate: 180deg; }
.phone-input { flex: 1; min-width: 0; width: 0; padding: 0 16px; border: 0; background: transparent; color: var(--fg); font: 600 16px/1 var(--font-body); font-variant-numeric: tabular-nums; }
.phone-input:focus { outline: none; }
.phone-input::placeholder { color: color-mix(in srgb, var(--fg) 45%, transparent); font-weight: 500; }

/* Список стран: всегда тёмный, как выпадашки шапки и поиска */
.country-dropdown { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 20; display: none; padding: 10px; border-radius: 18px; background: var(--night); border: 1px solid rgb(241 236 233 / .12); box-shadow: 0 30px 60px -20px rgb(0 0 0 / .75); color: var(--paper); }
.country-dropdown.open { display: block; animation: drop-in .22s var(--ease-out); }
.modal .country-dropdown { position: static; margin-top: 8px; } /* в окне список раздвигает форму, а не обрезается его краем */
.country-search { width: 100%; min-height: 46px; padding: 0 14px; border-radius: 12px; border: 1.5px solid rgb(241 236 233 / .16); background: rgb(241 236 233 / .06); color: var(--paper); font: 600 16px/1 var(--font-body); }
.country-search::placeholder { color: rgb(241 236 233 / .45); font-weight: 500; }
.country-search:focus { outline: none; border-color: var(--sun); }
.country-list { max-height: 248px; margin-top: 8px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgb(241 236 233 / .22) transparent; }
.country-item { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 10px; border-radius: 10px; font: 700 14px/1.2 var(--font-body); cursor: pointer; transition: background-color .15s; }
.country-item:hover { background: rgb(241 236 233 / .08); }
.country-item .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.country-item .code { color: var(--steel); font-weight: 600; font-variant-numeric: tabular-nums; }
.country-item.is-current { background: rgb(244 205 84 / .14); box-shadow: inset 0 0 0 1.5px var(--sun); }
.country-item.is-current .code { color: var(--sun); }
.country-item.is-sep { position: relative; margin-bottom: 13px; }
.country-item.is-sep::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -7px; height: 1px; background: rgb(241 236 233 / .12); }
.country-list.is-searching .country-item.is-sep { margin-bottom: 0; }
.country-list.is-searching .country-item.is-sep::after { display: none; }

.lead-form__more { padding: 0 16px; border-radius: 14px; border: 1.5px dashed var(--line); }
.lead-form__more summary { display: flex; align-items: center; gap: 10px; min-height: 50px; list-style: none; cursor: pointer; font: 700 14px/1.2 var(--font-body); }
.lead-form__more summary::-webkit-details-marker { display: none; }
.lead-form__more summary .i { width: 18px; height: 18px; color: var(--accent); }
.lead-form__opt { font-size: 12px; font-weight: 500; color: var(--muted); }
.lead-form__chev { margin-left: auto; transition: rotate .3s var(--ease-out); }
.lead-form__more[open] .lead-form__chev { rotate: 180deg; }
.lead-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-bottom: 16px; }
.lead-form__consent { font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.lead-form__consent a { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.lead-form__captcha { font-size: 11.5px; line-height: 1.45; color: var(--muted); }
.lead-form__captcha a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
/* Значок reCAPTCHA стоит на месте кнопки чата (.fab) — прячем; взамен строка .lead-form__captcha (так разрешает Google) */
.grecaptcha-badge { visibility: hidden; }
/* Ошибка отправки: текст и мессенджеры, чтобы заявка не потерялась */
.lead-form__error { display: grid; gap: 8px; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--err); background: rgb(244 67 54 / .1); font: 600 14px/1.45 var(--font-body); }
.lead-form__error[hidden] { display: none; }
.lead-form__error-links { display: flex; flex-wrap: wrap; gap: 16px; }
.lead-form__error-links a { display: inline-flex; align-items: center; gap: 6px; color: var(--fg); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.lead-form__error-links .i { width: 18px; height: 18px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.lead-success { display: grid; justify-items: start; gap: 14px; }
.lead-success:focus { outline: none; }
.lead-success__icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--sun); color: var(--ink); animation: pop .5s var(--ease-spring); }
.lead-success__icon .i { width: 32px; height: 32px; }
@keyframes pop { from { scale: .4; opacity: 0; } }
.lead-success__title { font: 700 26px/1.1 var(--font-display); letter-spacing: -.03em; }
.lead-success__text { color: var(--muted); }
.lead-success__msg { display: flex; flex-wrap: wrap; gap: 10px; }

.modal { width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: clamp(22px, 3vw, 34px); border: 0; border-radius: 30px; background: var(--ink); color: var(--paper); box-shadow: 0 60px 120px -30px rgb(0 0 0 / .9), var(--glow); overflow: auto; overscroll-behavior: contain; }
.modal::backdrop { background: rgb(12 22 29 / .66); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal[open] { animation: modal-in .35s var(--ease-out); }
@keyframes modal-in { from { opacity: 0; translate: 0 24px; scale: .97; } }
.modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.modal__title { font: 700 26px/1.1 var(--font-display); letter-spacing: -.03em; }
.modal__topic { display: inline-flex; margin-top: 10px; padding: 7px 12px; border-radius: var(--r-pill); background: rgb(244 205 84 / .14); color: var(--sun); font: 700 13px/1.3 var(--font-body); }
