:root {
	--mlb-accent: #c9a227;
	--mlb-on-accent: #fff;
	--mlb-text: #16161a;
	--mlb-muted: #8a8a94;
	--mlb-line: #e4e0da;
	--mlb-bg: #fff;
	--mlb-radius: 14px;
	--mlb-font: inherit;
}

.mlb-locked { overflow: hidden; }

/* Строка прайса */

.mlb-price {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 11px 2px;
	border-bottom: 1px solid var(--mlb-line);
	font-family: var(--mlb-font);
	line-height: 1.4;
}

.mlb-price p { margin: 0; display: contents; }
.mlb-price p:empty { display: none; }
.mlb-price + p:empty { display: none; }
.mlb-price__text > * { margin: 0; }

.mlb-price:first-of-type { border-top: 1px solid var(--mlb-line); }

.mlb-price__text { flex: 1 1 auto; min-width: 0; }

.mlb-price__title {
	display: block;
	margin: 0;
	color: var(--mlb-text);
	font-size: 16px;
	line-height: 1.4;
}

.mlb-price__note {
	display: block;
	margin: 3px 0 0;
	font-size: 13px;
	line-height: 1.4;
	color: var(--mlb-muted);
}

.mlb-price__value {
	flex: 0 0 auto;
	align-self: center;
	margin: 0;
	white-space: nowrap;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--mlb-text);
	letter-spacing: .01em;
}

.mlb-add {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	align-self: center;
	min-width: 44px;
	height: 36px;
	padding: 0 14px;
	border: 1px solid var(--mlb-line);
	border-radius: calc(var(--mlb-radius) * 0.6);
	background: transparent;
	color: var(--mlb-text);
	font: inherit;
	font-family: var(--mlb-font);
	font-size: 14px;
	cursor: pointer;
	transition: border-color .2s, background .2s, color .2s, transform .15s;
}

.mlb-add:hover { border-color: var(--mlb-accent); color: var(--mlb-accent); }
.mlb-add:active { transform: scale(.96); }

.mlb-add.is-added {
	border-color: var(--mlb-accent);
	background: var(--mlb-accent);
	color: var(--mlb-on-accent);
}

.mlb-add.is-added .mlb-add__icon::before { content: "\f00c"; }
.mlb-add__icon { font-size: 13px; }

.mlb-add.is-pulse { animation: mlb-pulse .45s ease; }

/* «Добавить» + «Оформить»: две кнопки одной пилюлей. «Оформить» кладёт позицию и сразу открывает окно заявки. */
.mlb-duo { display: inline-flex; align-items: stretch; flex: 0 0 auto; align-self: center; }
.mlb-duo .mlb-add { border-right: 0; border-radius: calc(var(--mlb-radius) * 0.6) 0 0 calc(var(--mlb-radius) * 0.6); }
.mlb-buy {
	position: relative;
	display: inline-flex;
	align-items: center;
	height: 36px;
	padding: 0 16px;
	border: 0;
	border-radius: 0 calc(var(--mlb-radius) * 0.6) calc(var(--mlb-radius) * 0.6) 0;
	overflow: hidden;
	isolation: isolate;
	background: linear-gradient(110deg, var(--mlb-accent) 0%, color-mix(in srgb, var(--mlb-accent) 60%, #fff) 40%, var(--mlb-accent) 70%, color-mix(in srgb, var(--mlb-accent) 75%, #000) 100%);
	background-size: 300% 100%;
	color: var(--mlb-on-accent);
	font: inherit;
	font-family: var(--mlb-font);
	font-size: 14px;
	cursor: pointer;
	animation: mlb-flow 7s ease-in-out infinite alternate;
	transition: box-shadow .3s, transform .15s;
}
.mlb-buy::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .4) 50%, transparent 65%);
	transform: translateX(-120%);
	animation: mlb-sheen 4.5s ease-in-out infinite;
}
.mlb-buy:hover { box-shadow: 0 8px 20px -8px var(--mlb-accent); animation-duration: 2.5s; }
.mlb-buy:active { transform: scale(.97); }

