/* Схемы зубов для заказ-нарядов (молочные + постоянные / кольца)
   Десктоп молочные: одна картинка 2200×648
   Мобила ≤767: две дуги друг под другом */

.tooth-schema.tooth-schema_milk,
.tooth-schema_milk {
	position: relative !important;
	display: block !important;
	width: 100% !important;
	max-width: none !important;
	margin: 0 0 1.25rem !important;
	padding: 0 !important;
	line-height: 0;
	overflow: visible;
	box-sizing: border-box !important;
	aspect-ratio: auto !important;
}

/* --- Десктоп-комбо --- */
.tooth-schema_milk-combo {
	position: relative !important;
	display: block !important;
	width: 100% !important;
	aspect-ratio: 2200 / 648;
	line-height: 0;
}

.tooth-schema_milk-split {
	display: none !important;
}

.tooth-schema_milk .tooth__image {
	position: absolute !important;
	left: 0 !important;
	top: 0 !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: fill !important;
	display: block !important;
	pointer-events: none;
	user-select: none;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
}

.tooth-schema_milk .tooth-checkboxes {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

.tooth-schema_milk .tooth {
	position: absolute;
	transform: translate(-50%, -50%);
	pointer-events: auto;
	z-index: 2;
	width: 1rem !important;
	height: 1rem !important;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

.tooth-schema_milk .tooth__checkbox {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	pointer-events: none;
	margin: 0;
}

.tooth-schema_milk .tooth__mark {
	display: block;
	width: 1rem !important;
	height: 1rem !important;
	cursor: pointer;
	border-radius: 50%;
	position: relative;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

.tooth-schema_milk .tooth__mark::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 0.45rem !important;
	height: 0.45rem !important;
	margin: -0.225rem 0 0 -0.225rem;
	border-radius: 50%;
	background: transparent;
	border: 1.5px solid transparent;
	box-sizing: border-box;
	transition: background 0.15s ease, border-color 0.15s ease;
	pointer-events: none;
}

.tooth-schema_milk .tooth:hover .tooth__mark::before {
	border-color: rgba(19, 171, 176, 0.7);
	background: rgba(19, 171, 176, 0.25);
}

.tooth-schema_milk .tooth__checkbox:checked + .tooth__mark::before {
	background: #13abb0;
	border-color: #0e8e92;
}

/* Координаты десктоп-комбо — % от полной схемы */
.tooth-schema_milk-combo .tooth:nth-child(1)  { top: 67%; left: 15%; }     /* 55 */
.tooth-schema_milk-combo .tooth:nth-child(2)  { top: 52%; left: 15.8%; }   /* 54 */
.tooth-schema_milk-combo .tooth:nth-child(3)  { top: 42%; left: 17.8%; }   /* 53 */
.tooth-schema_milk-combo .tooth:nth-child(4)  { top: 35%; left: 20.5%; }   /* 52 */
.tooth-schema_milk-combo .tooth:nth-child(5)  { top: 31.5%; left: 23.5%; } /* 51 */
.tooth-schema_milk-combo .tooth:nth-child(6)  { top: 31%; left: 27%; }     /* 61 */
.tooth-schema_milk-combo .tooth:nth-child(7)  { top: 36%; left: 30%; }     /* 62 */
.tooth-schema_milk-combo .tooth:nth-child(8)  { top: 43%; left: 32.2%; }   /* 63 */
.tooth-schema_milk-combo .tooth:nth-child(9)  { top: 54%; left: 34.2%; }   /* 64 */
.tooth-schema_milk-combo .tooth:nth-child(10) { top: 68%; left: 35%; }     /* 65 */
.tooth-schema_milk-combo .tooth:nth-child(11) { top: 34%; left: 60.8%; }   /* 85 */
.tooth-schema_milk-combo .tooth:nth-child(12) { top: 48.5%; left: 62.5%; } /* 84 */
.tooth-schema_milk-combo .tooth:nth-child(13) { top: 58.5%; left: 64.5%; } /* 83 */
.tooth-schema_milk-combo .tooth:nth-child(14) { top: 63%; left: 67.2%; }   /* 82 */
.tooth-schema_milk-combo .tooth:nth-child(15) { top: 66.5%; left: 69.5%; } /* 81 */
.tooth-schema_milk-combo .tooth:nth-child(16) { top: 66.5%; left: 72%; }   /* 71 */
.tooth-schema_milk-combo .tooth:nth-child(17) { top: 63%; left: 74.5%; }   /* 72 — не присылали, оставил */
.tooth-schema_milk-combo .tooth:nth-child(18) { top: 59.5%; left: 77%; }   /* 73 */
.tooth-schema_milk-combo .tooth:nth-child(19) { top: 50.5%; left: 79%; }   /* 74 */
.tooth-schema_milk-combo .tooth:nth-child(20) { top: 35%; left: 80.8%; }   /* 75 */

/* Планшет: чуть шире колонки */
@media (min-width: 768px) and (max-width: 991px) {
	.tooth-schema.tooth-schema_milk,
	.tooth-schema_milk {
		width: calc(100% + 64px) !important;
		max-width: none !important;
		margin-left: -32px !important;
		margin-right: -32px !important;
	}
}

/* Десктоп: схема шире колонки формы */
@media (min-width: 992px) {
	.tooth-schema.tooth-schema_milk,
	.tooth-schema_milk {
		width: calc(100% + 220px) !important;
		max-width: 1180px !important;
		margin-left: -110px !important;
		margin-right: -110px !important;
	}
}

/* ========== Мобила ≤767: две дуги в столбик ========== */
@media (max-width: 767px) {
	.tooth-schema.tooth-schema_milk,
	.tooth-schema_milk {
		width: 100% !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
	}

	.tooth-schema_milk-combo {
		display: none !important;
	}

	.tooth-schema_milk-split {
		display: flex !important;
		flex-direction: column !important;
		align-items: center !important;
		gap: 1.25rem !important;
		width: 100% !important;
	}

	.tooth-schema_milk-arch {
		position: relative !important;
		display: block !important;
		width: 100% !important;
		max-width: 100% !important;
		margin: 0 auto !important;
		line-height: 0;
	}

	.tooth-schema_milk-arch_upper {
		aspect-ratio: 1600 / 1284;
	}

	.tooth-schema_milk-arch_lower {
		aspect-ratio: 1600 / 1272;
	}

	/* Чуть крупнее зона тапа на телефоне */
	.tooth-schema_milk-split .tooth,
	.tooth-schema_milk-split .tooth__mark {
		width: 1.25rem !important;
		height: 1.25rem !important;
	}

	.tooth-schema_milk-split .tooth__mark::before {
		width: 0.55rem !important;
		height: 0.55rem !important;
		margin: -0.275rem 0 0 -0.275rem;
	}

	/* Верхняя дуга — пересчёт от десктоп-координат */
	.tooth-schema_milk-arch_upper .tooth:nth-child(1)  { top: 67%; left: 23.05%; }   /* 55 */
	.tooth-schema_milk-arch_upper .tooth:nth-child(2)  { top: 52%; left: 25.23%; }   /* 54 */
	.tooth-schema_milk-arch_upper .tooth:nth-child(3)  { top: 42%; left: 30.68%; }   /* 53 */
	.tooth-schema_milk-arch_upper .tooth:nth-child(4)  { top: 35%; left: 38.04%; }   /* 52 */
	.tooth-schema_milk-arch_upper .tooth:nth-child(5)  { top: 31.5%; left: 46.22%; } /* 51 */
	.tooth-schema_milk-arch_upper .tooth:nth-child(6)  { top: 31%; left: 55.76%; }   /* 61 */
	.tooth-schema_milk-arch_upper .tooth:nth-child(7)  { top: 36%; left: 63.94%; }   /* 62 */
	.tooth-schema_milk-arch_upper .tooth:nth-child(8)  { top: 43%; left: 69.94%; }   /* 63 */
	.tooth-schema_milk-arch_upper .tooth:nth-child(9)  { top: 54%; left: 75.39%; }   /* 64 */
	.tooth-schema_milk-arch_upper .tooth:nth-child(10) { top: 68%; left: 77.57%; }   /* 65 */

	/* Нижняя дуга — пересчёт от десктоп-координат */
	.tooth-schema_milk-arch_lower .tooth:nth-child(1)  { top: 34%; left: 23.39%; }   /* 85 */
	.tooth-schema_milk-arch_lower .tooth:nth-child(2)  { top: 48.5%; left: 27.98%; } /* 84 */
	.tooth-schema_milk-arch_lower .tooth:nth-child(3)  { top: 58.5%; left: 33.37%; } /* 83 */
	.tooth-schema_milk-arch_lower .tooth:nth-child(4)  { top: 63%; left: 40.66%; }   /* 82 */
	.tooth-schema_milk-arch_lower .tooth:nth-child(5)  { top: 66.5%; left: 46.87%; } /* 81 */
	.tooth-schema_milk-arch_lower .tooth:nth-child(6)  { top: 66.5%; left: 53.62%; } /* 71 */
	.tooth-schema_milk-arch_lower .tooth:nth-child(7)  { top: 63%; left: 60.37%; }   /* 72 */
	.tooth-schema_milk-arch_lower .tooth:nth-child(8)  { top: 59.5%; left: 67.12%; } /* 73 */
	.tooth-schema_milk-arch_lower .tooth:nth-child(9)  { top: 50.5%; left: 72.52%; } /* 74 */
	.tooth-schema_milk-arch_lower .tooth:nth-child(10) { top: 35%; left: 77.37%; }   /* 75 */
}

/* ========== Размер №1 → №3: столбик, от меньшего к большему ========== */
.zakaz4-options_size {
	display: flex !important;
	flex-direction: column !important;
	flex-wrap: nowrap !important;
	align-items: flex-start !important;
	gap: 0.85rem !important;
}

.zakaz4-options_size .zakaz4-option {
	flex: 0 0 auto !important;
	width: auto !important;
	max-width: 100% !important;
}

.zakaz4-options_size .zakaz4-option__card {
	display: inline-flex !important;
	flex-direction: column;
	align-items: center;
	width: auto !important;
	padding: 0.55rem 0.75rem 0.6rem !important;
}

.zakaz4-options_size .zakaz4-option__img {
	display: block !important;
	width: auto !important;
	height: auto !important;
	max-width: 100% !important;
	max-height: none !important;
	object-fit: contain !important;
}

/* Масштаб как на образце: 3.7 → 3.8 → 3.9 мм (визуально чуть нарастает) */
.zakaz4-options_size .zakaz4-option:nth-child(1) .zakaz4-option__img {
	width: 10.5rem !important;
}

.zakaz4-options_size .zakaz4-option:nth-child(2) .zakaz4-option__img {
	width: 12.2rem !important;
}

.zakaz4-options_size .zakaz4-option:nth-child(3) .zakaz4-option__img {
	width: 14rem !important;
}

@media (max-width: 575px) {
	.zakaz4-options_size .zakaz4-option:nth-child(1) .zakaz4-option__img {
		width: 8.5rem !important;
	}

	.zakaz4-options_size .zakaz4-option:nth-child(2) .zakaz4-option__img {
		width: 10rem !important;
	}

	.zakaz4-options_size .zakaz4-option:nth-child(3) .zakaz4-option__img {
		width: 11.5rem !important;
	}
}

/* ========== Дизайн: три рельефа в одну линию, общая базовая линия ========== */
.zakaz4-options_design {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: nowrap !important;
	align-items: stretch !important;
	justify-content: flex-start !important;
	gap: 0.75rem !important;
}

.zakaz4-options_design .zakaz4-option {
	flex: 1 1 0 !important;
	min-width: 0 !important;
	max-width: 11rem !important;
}

.zakaz4-options_design .zakaz4-option__card {
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	justify-content: flex-start !important;
	height: 100% !important;
	padding: 0.5rem 0.4rem 0.55rem !important;
	box-sizing: border-box !important;
}

/* Фиксированная «полка» под картинку — низ коронки на одной линии */
.zakaz4-options_design .zakaz4-option__img {
	display: block !important;
	width: auto !important;
	height: 6.5rem !important;
	max-width: 100% !important;
	max-height: none !important;
	object-fit: contain !important;
	object-position: bottom center !important;
	margin: 0 auto !important;
}

.zakaz4-options_design .zakaz4-option__label {
	margin-top: 0.45rem !important;
	min-height: 2.6em !important;
	display: flex !important;
	align-items: flex-start !important;
	justify-content: center !important;
	text-align: center !important;
}

@media (max-width: 575px) {
	.zakaz4-options_design {
		gap: 0.45rem !important;
	}

	.zakaz4-options_design .zakaz4-option__img {
		height: 5.2rem !important;
	}

	.zakaz4-options_design .zakaz4-option__label {
		font-size: 0.82rem !important;
		min-height: 2.8em !important;
	}
}

/* ========== 5. Количество: легенда + блоки A/B/C ========== */
.zakaz4-legend {
	margin: 0 0 1.75rem !important;
}

.zakaz4-qty .zakaz4-legend__title,
.zakaz4-legend__title {
	color: #e77e44 !important;
	font-size: 1.05rem !important;
	font-weight: 700 !important;
	line-height: 1.3 !important;
	margin: 0 0 0.65rem !important;
}

.zakaz4-legend__cols {
	display: flex !important;
	flex-wrap: wrap !important;
	gap: 1.5rem 3.5rem !important;
	align-items: flex-start !important;
}

.zakaz4-legend__col {
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	min-width: 3.5rem !important;
	gap: 0.2rem !important;
}

.zakaz4-legend__name,
.zakaz4-legend__val {
	color: #48b4a6 !important;
	font-size: 1rem !important;
	line-height: 1.35 !important;
	font-weight: 400 !important;
}

.zakaz4-legend__val {
	font-size: 1.15rem !important;
}

.zakaz4-qty-block {
	margin: 0 0 1.85rem !important;
}

.zakaz4-qty-block:last-child {
	margin-bottom: 0 !important;
}

.zakaz4-qty-block__title {
	color: #6b7a99 !important;
	font-size: 1.15rem !important;
	font-weight: 500 !important;
	line-height: 1.3 !important;
	margin: 0 0 0.85rem !important;
}

.zakaz4-qty-grid {
	display: flex !important;
	flex-wrap: wrap !important;
	gap: 0.75rem 3.5rem !important;
	max-width: 28rem !important;
}

.zakaz4-qty-col {
	display: flex !important;
	flex-direction: column !important;
	gap: 0.65rem !important;
	min-width: 9.5rem !important;
}

.zakaz4-qty-row {
	display: flex !important;
	align-items: baseline !important;
	gap: 0.55rem !important;
	margin: 0 !important;
	cursor: text !important;
	color: #6b7a99 !important;
}

.zakaz4-qty-code {
	flex: 0 0 auto !important;
	min-width: 2.4em !important;
	font-size: 1.05rem !important;
	font-weight: 500 !important;
	letter-spacing: 0.02em !important;
	color: #6b7a99 !important;
}

.zakaz4-qty-input {
	flex: 1 1 auto !important;
	width: 4.5rem !important;
	max-width: 5.5rem !important;
	height: 1.55rem !important;
	padding: 0 0.15rem 0.1rem !important;
	border: none !important;
	border-bottom: 1px solid #6b7a99 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	outline: none !important;
	color: #6b7a99 !important;
	font-size: 1.05rem !important;
	line-height: 1.2 !important;
	text-align: center !important;
	-moz-appearance: textfield !important;
	appearance: textfield !important;
}

.zakaz4-qty-input::-webkit-outer-spin-button,
.zakaz4-qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none !important;
	margin: 0 !important;
}

.zakaz4-qty-input:focus {
	border-bottom-color: #48b4a6 !important;
	box-shadow: none !important;
}

@media (max-width: 575px) {
	.zakaz4-legend__cols {
		gap: 1rem 2rem !important;
	}

	.zakaz4-qty-grid {
		gap: 0.75rem 2rem !important;
	}

	.zakaz4-qty-col {
		min-width: 8.5rem !important;
	}
}

/* ========== Заказ-наряд №3: Кольца — молочные + постоянные ========== */
.zakaz3-schema-block {
	margin: 0 0 2rem;
}

.zakaz3-schema-block:last-child {
	margin-bottom: 0;
}

.zakaz3-schema-title {
	color: #48b4a6;
	font-size: 1.05rem;
	font-weight: 600;
	line-height: 1.3;
	margin: 0 0 0.85rem;
}

/* Постоянные зубы — та же схема/оверлей, что в «Ортопедия» */
.zakaz3-rings .tooth-schema:not(.tooth-schema_milk) {
	position: relative !important;
	display: block !important;
	max-width: 100% !important;
}

.zakaz3-rings .tooth-schema:not(.tooth-schema_milk) .tooth__image {
	display: block !important;
	width: 100% !important;
	height: auto !important;
	max-width: 100% !important;
}

.zakaz3-rings .tooth-schema:not(.tooth-schema_milk) .tooth-checkboxes {
	position: absolute !important;
	inset: 0 !important;
	pointer-events: none;
}

.zakaz3-rings .tooth-schema:not(.tooth-schema_milk) .tooth {
	position: absolute !important;
	pointer-events: auto;
	z-index: 2;
}
