/* Спливаюча форма «Замовити». Свої класи (не .nio-car-lead__*) — інакше скрипт форми
   на сторінці авто, який шукає .nio-car-lead, підхопив би й цю форму. */
.nio-om { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.nio-om[hidden] { display: none; }
.nio-om__back { position: absolute; inset: 0; background: rgba(0, 0, 0, .72); backdrop-filter: blur(4px); }

.nio-om__box {
	/* Акцент (фокус полів, радіокнопки, галочка) — за статусом авто, так само як рамка
	   картки на вітрині: зелений «в наявності», оранжевий «очікуємо». Клас ставить JS. */
	--nio-om-accent: #2f9e5c;
	position: relative; width: 100%; max-width: 430px; max-height: calc(100vh - 40px); overflow-y: auto;
	background: #0a0a0b; border: 1px solid rgba(255, 255, 255, .14); border-radius: 16px;
	color: #f2f2f4; font-size: 14px; line-height: 1.5;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
	animation: nio-om-in .25s ease;
}
.nio-om__box.nio-om--transit { --nio-om-accent: #f5a623; }
@keyframes nio-om-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .nio-om__box { animation: none; } }

/* Фото свідомо БІЛЬШЕ за вікно: авто обрізається, зліва лишається його передня частина.
   Знизу розчиняється у фон картки маскою — тому шва не видно. */
.nio-om__photo {
	position: absolute; left: 0; right: 0; top: 0; height: 270px;
	background-size: 250%; background-position: 8% 55%; background-repeat: no-repeat;
	border-radius: 16px 16px 0 0;
	-webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 42%, transparent 100%);
	mask-image: linear-gradient(to bottom, #000 0%, #000 42%, transparent 100%);
	pointer-events: none;
}
/* Ліва половина кадру — темна заливка, що розчиняється в бік авто: там лежить логотип,
   і без неї він губився б на світлих ділянках знімка. */
.nio-om__photo::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(to right, #0a0a0b 0%, rgba(10, 10, 11, .92) 20%, rgba(10, 10, 11, .55) 40%, transparent 62%);
	border-radius: inherit;
}

.nio-om__head { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 0; }
.nio-om__logo { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; letter-spacing: .06em; color: #fff; }
.nio-om__logo[hidden] { display: none; }
.nio-om__logo svg { width: 26px; height: 26px; color: #fff; }
/* Знак ONVO — витягнутий по горизонталі, тож ширший за квадратну емблему NIO. */
.nio-om__logo[data-brand="onvo"] svg { width: 46px; height: auto; }
.nio-om__x {
	display: flex; align-items: center; justify-content: center; width: 30px; height: 30px;
	padding: 0; border: 0; border-radius: 50%; background: transparent; color: #fff; cursor: pointer;
	transition: background-color .18s ease;
}
.nio-om__x:hover { background: rgba(255, 255, 255, .12); }
.nio-om__x svg { width: 18px; height: 18px; pointer-events: none; }

.nio-om__form { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 46px 22px 22px; }
.nio-om__form[hidden] { display: none; }
/* flex-wrap + nowrap на назві: «Замовити» лишається в першому рядку, а назва,
   якщо поруч не вміщається, переходить у другий цілком. */
.nio-om__title { margin: 0; display: flex; flex-wrap: wrap; gap: 0 9px; font-size: 22px; font-weight: 700; line-height: 1.2; color: #fff; }
.nio-om__car { white-space: nowrap; }
/* Версія — окремим рядком, дрібніша й темніша за назву моделі. */
.nio-om__trim { margin: 3px 0 0; font-size: 13px; line-height: 1.35; color: #8a8a92; }
.nio-om__trim[hidden] { display: none; }
.nio-om__sub { margin: 10px 0 12px; font-size: 13px; color: #9a9aa2; }

.nio-om__row { display: flex; flex-direction: column; gap: 5px; }
.nio-om__field { position: relative; display: flex; }
.nio-om__ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); display: flex; color: #9a9aa2; pointer-events: none; }
.nio-om__ic svg { width: 18px; height: 18px; }
.nio-om__cc { position: absolute; left: 42px; top: 50%; transform: translateY(-50%); font-size: 14px; color: #f2f2f4; pointer-events: none; }
/* Поля — той самий вигляд, що й у формі на сторінці авто. */
.nio-om input.nio-om__inp {
	width: 100%; padding: 12px 16px 12px 42px; font: inherit; font-size: 14px;
	color: #fff; background: #000; border: 1px solid rgba(255, 255, 255, .14); border-radius: 6px;
	transition: border-color .2s ease;
}
.nio-om input.nio-om__inp::placeholder { color: #9a9aa2; }
.nio-om input.nio-om__inp:focus { outline: none; border-color: var(--nio-om-accent); background: #000; color: #fff; }
.nio-om input.nio-om__inp--phone { padding-left: 78px; letter-spacing: .2px; }
.nio-om input.nio-om__inp.is-bad { border-color: #e2564c; }
.nio-om__err { font-size: 12px; line-height: 1.35; color: #e2564c; }
.nio-om__err--form { margin: 4px 0 0; }

.nio-om__waylabel { margin: 8px 0 0; font-size: 13px; color: #9a9aa2; }
.nio-om__ways { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; margin-bottom: 6px; }
.nio-om__opt { display: flex; align-items: center; gap: 12px; padding: 7px 0; cursor: pointer; font-size: 14px; color: #9a9aa2; transition: color .15s ease; }
.nio-om__opt:hover { color: #f2f2f4; }
.nio-om__opt input { position: absolute; opacity: 0; width: 0; height: 0; }
/* Кільце + вписане залите коло — ті самі радіокнопки, що й у формі на сторінці авто. */
.nio-om__dot {
	display: flex; flex: 0 0 auto; width: 26px; height: 26px; padding: 4px;
	border-radius: 50%; border: 1.5px solid #6a6a72; background: transparent;
	transition: border-color .2s ease, box-shadow .2s ease;
}
.nio-om__dot::after {
	content: ""; flex: 1; border-radius: 50%;
	background: linear-gradient(180deg, #24242a 0%, #0d0d10 100%);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), inset 0 -1px 2px rgba(0, 0, 0, .6);
	transition: background .2s ease, box-shadow .2s ease;
}
.nio-om__opt input:checked + .nio-om__dot { border-color: var(--nio-om-accent); }
.nio-om__opt input:checked + .nio-om__dot::after {
	background: linear-gradient(180deg, color-mix(in srgb, #fff 20%, var(--nio-om-accent)) 0%, var(--nio-om-accent) 100%);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .32), inset 0 -1px 2px rgba(0, 0, 0, .25);
}
.nio-om__opt input:focus-visible + .nio-om__dot { box-shadow: 0 0 0 3px rgba(255, 255, 255, .18); }
.nio-om__opt input:checked ~ .nio-om__optlabel { color: #f2f2f4; }

/* Кнопка — як .ncar__btn: залита, контурна при наведенні. text-transform і border-color
   задані явно: теми часто мають власні правила для `form button`. */
.nio-om button.nio-om__submit {
	display: flex; align-items: center; justify-content: center; gap: 10px;
/* Висоту задаємо напряму, а не через padding+line-height: тема має власне правило
	   для `form button` з вищою специфічністю, і мій line-height туди не діставав —
	   кнопка виходила 36.98px замість 41.59px, як у «Замовити». box-sizing:border-box,
	   тож 41.6px — це саме зовнішня висота разом із рамкою. */
	width: 100%; min-height: 41.6px; box-sizing: border-box; margin-top: 6px; padding: 0 24px;
	background: #f2f2f4; border: 1.5px solid #f2f2f4; border-radius: 0;
	font: inherit; font-size: 16px; line-height: 1.287; font-weight: 600; text-transform: none;
	color: #0a0a0b; cursor: pointer;
	transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.nio-om button.nio-om__submit:hover,
.nio-om button.nio-om__submit:focus-visible { background: transparent; color: #f2f2f4; border-color: #f2f2f4; }
.nio-om button.nio-om__submit[disabled] { opacity: .6; cursor: progress; }

/* Пастка для ботів. */
.nio-om__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Екран підтвердження: фото прибираємо, лишається легкий засвіт із кута, а сам
   блок стає на всю висоту вікна й центрується. */
.nio-om__box.is-done .nio-om__photo { display: none; }
.nio-om__box.is-done {
	background:
		radial-gradient(120% 85% at 88% 6%, rgba(255, 255, 255, .07) 0%, transparent 58%),
		#0a0a0b;
}
.nio-om__done { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; min-height: 300px; padding: 30px 24px; }
.nio-om__done[hidden] { display: none; }
.nio-om__done-ic {
	display: flex; align-items: center; justify-content: center;
	width: 54px; height: 54px; border-radius: 50%;
	color: var(--nio-om-accent); border: 1.5px solid var(--nio-om-accent);
	background: color-mix(in srgb, var(--nio-om-accent) 12%, transparent);
}
.nio-om__done-ic svg { width: 26px; height: 26px; }
.nio-om__done-text { margin: 0; font-size: 15px; line-height: 1.5; color: #f2f2f4; }

@media (max-width: 420px) {
	.nio-om { padding: 12px; }
	.nio-om__title { font-size: 20px; }
	.nio-om__photo { height: 230px; }
	.nio-om__form { padding: 34px 16px 18px; }
}