@keyframes mlb-flow { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
@keyframes mlb-sheen { 0%, 55% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }

@keyframes mlb-pulse {
	0% { transform: scale(1); }
	40% { transform: scale(1.12); }
	100% { transform: scale(1); }
}

/* Иконка в шапке */

.mlb-cart {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	width: auto;
	min-width: 44px;
	height: 44px;
	padding: 0 12px;
	border: 0;
	border-radius: calc(var(--mlb-radius) * 0.6);
	background: transparent;
	color: inherit;
	font: inherit;
	font-family: var(--mlb-font);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}

.mlb-cart:hover { color: var(--mlb-accent); }

.mlb-cart__label { font-size: 15px; }

.mlb-cart__count {
	position: absolute;
	top: 4px;
	right: 2px;
	min-width: 19px;
	height: 19px;
	padding: 0 5px;
	border-radius: 10px;
	background: var(--mlb-accent);
	color: var(--mlb-on-accent);
	font-size: 11px;
	font-weight: 700;
	line-height: 19px;
	text-align: center;
	font-family: var(--mlb-font);
}

.mlb-cart.is-bump { animation: mlb-bump .6s cubic-bezier(.28, .84, .42, 1); }

@keyframes mlb-bump {
	0%   { transform: rotate(0) scale(1); }
	15%  { transform: rotate(-12deg) scale(1.1); }
	30%  { transform: rotate(10deg) scale(1.1); }
	45%  { transform: rotate(-8deg) scale(1.06); }
	60%  { transform: rotate(6deg) scale(1.03); }
	80%  { transform: rotate(-3deg) scale(1); }
	100% { transform: rotate(0) scale(1); }
}

/* Окно */

.mlb-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	font-family: var(--mlb-font);
}

.mlb-modal[hidden] { display: none; }

.mlb-modal input,
.mlb-modal select,
.mlb-modal textarea,
.mlb-modal button,
.mlb-modal legend,
.mlb-modal label,
.mlb-modal p,
.mlb-modal b,
.mlb-modal h2,
.mlb-modal .mlb-field__label,
.mlb-modal .mlb-item__title,
.mlb-modal .mlb-item__price {
	font-family: var(--mlb-font);
	font-feature-settings: inherit;
}

.mlb-modal input::placeholder,
.mlb-modal textarea::placeholder {
	font-family: var(--mlb-font);
	font-size: 15px;
	font-weight: 400;
	letter-spacing: normal;
	color: var(--mlb-muted);
	opacity: .65;
}

.mlb-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(16, 16, 22, .5);
	backdrop-filter: blur(3px);
	animation: mlb-fade .25s ease;
}

.mlb-modal__box {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 560px;
	max-height: calc(100vh - 48px);
	max-height: calc(100dvh - 48px);
	background: var(--mlb-bg);
	border-radius: var(--mlb-radius);
	box-shadow: 0 24px 70px rgba(16, 16, 22, .22);
	overflow: hidden;
	animation: mlb-rise .3s cubic-bezier(.22, 1, .36, 1);
}

@keyframes mlb-fade { from { opacity: 0; } }

@keyframes mlb-rise {
	from { opacity: 0; transform: translateY(18px) scale(.98); }
}

.mlb-modal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 22px 22px 18px 28px;
	border-bottom: 1px solid var(--mlb-line);
}

.mlb-modal__title {
	margin: 0;
	font-size: 20px;
	line-height: 1.25;
	font-weight: 600;
	letter-spacing: normal;
	text-transform: none;
	color: var(--mlb-text);
}

.mlb-modal__close {
	flex: 0 0 auto;
	width: 38px;
	height: 38px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--mlb-muted);
	font-size: 17px;
	cursor: pointer;
	transition: background .2s, color .2s;
}

.mlb-modal__close:hover { background: var(--mlb-line); color: var(--mlb-text); }

.mlb-modal__scroll {
	flex: 1 1 auto;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 22px 28px 30px;
}

/* Выбранные процедуры */

.mlb-items { margin-bottom: 4px; }

.mlb-item {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 12px 0;
	border-bottom: 1px solid var(--mlb-line);
	font-size: 15px;
	line-height: 1.45;
	animation: mlb-in .25s ease;
}

@keyframes mlb-in { from { opacity: 0; transform: translateX(-6px); } }

.mlb-item__title { flex: 1 1 auto; min-width: 0; color: var(--mlb-text); }
.mlb-item__price { flex: 0 0 auto; white-space: nowrap; color: var(--mlb-muted); }

.mlb-item__remove {
	flex: 0 0 auto;
	width: 26px;
	height: 26px;
	margin: -2px -4px 0 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--mlb-muted);
	font-size: 13px;
	cursor: pointer;
	transition: background .2s, color .2s;
}

.mlb-item__remove:hover { background: var(--mlb-line); color: var(--mlb-text); }

.mlb-empty {
	margin: 0;
	padding: 26px 0;
	text-align: center;
	color: var(--mlb-muted);
	font-size: 15px;
	line-height: 1.5;
}

.mlb-empty i { display: block; margin-bottom: 12px; font-size: 26px; opacity: .45; }

.mlb-total {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin: 16px 0 26px;
	font-size: 15px;
	color: var(--mlb-muted);
}

.mlb-total b { font-size: 19px; color: var(--mlb-text); }

/* Форма */

.mlb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }

.mlb-field { display: block; margin-bottom: 16px; }

.mlb-field__label {
	display: block;
	margin-bottom: 7px;
	font-size: 13px;
	letter-spacing: .02em;
	color: var(--mlb-muted);
}

.mlb-field b { color: var(--mlb-accent); font-weight: inherit; }

.mlb-field input,
.mlb-field select,
.mlb-field textarea {
	display: block;
	width: 100%;
	min-height: 48px;
	padding: 12px 14px;
	border: 1px solid var(--mlb-line);
	border-radius: calc(var(--mlb-radius) * 0.6);
	background: var(--mlb-bg);
	color: var(--mlb-text);
	font: inherit;
	font-family: var(--mlb-font);
	font-size: 16px;
	font-weight: 400;
	letter-spacing: normal;
	line-height: 1.4;
	box-sizing: border-box;
	transition: border-color .2s, box-shadow .2s;
}

.mlb-field textarea { min-height: 88px; resize: vertical; }

.mlb-field input::placeholder,
.mlb-field textarea::placeholder { color: var(--mlb-muted); opacity: .7; }

.mlb-field input:focus,
.mlb-field select:focus,
.mlb-field textarea:focus {
	outline: 0;
	border-color: var(--mlb-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--mlb-accent) 18%, transparent);
}

.mlb-field.is-invalid input { border-color: #d23f3f; }

/* Способ связи */

.mlb-choice { margin: 0 0 16px; padding: 0; border: 0; }

.mlb-choice legend {
	padding: 0;
	margin-bottom: 9px;
	font-size: 13px;
	letter-spacing: .02em;
	color: var(--mlb-muted);
}

.mlb-choice__item { display: block; margin-bottom: 8px; cursor: pointer; }
.mlb-choice__item:last-child { margin-bottom: 0; }
.mlb-choice__item input { position: absolute; opacity: 0; pointer-events: none; }

.mlb-choice__item span {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 13px 16px;
	border: 1px solid var(--mlb-line);
	border-radius: calc(var(--mlb-radius) * 0.6);
	font-size: 15px;
	color: var(--mlb-text);
	transition: border-color .2s, background .2s;
}

.mlb-choice__item span i { width: 17px; text-align: center; color: var(--mlb-muted); transition: color .2s; }

.mlb-choice__item input:checked + span {
	border-color: var(--mlb-accent);
	background: color-mix(in srgb, var(--mlb-accent) 7%, transparent);
}

.mlb-choice__item input:checked + span i { color: var(--mlb-accent); }
.mlb-choice__item input:focus-visible + span { box-shadow: 0 0 0 3px color-mix(in srgb, var(--mlb-accent) 18%, transparent); }

.mlb-hint {
	display: flex;
	gap: 9px;
	margin: -4px 0 18px;
	font-size: 13px;
	line-height: 1.5;
	color: var(--mlb-muted);
}

.mlb-hint i { margin-top: 2px; color: var(--mlb-accent); opacity: .8; }

/* Согласия */

.mlb-check {
	display: flex;
	align-items: flex-start;
	gap: 11px;
	margin-bottom: 13px;
	font-size: 13px;
	line-height: 1.5;
	color: var(--mlb-muted);
	cursor: pointer;
}

.mlb-check input { flex: 0 0 auto; width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--mlb-accent); }
.mlb-check a { color: var(--mlb-text); text-decoration: underline; text-underline-offset: 2px; }
.mlb-check.is-invalid span { color: #d23f3f; }

.mlb-submit {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	min-height: 54px;
	margin-top: 14px;
	padding: 15px;
	border: 0;
	border-radius: calc(var(--mlb-radius) * 0.6);
	background: var(--mlb-accent);
	color: var(--mlb-on-accent);
	font: inherit;
	font-family: var(--mlb-font);
	font-size: 16px;
	cursor: pointer;
	transition: opacity .2s, transform .15s;
}

.mlb-submit:hover { opacity: .9; }
.mlb-submit:active { transform: scale(.99); }
.mlb-submit:disabled { opacity: .55; cursor: default; }
.mlb-submit__icon { font-size: 13px; transition: transform .2s; }
.mlb-submit:hover .mlb-submit__icon { transform: translateX(3px); }

.mlb-message { margin: 13px 0 0; font-size: 14px; line-height: 1.5; }
.mlb-message.is-error { color: #d23f3f; }
.mlb-message.is-ok { color: #1a7f37; }

.mlb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Планшеты */

@media (max-width: 782px) {
	.mlb-modal { padding: 16px; }
	.mlb-modal__head { padding: 20px 18px 16px 22px; }
	.mlb-modal__title { font-size: 19px; }
	.mlb-modal__scroll { padding: 20px 22px 26px; }
}

/* Телефоны */

@media (max-width: 600px) {
	.mlb-modal { padding: 0; align-items: flex-end; }

	.mlb-modal__box {
		max-width: none;
		max-height: 93vh;
		max-height: 93dvh;
		border-radius: var(--mlb-radius) var(--mlb-radius) 0 0;
		animation: mlb-sheet .32s cubic-bezier(.22, 1, .36, 1);
	}

	@keyframes mlb-sheet { from { transform: translateY(100%); } }

	.mlb-modal__head { padding: 18px 14px 14px 20px; }
	.mlb-modal__scroll { padding: 18px 20px calc(26px + env(safe-area-inset-bottom)); }

	.mlb-grid { grid-template-columns: 1fr; gap: 0; }

	.mlb-price {
		flex-wrap: wrap;
		gap: 8px 14px;
		padding: 12px 0;
	}

	.mlb-price__text { flex: 1 1 100%; }
	.mlb-price__value { flex: 1 1 auto; }
	.mlb-add { margin-left: auto; }
}

@media (max-width: 360px) {
	.mlb-modal__scroll { padding-left: 15px; padding-right: 15px; }
	.mlb-cart__label { display: none; }
}

@media (max-height: 480px) and (orientation: landscape) {
	.mlb-modal { align-items: center; padding: 10px; }
	.mlb-modal__box { max-height: calc(100vh - 20px); border-radius: var(--mlb-radius); }
	.mlb-modal__head { padding-top: 14px; padding-bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
	.mlb-modal__box,
	.mlb-modal__overlay,
	.mlb-item,
	.mlb-cart.is-bump,
	.mlb-add.is-pulse { animation: none; }
	.mlb-add, .mlb-submit { transition: none; }
	.mlb-buy, .mlb-buy::after { animation: none; }
}


/* Телефон: код страны слева, номер справа */

.mlb-phone {
	--mlb-cc-w: 78px;
	position: relative;
	display: block;
}

.mlb-phone.is-wide { --mlb-cc-w: 96px; }

.mlb-phone__cc {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	z-index: 1;
	display: flex;
	align-items: center;
	gap: 7px;
	width: var(--mlb-cc-w);
	padding-left: var(--mlb-cc-pad, 14px);
	color: var(--mlb-text);
	font-variant-numeric: tabular-nums;
	pointer-events: none;
}

.mlb-phone__cc b { font-weight: 500; font-size: inherit; }

.mlb-phone__cc i {
	width: 6px;
	height: 6px;
	margin-top: -3px;
	border: solid currentColor;
	border-width: 0 1.5px 1.5px 0;
	opacity: .55;
	transform: rotate(45deg);
	transition: transform .2s ease;
}

/* тонкий разделитель между кодом и номером */
.mlb-phone__cc::after {
	content: "";
	position: absolute;
	top: 30%;
	bottom: 30%;
	right: 0;
	width: 1px;
	background: currentColor;
	opacity: .15;
}

.mlb-phone .mlb-phone__select {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	z-index: 2;
	width: var(--mlb-cc-w) !important;
	min-width: 0 !important;
	height: 100% !important;
	margin: 0;
	padding: 0;
	border: 0;
	opacity: 0 !important;
	font-size: 16px;
	cursor: pointer;
}

.mlb-phone__select:focus-visible + input { box-shadow: 0 0 0 3px color-mix(in srgb, var(--mlb-accent) 30%, transparent); }
.mlb-phone:hover .mlb-phone__cc i { transform: rotate(45deg) translate(1px, 1px); }

.mlb-phone input[type="tel"] {
	padding-left: calc(var(--mlb-cc-w) + 12px) !important;
	font-variant-numeric: tabular-nums;
	letter-spacing: .6px;
}
