/* public_html/css/modal.css */
/* Версия 202610251635 */
/* Изменено 25.10.2026 16:35:00 */

.contact-modal-wrapper {
	position: relative;
	width: 50%;
	margin: -20px auto 0 auto;
}

.contact-modal {
	position: fixed;
	width: -webkit-calc(100% - 20px);
	width: -moz-calc(100% - 20px);
	width: calc(100% - 20px);
	height: -webkit-calc(100% - 158px, 20px, 20px, 20px);
	height: -moz-calc(100% - 158px, 20px, 20px, 20px);
	height: calc(100% - 158px, 20px, 20px, 20px);
	top: 79px;
	right: 10px;
	bottom: 10px;
	left: 10px;
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
	visibility: hidden;
	background: #fff;
	opacity: 0;
	-moz-opacity: 0;
	-webkit-opacity: 0;
	filter: alpha(opacity=0);
	-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
	-webkit-transform: scale(0.75);
	-moz-transform: scale(0.75);
	-ms-transform: scale(0.75);
	-o-transform: scale(0.75);
	transform: scale(0.75);
	-webkit-transition: all 1s ease;
	-moz-transition: all 1s ease;
	-ms-transition: all 1s ease;
	-o-transition: all 1s ease;
	transition: all 1s ease;
	overflow-x: hidden;
	overflow-y: scroll;
	scrollbar-gutter: stable;
	z-index: 1005;
}

.contact-modal.close {
	visibility: hidden;
	opacity: 0;
	-moz-opacity: 0;
	-webkit-opacity: 0;
	filter: alpha(opacity=0);
	-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
}

.contact-modal.open {
	width: 100%;
	width: -webkit-calc(100% 0px);
	width: -moz-calc(100% 0px);
	width: calc(100% 0px);
	height: -webkit-calc(100% - 158px, 20px, 20px, 20px);
	height: -moz-calc(100% - 158px, 20px, 20px, 20px);
	height: calc(100% - 158px, 20px, 20px, 20px);
	top: 0px;
	right: 0px;
	bottom: 0px;
	left: 0px;
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
	visibility: visible;
	background: #f6f7f8;
	opacity: 1;
	-moz-opacity: 1;
	-webkit-opacity: 1;
	filter: alpha(opacity=100);
	-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
	-webkit-transform: scale(1);
	-moz-transform: scale(1);
	-ms-transform: scale(1);
	-o-transform: scale(1);
	transform: scale(1);
}

.contact-modal-closer {
	position: absolute;
	font-size: 21px;
	color: #2f2f2f;
	cursor: pointer;
	left: 40px;
	top: 35px;
	z-index: 9999;
}

.calc-step-title {
	position: relative;
	font-size: clamp(18px, 1.9vw, 21px) font-weight: 300;
	text-transform: none;
	letter-spacing: 0.02em;
	text-align: left;
	color: #2e2e2e;
	margin-bottom: -7px;
}

.calc-help {
	display: block;
	text-align: left;
	color: #2e2e2e50;
	font-size: 14px;
	font-weight: 300;
	text-transform: none;
	letter-spacing: 0.01em;
	margin: 5px;
}

/* Градиентная индикация ошибок, валидности и подсказок калькулятора. */

.calc-help-gradient {
	opacity: 1;
	background-repeat: no-repeat;
	background-size: 200% 100%;
	background-position: 100% 0;
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}

.calc-help-gradient-error {
	background-image: linear-gradient(to right, #5576d1 50%, #5576d150 50%);
	background-repeat: no-repeat;
	background-size: 200% 100%;
	background-position: 100% 0;
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}

.calc-step[data-step="3"] #w_err,
#l_err,
#finalStage[data-step="6"] .calc-grid .calc-help-gradient-error {
	background-image: linear-gradient(to right, #ffffff 50%, #ffffff50 50%);
}
#finalStage[data-step="6"] #layout_choice_err.calc-help-gradient-error {
	background-image: linear-gradient(to right, #5576d1 50%, #5576d150 50%);
}
#finalStage[data-step="6"] #fio_err.calc-help-gradient-error,
#finalStage[data-step="6"] #phone_err.calc-help-gradient-error {
	background-image: linear-gradient(to right, #ff8e8e 50%, #5576d150 50%);
}

.calc-help-gradient-valid,
.calc-help-gradient-info {
	background-image: linear-gradient(to right, #5576d1 50%, #5576d150 50%);
	background-repeat: no-repeat;
	background-size: 200% 100%;
	background-position: 100% 0;
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}

.calc-step[data-step="3"] #w_err,
#l_err,
#finalStage[data-step="6"] .calc-grid .calc-help-gradient-valid,
.calc-help-gradient-info {
	background-image: linear-gradient(to right, #ffffff 50%, #ffffff50 50%);
}

.calc-help-gradient-active {
	animation: calcAnimation 3.2s ease forwards;
}

.calc-header {
	margin: 16px auto;
	width: 100%;
	position: relative;
	background: #fff;
	padding: 21px 25px;
	outline: none;
	font-size: clamp(14px, 1.9vw, 16px);
	font-weight: 300;
	text-transform: none;
	box-shadow: 0 3px 10px #2e2e2e10;
	border-radius: 15px;
	border: 1px solid #2e2e2e10;
}

.calc-step[data-step="3"] .calc-grid,
#finalStage[data-step="6"] .calc-final-contact-grid {
	background: #5576d1;
	padding: 3px 32px 33px;
	border: 1px solid transparent;
	border-radius: 25px;
	box-shadow: 1px 2px 5px #5573c625;
}

.calc-step[data-step="3"] .calc-help,
#finalStage[data-step="6"] .calc-grid .calc-help {
	color: #fff;
}

@keyframes calcAnimation {
	from {
		background-position: 100% 0;
	}

	to {
		background-position: 0 0;
	}
}

.calc-async-state {
	display: block;
	margin: 16px 0 18px;
}

.calc-async-state.calc-hidden {
	display: none;
}

.calc-async-state__inner {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	border-radius: 16px;
	background: rgba(85, 118, 209, 0.08);
	border: 1px solid rgba(85, 118, 209, 0.16);
}

.calc-async-state.is-error .calc-async-state__inner {
	background: rgba(209, 85, 85, 0.08);
	border-color: rgba(209, 85, 85, 0.16);
}

.calc-async-state__spinner {
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
}

.calc-async-state__spinner img {
	display: block;
	width: 100%;
	height: 100%;
}

.calc-async-state__text {
	flex: 1 1 auto;
	color: #2e2e2e;
	font-size: 14px;
	font-weight: 400;
	letter-spacing: 0.03em;
	text-align: left;
}

.calc-async-state__retry {
	flex: 0 0 auto;
	border: none;
	border-radius: 999px;
	padding: 9px 14px;
	background: #5576d1;
	color: #fff;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
}

.calc-async-state__retry.calc-hidden {
	display: none;
}

.calc-radio.is-loading {
	pointer-events: none;
}

.calc-radio-skeleton {
	display: grid;
	gap: 12px;
}

.calc-radio-skeleton__item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	border-radius: 18px;
	background: rgba(85, 118, 209, 0.08);
	border: 1px solid rgba(85, 118, 209, 0.12);
}

.calc-radio-skeleton__dot,
.calc-radio-skeleton__line {
	background: linear-gradient(90deg, rgb(189 189 189 / 21%) 0%, rgb(189 189 189 / 10%) 50%, rgba(85, 118, 209, 0.10) 100%);
	background-size: 220px 100%;
	animation: calcAnimation 3.2s ease forwards;
}

.calc-radio-skeleton__dot {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	flex: 0 0 auto;
}

.calc-radio-skeleton__line {
	height: 18px;
	border-radius: 999px;
	flex: 1 1 auto;
}

.calc-radio-skeleton__line--short {
	max-width: 38%;
}

.calc-progress .txt {
	font-size: 15px;
	white-space: nowrap;
	color: #2e2e2e50;
	font-weight: 500;
	text-transform: none;
	letter-spacing: 0.2em;
}

/* ------------------------------ */

/* ---------------------------------------------------------------------------
   ДЕМО: как измерять общий размер (шаг 3)
   Контур, анимация окантовки, размерные линии и подписи находятся в одном SVG
   с общим viewBox. Так схема масштабируется целиком и не ломается на стыках.
--------------------------------------------------------------------------- */

.calc-dims-demo {
    position: relative;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
}

.calc-dims-rect {
	width: clamp(320px, 64vw, 620px);
	max-width: 100%;
	height: auto;
	display: block;
	overflow: visible;
}

.calc-dims-shape {
	fill: #eaecee;
	stroke: #2e2e2e;
	stroke-width: 5;
	stroke-linejoin: round;
	stroke-linecap: round;
}

.calc-dims-arrow {
	pointer-events: none;
	transform-box: fill-box;
	transform-origin: center;
}

.calc-dims-shape-progress {
	pointer-events: none;
}

.calc-dims-arrow-line,
.calc-dims-arrow-cap {
	stroke: #2e2e2e;
	stroke-width: 3;
	stroke-linecap: square;
}

.calc-dims-label {
	fill: #5576d1;
	font-size: 28px;
	font-weight: 500;
	letter-spacing: 0.05em;
	text-anchor: middle;
	dominant-baseline: middle;
	pointer-events: visiblePainted;
	cursor: pointer;
	user-select: none;
}

/* Редактирование чисел прямо на SVG-подписях, с единицей измерения вне поля. */
.calc-dims-label.is-editing {
    visibility: hidden;
    pointer-events: none;
}

.calc-dims-inline-foreign {
    visibility: hidden;
    pointer-events: none;
    overflow: visible;
}

.calc-dims-inline-foreign.is-editing {
    visibility: visible;
    pointer-events: auto;
}

/* SVG-подпись и редактор смещены одинаково в разметке: для горизонтальной — вниз,
   для повёрнутой — влево. Здесь только компенсация SVG/HTML baseline, не отступ от линии. */
.calc-dims-inline-control {
    position: relative;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    width: max-content;
    max-width: 100%;
    height: 100%;
    margin: 0 auto;
    transform: translateY(-1.8px);
    gap: 0.28em;
    padding: 0 25px;
    border-radius: 999px;
    background: #fff;
    color: #2e2e2e;
    font-family: inherit;
    font-size: 28px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.05em;
}

/* Псевдоэлемент/анимация возникают только при открытии редактора.
   До этого элемент существует скрытым и анимация успевала закончиться ещё до клика. */
.calc-dims-inline-foreign.is-editing .calc-dims-inline-control::after {
    --stepmat-unit-mm-hint-angle: 0deg;
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    padding: 2px;
    background: conic-gradient(from 0deg, #5576d1 0deg var(--stepmat-unit-mm-hint-angle), transparent var(--stepmat-unit-mm-hint-angle) 360deg);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    animation: calcUnitMmHintBorder 1.5s ease-in-out 1 forwards;
}

/* Ширина числового input вычисляется по метрикам текста, а не через flex:1. */
.calc-dims-inline-input {
    display: block;
    flex: 0 0 auto;
    box-sizing: border-box;
    width: 3ch;
    min-width: 1ch;
    height: 1.1em;
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: center;
    letter-spacing: inherit;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
}

.calc-dims-inline-input::selection {
    background: #5576d1;
    color: #fff;
}

.calc-dims-inline-unit {
    flex: 0 0 auto;
    color: inherit;
    white-space: nowrap;
    user-select: none;
}

/* Анимация: стрелка выбранного поля мягко проявляется из центра. */

@keyframes calcDimsPulseX {
	0% {
		transform: scaleX(0);
		opacity: 0;
	}

	50% {
		transform: scaleX(1);
		opacity: 1;
	}

	100% {
		transform: scaleX(1);
		opacity: 1;
	}
}

@keyframes calcDimsPulseY {
	0% {
		transform: scaleY(0);
		opacity: 0;
	}

	50% {
		transform: scaleY(1);
		opacity: 1;
	}

	100% {
		transform: scaleY(1);
		opacity: 1;
	}
}

.calc-dims-demo.is-w .calc-dims-arrow-w {
	animation: calcDimsPulseX 7s ease-in-out 1 forwards;
}

.calc-dims-demo.is-l .calc-dims-arrow-l {
	animation: calcDimsPulseY 7s ease-in-out 1 forwards;
}

@media (max-width: 600px) {
	.calc-dims-demo {
		margin-top: -5px;
		margin-bottom: 25px;
	}

	.calc-dims-rect {
		width: min(100%, 560px);
	}

	.calc-dims-shape {
		stroke-width: 6;
	}

	.calc-dims-arrow-line,
	.calc-dims-arrow-cap {
		stroke-width: 3.5;
	}

	.calc-dims-label {
		font-size: 34px;
		letter-spacing: 0.04em;
	}

    .calc-dims-inline-control {
        font-size: 34px;
        letter-spacing: 0.04em;
        padding-inline: 18px;
    }
}

.calc-input {
	width: 100%;
	border: 1px solid #d2d2d3;
	box-shadow: 0 0 0 1px rgba(46, 46, 46, 0.18);
	transition: color .18s ease, border-color .18s ease, box-shadow .18s ease;
	padding: 15px 45px 15px 15px;
	outline: none;
	text-align: center;
	color: #2e2e2e;
	font-size: 16px;
	font-weight: 500;
	text-transform: none;
	letter-spacing: 0.05em;
	height: 3.33em;
	border-radius: 15px;
}

.calc-input option {
	text-align: left;
}

.calc-input:focus {
	border-color: #2e2e2e;
}

#finalStage .calc-input {
	text-align: left;
}

.calc-unit-box {
	position: relative;
}

.calc-unit-native {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	background-image: linear-gradient(45deg, transparent 50%, #606060 50%), linear-gradient(135deg, #606060 50%, transparent 50%);
	background-position: calc(100% - 22px) calc(50% - 3px), calc(100% - 16px) calc(50% - 3px);
	background-size: 6px 6px, 6px 6px;
	background-repeat: no-repeat;
	padding-right: 38px;
}

.calc-unit-custom {
	display: none;
	position: relative;
}

.calc-unit-trigger {
	width: 100%;
	height: 3.33em;
	border: 1px solid rgb(150 150 150);
	border-radius: 15px;
	background: #fff;
	padding: 0 16px;
	font-size: 16px;
	color: #2e2e2e;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 15px;
	transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.calc-unit-trigger:hover {
	border-color: #7f7f7f;
}

.calc-unit-trigger:focus-visible {
	outline: none;
	border-color: #2e2e2e;
	box-shadow: 0 0 0 3px rgba(46, 46, 46, 0.10);
}

.calc-unit-trigger-text {
	flex: 1 1 auto;
	text-align: center;
	letter-spacing: 0.05em;
}

.calc-unit-trigger-icon {
	flex: 0 0 auto;
	width: 10px;
	height: 10px;
	border-right: 2px solid #5f5f5f;
	border-bottom: 2px solid #5f5f5f;
	transform: rotate(45deg) translateY(-1px);
	transition: transform .2s ease;
}

.calc-unit-box.is-open .calc-unit-trigger {
	border-color: #2e2e2e;
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.calc-unit-box.is-open .calc-unit-trigger-icon {
	transform: rotate(-135deg) translate(-1px, -1px);
}

.calc-unit-menu {
	display: none;
	position: absolute;
	left: 0;
	right: 0;
	padding: 8px;
	border: 1px solid rgba(46, 46, 46, 0.12);
	border-radius: 18px;
	background: rgba(255, 255, 255, 0.98);
	box-shadow: 0 18px 45px rgba(0, 0, 0, 0.14);
	backdrop-filter: blur(10px);
	z-index: 15;
	top: 100%;
}

.calc-unit-box.is-open .calc-unit-menu {
	display: grid;
	gap: 6px;
}

.calc-unit-option {
	width: 100%;
	border: 0;
	border-radius: 12px;
	background: transparent;
	padding: 11px 12px;
	font-size: 15px;
	font-weight: 600;
	color: #2e2e2e;
	text-align: center;
	cursor: pointer;
	transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

.calc-unit-option:hover,
.calc-unit-option:focus-visible {
	outline: none;
	background: rgba(46, 46, 46, 0.06);
}

.calc-unit-option.is-size-unit-hint {
	position: relative;
	overflow: hidden;
	background: rgba(46, 46, 46, 0.06);
}

@property --stepmat-unit-mm-hint-angle {
	syntax: '<angle>';
	inherits: false;
	initial-value: 0deg;
}

.calc-unit-option.is-size-unit-hint::after {
	--stepmat-unit-mm-hint-angle: 0deg;
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
	pointer-events: none;
	padding: 2px;
	background: conic-gradient(from 0deg, #5576d1 0deg var(--stepmat-unit-mm-hint-angle), transparent var(--stepmat-unit-mm-hint-angle) 360deg);
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	mask-composite: exclude;
	animation: calcUnitMmHintBorder 1.5s ease-in-out 1 forwards;
}


.calc-unit-box.is-open.is-size-unit-hint-opening .calc-unit-menu {
	animation: calcUnitHintMenuSlide .26s ease-in-out 1 both;
}

@keyframes calcUnitHintMenuSlide {
	from {
		opacity: 0;
		transform: translate3d(0, -6px, 0);
	}

	to {
		opacity: 1;
		transform: translate3d(0, 0, 0);
	}
}

@keyframes calcUnitMmHintBorder {
	from {
		--stepmat-unit-mm-hint-angle: 0deg;
	}

	to {
		--stepmat-unit-mm-hint-angle: 360deg;
	}
}

.calc-unit-option.is-selected {
	background: #5576d1;
	color: #fff;
}

.calc-step {
	display: none;
}

.calc-step.is-active {
	display: block;
}

.calc-grid {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 15px;
}

.calc-radio {
	display: flex;
	flex-direction: column;
	gap: 3px;
	text-align: left;
	margin-bottom: -5px;
}

.calc-radio label {
    position: relative;
    background: #fff;
    padding: 21px 25px;
    outline: none;
    color: #2e2e2e;
    font-size: clamp(16px, 1.9vw, 18px);
    font-weight: 300;
    text-transform: none;
    margin: 0px 0px 5px 0px;
    display: flex;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 3px 10px #2e2e2e10;
    border-radius: 15px;
    gap: 8px;
    border: 1px solid #2e2e2e10;
}

.calc-radio label:hover {
	box-shadow: 0 3px 10px #2e2e2e20;
	border: 1px solid #2e2e2e20;
}

.calc-step[data-step="1"] .calc-radio label {
	padding: 21px 45px 21px 10px;
}

.calc-step[data-step="4"] .calc-radio label:hover {
	box-shadow: 0 3px 10px #2e2e2e10;
	border: 1px solid #2e2e2e10;
}

.calc-radio label:has(input[type="radio"]:checked) {
	background: #5576d1;
	color: #fff;
}

.calc-radio input {
	margin-top: 4px;
}

/* Раскупленный цвет можно выбрать для просмотра фото, но не для оформления заказа. */
.calc-step[data-step="2"] #calcColors label.is-unavailable,
.calc-step[data-step="2"] #calcColors label.is-unavailable:hover {
    background: #ffffff80;
    color: #2e2e2e80;
    border-color: #2e2e2e10;
    box-shadow: 0 3px 10px #2e2e2e10;
}
.calc-step[data-step="2"] #calcColors .calc-color-sold-out {
    margin-left: auto;
    color: #5576d1;
    font-size: 14px;
    font-weight: 300;
    white-space: nowrap;
}


.calc-steps {
	max-width: 900px;
	margin: 0 auto;
}

.calc-scenario-grid {
	display: grid;
	grid-template-columns: repeat(2, 444px);
	gap: 16px;
	justify-content: center;
}

.calc-scenario-card {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 16px;
	padding: 24px 40px;
	background: #fff;
	min-height: 250px;
	text-align: left;
	box-shadow: 0 3px 10px #2e2e2e10;
	border-radius: 15px;
	border: 1px solid #2e2e2e10;
}

.calc-scenario-card-bottom {
	grid-column: 1 / -1;
}

.calc-scenario-card__title {
	color: #2e2e2e;
	font-size: 24px;
	font-weight: 400;
	line-height: 1.25;
}

.calc-scenario-card__text {
	color: rgba(46, 46, 46, 0.72);
	font-weight: 300;
	line-height: 1.6;
	font-size: clamp(16px, 1.9vw, 20px);
}

.calc-scenario-card .link-underline {
	display: inline-block;
	width: fit-content;
}

.calc-scenario-card__button {
	align-self: flex-start;
	margin-top: auto;
	height: auto;
}


.calc-progress {
	display: flex;
	gap: 10px;
	align-items: center;
	margin: 0 0 5px 0;
}

.calc-progress .bar {
	flex: 1;
	height: 5px;
	background: #2e2e2e50;
	border-radius: 999px;
	overflow: hidden;
}

.calc-progress .bar>i {
	display: block;
	height: 100%;
	width: 0%;
	background: #2e2e2e;
	transition: width .25s ease;
}

/* Панель серверной корзины калькулятора: не показывается на сценарном экране. */

.calc-cart-toolbar {
	position: fixed;
	top: 28px;
	right: 24px;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 10px;
	margin: 0;
	z-index: 1100;
}

.calc-cart-toolbar__menu-button {
	display: none;
}

.calc-cart-toolbar__menu-panel {
	display: contents;
}

.calc-cart-toolbar.calc-hidden {
	display: none;
}

.calc-cart-toolbar__button {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-direction: row-reverse;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 1px solid #2e2e2e20;
	background: #fff;
	color: #2e2e2e;
	border-radius: 14px;
	cursor: pointer;
	box-shadow: 0 4px 14px #2e2e2e12;
	transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease, opacity .2s ease;
}

.calc-cart-toolbar__button:hover,
.calc-cart-toolbar__button:focus-visible {
	border-color: #5576d140;
	box-shadow: 0 5px 16px #5576d126;
	transform: translateY(-1px);
	outline: none;
}

.calc-cart-toolbar__button:disabled {
	opacity: .45;
	cursor: default;
	transform: none;
}

.calc-cart-toolbar__icon-wrap {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	border-radius: inherit;
}

.calc-cart-toolbar__icon {
	display: block;
	width: 28px;
	height: 28px;
}

.calc-cart-toolbar__label {
	position: absolute;
	right: calc(100% + 10px);
	top: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;
	white-space: nowrap;
	font-size: 16px;
	font-weight: 300;
	color: #2f2f2f;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(-50%) translateX(6px);
	transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
}

.calc-cart-toolbar__label {
	isolation: isolate;
}

.calc-cart-toolbar__label-text {
	position: relative;
	z-index: 1;
}

/* В десктопной боковой панели названия не всплывают при наведении.
   В мобильном меню текстовые подписи остаются видимыми как пункты меню. */

/*
 * Единая визуальная подсказка и aria-live-область для действий панели расчёта.
 * Элемент остаётся в DOM постоянно, чтобы экранные дикторы надёжно замечали
 * повторяющиеся сообщения, а JavaScript менял только текст и класс видимости.
 */
.calc-cart-toast {
	position: fixed;
	left: 50%;
	bottom: 24px;
	transform: translateX(-50%);
	z-index: 99999;
	max-width: calc(100vw - 32px);
	padding: 9px 14px;
	border-radius: 999px;
	background: #2e2e2e;
	color: #fff;
	font-size: 14px;
	line-height: 1.3;
	text-align: center;
	box-shadow: 0 8px 25px rgba(0, 0, 0, .18);
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s ease;
}

.calc-cart-toast--show {
	opacity: 1;
}

.calc-cart-price-notice {
	margin-bottom: 8px;
	color: #5576d1;
}

.calc-cart-price-notice.calc-hidden {
	display: none;
}

.calc-step.is-leaving,
#finalStage.is-leaving {
	opacity: 0;
	transform: translateY(6px);
	transition: opacity 3.2s ease, transform 3.2s  ease forwards;
}

.calc-step.is-entering,
#finalStage.is-entering {
	animation: calcAnimation 3.2s ease forwards;
}

/* === ДЕСКТОП:высота строки = по ЛЕВОМУ блоку,правый подгоняется под неё === */

.calc-step[data-step="2"] .calc-grid {
	grid-template-columns: 1fr 1fr;
	grid-auto-rows: min-content;
	align-items: start !important;
}

/* Левая ячейка задаёт высоту */

.calc-step[data-step="2"] .calc-grid>div:first-child {
	align-self: stretch;
	min-width: 0;
}

/* Правая ячейка принудительно тянется до высоты левой строки */

.calc-step[data-step="2"] .calc-grid>div:last-child {
	align-self: stretch;
	min-height: 0;
}

/* Превью ровно высота правой ячейки (т.е. высота левой) */

.calc-preview--gallery {
	appearance: none;
	-webkit-appearance: none;
	background: transparent;
	cursor: pointer;
}

.calc-preview-card {
	display: flex;
	flex-direction: column;
	gap: 12px;
	text-align: left;
	border: 0;
	border-radius: 16px;
	padding: 0;
	background: transparent;
	transition: opacity .2s ease, transform .2s ease;
}

.calc-preview-card__label {
	display: block;
	font-size: 15px;
	line-height: 1.35;
	font-weight: 600;
	color: #fff;
}

.calc-preview-card__image-wrap {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	border-radius: 16px;
	overflow: hidden;
}

.calc-preview-card__image {
	display: block;
	max-width: 100%;
	height: auto;
	transition: opacity .2s ease;
}

.calc-preview-card__loading {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	padding: 24px 20px;
	background: rgba(255, 255, 255, .88);
	backdrop-filter: blur(1px);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity .5s ease, visibility .5s ease;
}

.calc-preview-card__loading-watermark {
	position: absolute;
	left: 50%;
	top: 50%;
	width: min(62%, 210px);
	height: min(62%, 210px);
	transform: translate(-50%, -42%);
	background: center / contain no-repeat url("/assets/img/preloader.svg");
	opacity: .12;
	filter: saturate(.8);
}

.calc-preview-card__loading-spinner {
	position: relative;
	z-index: 1;
	width: 74px;
	height: 74px;
	display: flex;
	align-items: center;
	justify-content: center;
	--p: 0;
}

.calc-preview-card__loading-spinner-svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
	transform: rotate(-90deg);
}

.calc-preview-card__loading-spinner-bg {
	fill: none;
	stroke: rgba(85, 118, 209, .18);
	stroke-width: 3;
}

.calc-preview-card__loading-spinner-fg {
	fill: none;
	stroke: #5576d1;
	stroke-width: 3;
	stroke-linecap: round;
	stroke-dasharray: 0 9999;
	stroke-dashoffset: 0;
	transition: stroke-dashoffset .18s ease;
}

.calc-preview-card__loading-pct {
	position: relative;
	z-index: 1;
	font-size: 14px;
	line-height: 1;
	font-weight: 500;
	color: #2e2e2e;
}

.calc-preview-card__loading-title {
	position: relative;
	z-index: 1;
	font-size: 18px;
	line-height: 1.35;
	font-weight: 500;
	color: #2e2e2e;
	text-align: center;
	max-width: 220px;
}

.calc-preview-card__loading-phrase {
	position: relative;
	z-index: 1;
	font-size: 14px;
	line-height: 1.35;
	font-weight: 400;
	color: rgba(46, 46, 46, .64);
	text-align: center;
	max-width: 220px;
}

.calc-preview-card.is-preview-loading .calc-preview-card__loading {
	opacity: 1;
	visibility: visible;
}

.calc-preview-card.is-preview-loading .calc-preview-card__image {
	opacity: 0;
	filter: saturate(.88);
}

.calc-preview-card.is-disabled {
	cursor: default;
	opacity: 1;
}

.calc-preview-card.is-empty .calc-preview-card__label,
.calc-preview-card.is-disabled .calc-preview-card__label {
	color: rgba(255,255,255,.72);
}

.calc-preview-card.is-disabled:focus {
	outline: none;
}

.calc-preview-card__image-wrap {
	flex: 1 1 auto;
	min-height: 0;
}

/* Пустая заглушка превью должна выглядеть как полноценный блок предпросмотра,
   а не как маленький логотип. Поэтому задаём ей отдельный фон и увеличиваем
   сам watermark. */

.calc-preview-card.is-empty .calc-preview-card__image-wrap {
	background: linear-gradient(180deg, #ffffff 0%, #d8dff0 100%);
	border-radius: 15px;
	border: 0;
}

.calc-preview-card.is-empty .calc-preview-card__image {
	width: min(76%, 440px);
	height: auto;
	max-width: 100%;
	max-height: none;
	opacity: 1;
	filter: saturate(.78);
}

.calc-step[data-step="2"] .calc-preview-card .calc-preview-card__image,
.calc-step[data-step="4"] .calc-preview-card .calc-preview-card__image {
	height: auto !important;
	max-height: 100%;
	object-fit: contain;
}

.calc-step[data-step="4"] .calc-preview-card .calc-preview-card__image {
	width: 58%;
}

.calc-step[data-step="4"] .calc-radio label {
	cursor: default;
}

.calc-step[data-step="4"] .calc-summary-money-card {
    flex-direction: column;
    line-height: 24px;
    overflow: visible;
    position: relative;
    background: #fff;
    padding: 21px 25px;
    outline: none;
    color: #2e2e2e;
    font-size: clamp(16px, 1.9vw, 18px);
    font-weight: 300;
    text-transform: none;
    margin: 0px 0px 5px 0px;
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    box-shadow: 0 3px 10px #2e2e2e10;
    border-radius: 15px;
    gap: 8px;
    border: 1px solid #2e2e2e10;
    justify-content: center;
}

.calc-step[data-step="4"] .calc-summary-money-row {
	display: flex;
	align-items: center;
	gap: 5px;
	min-height: 24px;
	white-space: nowrap;
}

.calc-step[data-step="4"] .calc-summary-money-row h3 {
	margin-bottom: 5px;
	font-size: clamp(18px, 1.3vw, 21px);
}

.calc-step[data-step="4"] .calc-summary-money-row span {
	margin-left: 12px;
}

.calc-step[data-step="4"] .calc-summary-money-old-price {
    opacity: .7;
    text-decoration: line-through;
    white-space: nowrap;
    color: red;
}

.calc-step[data-step="4"] .calc-summary-money-row span.calc-summary-benefit-help {
	position: relative;
	display: inline-flex;
	align-items: center;
	margin-left: 1px;
}

.calc-step[data-step="4"] .calc-summary-money-total {
    flex: 1 1 auto;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    margin: 5px 0 0;
    padding: 15px 0;
    border-top: 1px solid #d2d2d3;
}

.calc-step[data-step="4"] .calc-summary-money-total h3 {
    margin: 0;
    line-height: 1.2;
}

.calc-step[data-step="4"] .calc-summary-money-card:has(.calc-summary-money-total) {
    padding-bottom: 0;
}

.calc-step[data-step="4"] .calc-summary-benefit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.calc-step[data-step="4"] .calc-summary-benefit-button:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.calc-step[data-step="4"] .calc-summary-benefit-tooltip {
    position: absolute;
    right: auto;
    left: 0;
    bottom: calc(100% + 8px);
    z-index: 20;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    width: max-content;
    max-width: min(360px, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
    overflow-x: hidden;
    overflow-y: auto;
    padding: 15px 20px;
    border: 1px solid rgba(46, 46, 46, .08);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(46, 46, 46, .22);
    color: #2e2e2e;
    font-size: 14px;
    font-weight: 300;
    line-height: 20px;
    white-space: normal;
    overflow-wrap: anywhere;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.calc-step[data-step="4"] .calc-summary-benefit-tooltip span {
    margin-left: 0;
}

.calc-step[data-step="4"] .calc-summary-benefit-help.is-open .calc-summary-benefit-tooltip {
	opacity: 1;
	visibility: visible;
}

.calc-step[data-step="4"] .calc-summary-benefit-tooltip-row {
	display: block;
}

.calc-step[data-step="4"] .calc-summary-benefit-tooltip-row strong {
	font-weight: 300;
}

.calc-step[data-step="2"] .calc-preview {
	height: 100%;
	min-height: 0 !important;
	width: 75%;
	padding: 0 !important;
	border: 0 !important;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	margin: 0 auto;
}

/* Картинка вписывается в доступную высоту */

.calc-step[data-step="2"] .calc-preview img {
	display: block;
	max-height: 100%;
	max-width: 100%;
	width: auto;
	height: 100%;
	object-fit: contain;
	border-radius: 4px;
}

/* === МОБИЛКА:превью вниз,ширина 100% === */

.calc-step[data-step="3"] .calc-grid {
	grid-template-columns: 1fr 1fr 85px;
}

.calc-step[data-step="4"] .calc-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	grid-auto-rows: min-content;
	align-items: start !important;
}

/* Левая ячейка задаёт высоту */

.calc-step[data-step="4"] .calc-grid>div:first-child {
	align-self: stretch;
	min-width: 0;
}

/* Правая колонка с превью и промокодом */

.calc-step[data-step="4"] .calc-step4-side {
	align-self: stretch;
	min-height: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* Промоблок не должен уезжать вниз, когда слева в summary появляется
	дополнительная строка про промокод. Поэтому на 4 шаге превью не растягиваем
	по остаточной высоте flex-колонки — свободное место остаётся снизу,
	а блок promoCollapse сохраняет своё положение под превью. */

.calc-step[data-step="4"] .calc-preview {
	flex: 0 0 auto;
	min-height: 0 !important;
	width: 100%;
	padding: 0 !important;
	border: 0 !important;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

/* Картинка на 4 шаге сохраняет адаптивную ширину и больше не тянет промоблок вниз */

.calc-step[data-step="4"] .calc-preview img {
	display: block;
	max-width: 100%;
	width: 100%;
	height: auto;
	max-height: none;
	object-fit: contain;
	border-radius: 4px;
}

/* Фотоколлаж шага 4: только плитки, без строки с названием материала и счётчиком.
   Динамические фото получают те же данные, что штатная PhotoSwipe-галерея. */
.calc-step[data-step="4"] .calc-step4-gallery[hidden] {
    display: none !important;
}

.calc-step[data-step="4"] .calc-step4-side.has-step4-gallery > #calcSummaryPreviewCard {
    display: none;
}

.calc-step[data-step="4"] .calc-step4-gallery {
    display: grid;
    width: 100%;
    min-width: 0;
    aspect-ratio: 1;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.calc-step[data-step="4"] .calc-step4-gallery__tile {
    position: relative;
    min-width: 0;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 12px;
    overflow: hidden;
    background: #e3e6ee;
    cursor: pointer;
}

.calc-step[data-step="4"] .calc-step4-gallery__tile--hero {
    grid-column: 1;
    grid-row: 1 / span 2;
}

.calc-step[data-step="4"] .calc-step4-gallery__tile img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.calc-step[data-step="4"] .calc-step4-gallery__tile::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='10' cy='10' r='7'/%3E%3Cpath d='M21 21l-6-6M10 7v6M7 10h6'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 0;
    transition: background-color .25s ease, background-size .25s ease;
}

.calc-step[data-step="4"] .calc-step4-gallery__tile:hover img,
.calc-step[data-step="4"] .calc-step4-gallery__tile:focus-visible img {
    transform: scale(1.07);
}

.calc-step[data-step="4"] .calc-step4-gallery__tile:hover::after,
.calc-step[data-step="4"] .calc-step4-gallery__tile:focus-visible::after {
    background-color: rgba(0, 0, 0, .3);
    background-size: 36px;
}

.calc-step[data-step="4"] .calc-step4-gallery__tile:focus-visible {
    outline: 3px solid #5577d4;
    outline-offset: 2px;
}

.calc-step[data-step="4"] .calc-step4-gallery__hint {
    position: absolute;
    z-index: 1;
    left: 10px;
    bottom: 10px;
    padding: 4px 9px;
    border-radius: 7px;
    background: rgba(20, 22, 30, .55);
    color: #fff;
    font-size: 12px;
    line-height: 1.35;
    pointer-events: none;
}

.calc-step[data-step="4"] .calc-step4-gallery__tile--more::after {
    background-color: rgba(0, 0, 0, .5) !important;
    background-size: 0 !important;
}

.calc-step[data-step="4"] .calc-step4-gallery__count {
    position: absolute;
    z-index: 1;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 26px;
    font-weight: 600;
    line-height: 1.1;
    pointer-events: none;
}

.calc-step[data-step="4"] .calc-step4-gallery__count small {
    font-size: 12px;
    font-weight: 400;
}

/* Для двух фото — две равноценные колонки; три и более — крупный кадр
   слева и два кадра справа. Пустых ячеек не оставляем. */
.calc-step[data-step="4"] .calc-step4-gallery[data-count="2"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr);
}
.calc-step[data-step="4"] .calc-step4-gallery[data-count="2"] .calc-step4-gallery__tile--hero {
    grid-column: 1;
    grid-row: 1;
}

@media (max-width: 653px) {
    .calc-step[data-step="4"] .calc-step4-gallery {
        gap: 6px;
    }
    .calc-step[data-step="4"] .calc-step4-gallery__hint {
        font-size: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .calc-step[data-step="4"] .calc-step4-gallery__tile img,
    .calc-step[data-step="4"] .calc-step4-gallery__tile::after {
        transition: none;
    }
}

.calc-promo-toggle {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 0;
	background: transparent;
	border: 0 !important;
	cursor: pointer;
	transition: color .2s ease, border-color .2s ease;
	position: relative;
	z-index: 1;
	min-height: 49px;
}

.calc-promo-toggle-icon {
	width: 8px;
	height: 8px;
	border-right: 1px solid currentColor;
	border-bottom: 1px solid currentColor;
	transform: rotate(45deg) translateY(-1px);
	transition: transform .25s ease;
	transform-origin: center;
}

/* Анимация перелива только по буквам надписи промокода. */

@keyframes calcPromoTextShine {
	0% {
		background-position: 140% 50%;
	}

	100% {
		background-position: -40% 50%;
	}
}

.calc-promo-box {
	position: relative;
	margin: 0px 10px 20px 15px;
	min-height: 50px;
}

.calc-promo-toggle > span:first-child {
	display: inline-block;
	background-image: radial-gradient(58.46% 135.71% at 100% 0%, rgba(85, 255, 194, 0) 0%, rgba(85, 255, 194, 0.85) 18%, rgba(50, 187, 232, 0.75) 50%, rgba(122, 85, 255, 0.55) 100%);
	background-size: 220% 100%;
	background-position: 140% 50%;
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	animation: calcPromoTextShine 3.2s linear infinite;
}

.calc-promo-box.is-open .calc-promo-toggle-icon {
	transform: rotate(225deg) translateY(-1px);
}

.calc-promo-collapse {
	position: absolute;
	top: 0;
	left: 0;
	right: 20px;
	z-index: 3;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(-8px);
	transition: opacity .28s ease, transform .28s ease, visibility 0s linear .28s;
}

.calc-promo-box.is-open .calc-promo-collapse {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateY(0);
	transition-delay: 0s;
}

.calc-promo-collapse-inner {
	overflow: visible;
}

.calc-input-wrap-promo {
	position: relative;
}

.calc-input-wrap-promo .calc-input {
	padding-right: 75px;
	text-align: left;
	margin-left: 5px;
}

.calc-input-wrap-promo.is-success .calc-input {
    color: #49a44a;
}

.calc-input-wrap-promo.is-error .calc-input {
	color: #fc4a4a;
}


.calc-input-action {
	position: absolute;
	right: 12px;
	top: 50%;
	width: 28px;
	height: 28px;
	transform: translateY(-50%);
	border: 0;
	border-radius: 50%;
	background: #5576d1;
	cursor: pointer;
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s ease, transform .2s ease, background-color .2s ease;
}

.calc-input-action::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 8px;
	height: 8px;
	border-top: 2px solid #fff;
	border-right: 2px solid #fff;
	transform: translate(-65%, -50%) rotate(45deg);
}

.calc-input-wrap-promo.is-can-apply .calc-input-action {
	opacity: 1;
	pointer-events: auto;
}

.calc-input-wrap-promo.is-can-apply .calc-input-action:hover {
	transform: translateY(-50%) scale(1.05);
}

.calc-input-wrap-promo.is-loading .calc-input-action {
	opacity: .8;
	pointer-events: none;
}

/* === МОБИЛКА: превью и промокод в одну колонку === */

.calc-step[data-step="5"] .calc-grid {
	display: grid;
	grid-template-columns: 1.6fr 1fr;
	gap: 15px;
	grid-auto-rows: min-content;
	align-items: start !important;
}

/* Левая ячейка задаёт высоту */

.calc-step[data-step="5"] .calc-grid>div:first-child {
	align-self: stretch;
	min-width: 0;
}

/* Правая ячейка принудительно тянется до высоты левой строки */

.calc-step[data-step="5"] .calc-grid>div:last-child {
	align-self: stretch;
	min-height: 0;
}

/* Превью ровно высота правой ячейки (т.е. высота левой) */

.calc-step[data-step="5"] .calc-preview {
	height: 100%;
	min-height: 0 !important;
	width: 100%;
	padding: 0 !important;
	/* на случай общих стилей */
	border: 0 !important;
	/* на случай общих стилей */
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

/* Картинка вписывается в доступную высоту */

.calc-step[data-step="5"] .calc-preview img {
	display: block;
	max-height: 100%;
	max-width: 100%;
	width: auto;
	height: 100%;
	object-fit: contain;
	border-radius: 5px;
}

/* === МОБИЛКА:превью вниз,ширина 100% === */

.calc-step[data-step="5"] s {
	opacity: 0.5;
}

.calc-step[data-step="5"] .calc-radio label {
	cursor: default;
}

#finalStage[data-step="6"] .calc-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 15px;
	grid-auto-rows: min-content;
	align-items: start !important;
}

.calc-layout-choice-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 15px;
	margin-top: 15px;
	align-items: stretch;
}

.calc-layout-choice-card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	width: 100%;
	padding: 21px 25px;
	border: 1px solid #2e2e2e12;
	border-radius: 15px;
	background: #fff;
	box-shadow: 0 10px 26px rgba(46, 46, 46, .08);
	text-align: left;
	cursor: pointer;
	transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}

.calc-layout-choice-card:hover,
.calc-layout-choice-card:focus-visible {
	border-color: rgba(85, 118, 209, .35);
	box-shadow: 0 14px 34px rgba(46, 46, 46, .12);
	outline: none;
}

.calc-layout-choice-card.is-selected {
	border-color: rgba(85, 118, 209, .20);
	box-shadow: 0 16px 38px rgba(46, 46, 46, .16);
}

.calc-layout-choice-card .file {
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	width: 100%;
}

.calc-layout-choice-card .file__btn {
	width: 100%;
	min-height: 48px;
	min-width: 250px;
}

.calc-layout-choice-card .file__name {
	width: 100%;
	flex: 0 0 auto;
	color: #2e2e2e50;
	line-height: 1.45;
	overflow: visible;
}

.calc-layout-choice-card.is-selected .file__name,
.calc-layout-choice-card.is-selected #layoutInName,
.calc-layout-choice-card.is-selected #layoutNoLayoutName {
	color: #5576d1;
}

.calc-layout-choice-help {
	display: block;
	color: #2e2e2e50;
	font-size: 16px;
	font-weight: 300;
	letter-spacing: .01em;
	line-height: 1.45;
}

input[type="radio"],
input[type="checkbox"] {
	accent-color: #5576d1;
}

.calc-step[data-step="1"] input[type="radio"] {
	visibility: hidden;
}

.calc-step[data-step="2"] input[type="radio"] {
	display: none;
}

.file {
	display: flex;
	align-items: center;
	gap: 15px;
	width: 100%;
	min-width: 0;
	max-width: 100%;
}

.file__input {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
	padding: 0;
}

.file__btn {
	outline: none;
	color: #fff;
	user-select: none;
	font-size: 16px;
	font-weight: 300;
	text-transform: none;
	text-decoration: none;
	letter-spacing: 0.05em;
	background: #5576d1;
	padding: 10px 20px;
	-webkit-border-radius: 7px;
	-moz-border-radius: 0;
	-ms-border-radius: 0;
	-o-border-radius: 0;
	border-radius: 7px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: auto;
	min-width: 0;
	white-space: nowrap;
}

.file__btn:hover {
	filter: brightness(1.1);
}

.file__btn:active {
	transform: translateY(1px);
}

.file__input:focus-visible+.file__btn {
	outline: 2px solid rgb(116 143 217);
	outline-offset: 2px;
}

.file__name {
	color: #2e2e2e;
	font-size: 16px;
	font-weight: 300;
	letter-spacing: 0.05em;
	text-transform: none;
	flex: 1 1 0%;
	width: 0;
	min-width: 0;
	max-width: 100%;
	overflow: hidden;
	display: block;
}

#layoutInName,
#layoutInName a,
#layoutInName span {
	text-align: left;
	color: #2e2e2e50;
	font-weight: 300;
	text-transform: none;
	letter-spacing: 0.01em;
	display: inline-block;
	max-width: 100%;
	vertical-align: top;
	overflow: hidden;
}

.calc-summary {
	font-size: 18px;
	font-weight: 300;
	text-transform: none;
	/* uppercase */
	letter-spacing: 0.05em;
	text-align: left;
	color: #fff;
}

.orderStage .calc-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 15px;
	grid-auto-rows: min-content;
	align-items: start !important;
}

/* Левая ячейка задаёт высоту */

.orderStage .calc-grid>div:first-child {
	align-self: stretch;
	min-width: 0;
}

/* Правая ячейка принудительно тянется до высоты левой строки */

.orderStage .calc-grid>div:last-child {
	align-self: stretch;
	min-height: 0;
}

/* Превью ровно высота правой ячейки (т.е. высота левой) */

.orderStage .calc-preview {
	height: 100%;
	min-height: 0 !important;
	width: 100%;
	padding: 0 !important;
	/* на случай общих стилей */
	border: 0 !important;
	/* на случай общих стилей */
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

/* Картинка вписывается в доступную высоту */

.orderStage .calc-preview img {
	display: block;
	max-height: 100%;
	max-width: 100%;
	width: auto;
	height: 100%;
	object-fit: contain;
	border-radius: 5px;
}

/* === МОБИЛКА:превью вниз,ширина 100% === */

.orderStage s {
	opacity: 0.5;
}

.orderStage .calc-radio label {
	cursor: default;
}

.calc-good {
	color: #fff;
	margin-bottom: 10px;
}

.heading-bold {
	font-weight: 500 !important;
	letter-spacing: 0 !important;
}

.calc-grid-3 {
	display: grid;
	grid-template-columns: 1fr 1fr 180px;
	gap: 14px;
}

.calc-radio-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.calc-card {
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 14px;
	padding: 14px;
	cursor: pointer;
	transition: transform .12s ease, border-color .12s ease, background .12s ease;
	background: rgba(0, 0, 0, 0.15);
}

.calc-card:hover {
	transform: translateY(-1px);
	border-color: rgba(255, 255, 255, 0.35);
}

.calc-card.is-selected {
	border-color: rgba(255, 255, 255, 0.75);
	background: rgba(255, 255, 255, 0.06);
}

.calc-card .t {
	font-weight: 500;
	margin-bottom: 6px;
}

.calc-card .p {
	font-size: 13px;
	opacity: .92;
	line-height: 1.35;
}

.calc-card .price {
	margin-top: 10px;
	font-weight: 500;
}

.calc-card input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.calc-actions {
	flex-wrap: wrap;
	row-gap: 8px;
}

.calc-actions #btnPrev {
	flex: 0 0 calc(40% - 5px);
	min-width: calc(40% - 5px) !important;
}

.calc-actions #btnNext {
	flex: 0 0 calc(60% - 5px);
	min-width: calc(60% - 5px) !important;
}

.calc-actions-hint {
	flex: 0 0 calc(60% - 5px);
	margin: 0 0 0 auto;
	text-align: center;
}

.calc-actions {
	display: flex;
	gap: 10px;
	justify-content: space-between;
	margin-top: 30px;
	align-items: stretch;
}

.calc-actions .the-button {
	user-select: none;
}

.calc-actions .the-button[disabled] {
	opacity: .35;
	pointer-events: none;
}

.calc-color-preview {
	width: 100%;
	border-radius: 14px;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.18);
	background: rgba(0, 0, 0, 0.1);
}

.calc-color-preview img {
	display: block;
	width: 100%;
	height: 240px;
	object-fit: cover;
}

.calc-summary {
	text-align: left;
	font-size: 15px;
	line-height: 1.55;
}

.calc-summary .h {
	font-weight: 800;
	font-size: 18px;
	margin-bottom: 10px;
}

.calc-summary .line {
	margin: 6px 0;
}

.calc-note {
	font-size: 13px;
	opacity: .9;
}

.calc-hidden {
	display: none !important;
}

/* * Иконки материалов в первом шаге калькулятора всегда резервируют одинаковое
 * место слева. Благодаря этому текст в каждой карточке стартует по одной
 * вертикали, даже если у конкретного материала иконки нет. */

.calc-step[data-step="1"] .mat-icons {
	position: absolute;
	width: 28px;
	height: 28px;
	right: 10px;
	top: 8px;
	flex-shrink: 0;
	color: #2e2e2e;
	pointer-events: none;
}

.calc-radio label:has(input[type="radio"]:checked) .mat-icons path {
	fill: #fff;
}

.calc-header--info {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    text-align: left;
}

.calc-header--info .icon-info {
	margin-left: -10px;
    margin-right: 3px;
}

.icon-sale {
    width: 22px;
    height: 22px;
    background-color: #49a44a;
    -webkit-mask: url("../assets/icons/discount.svg") no-repeat center / contain;
    mask: url("../assets/icons/discount.svg") no-repeat center / contain;
    margin-top: -3px;
}


.calc-header-text {
	display: block;
	font-weight: 300;
	line-height: 1.15;
	font-size: clamp(16px, 1.9vw, 18px);
}

/* Адаптив */

@media only screen and (max-width:1200px) {
	.contact-modal-wrapper {
		width: 90%;
	}
}

@media only screen and (max-width:880px) {
	.contact-modal,
	.contact-modal.open {
		width: 100%;
		height: 100%;
		top: 0;
		right: 0;
		bottom: 0;
		left: 0;
	}
}

@media (max-width: 640px) {
	.calc-async-state__inner {
		flex-wrap: wrap;
	}

	.calc-async-state__retry {
		width: 100%;
	}

	.calc-scenario-card {
		padding: 20px;
		border-radius: 18px;
		min-height: 0;
	}
}

@media (min-width:654px) {
	.calc-unit-box label[for="unit_in"] {
		visibility: hidden;
	}

	.calc-unit-box .calc-unit-native {
		position: absolute;
		opacity: 0;
		pointer-events: none;
		inset: 0;
	}

	.calc-unit-custom {
		display: block;
	}
}

@media (max-width:640px) {
	.calc-grid {
		grid-template-columns: 1fr;
	}

	#finalStage[data-step="6"] .calc-grid {
		grid-template-columns: 1fr;
	}

	.calc-layout-choice-grid {
		grid-template-columns: 1fr;
	}

	.calc-layout-choice-card {
		padding: 22px 18px;
	}
}

@media (max-width: 820px) {
	.calc-scenario-grid {
		grid-template-columns: 1fr;
	}

	.calc-scenario-card {
		min-height: 0;
	}
}

@media (max-width: 1180px), (hover: none), (pointer: coarse) {
	#sectionHeading {
		width: 75%;
		max-width: 75%;
		margin-left: auto;
		margin-right: auto;
		text-align: center;
	}

	.calc-cart-toolbar {
		position: fixed;
		top: 43px;
		right: 5vw;
		display: block;
		z-index: 1100;
	}

	.calc-cart-toolbar.calc-hidden {
		display: none;
	}

	.calc-cart-toolbar__menu-button {
		display: inline-flex;
		width: 44px;
		height: 44px;
		border: 0;
		border-radius: 50%;
		background: transparent;
		box-shadow: none;
		color: #000;
	}

	.calc-cart-toolbar__menu-button:hover,
	.calc-cart-toolbar__menu-button:focus-visible {
		border-color: transparent;
		box-shadow: none;
		transform: none;
	}

	.calc-cart-toolbar__menu-button .calc-cart-toolbar__icon-wrap,
	.calc-cart-toolbar__menu-button .calc-cart-toolbar__icon {
		width: 30px;
		height: 30px;
		margin: 0;
	}

	.calc-cart-toolbar__menu-button svg {
		display: block;
		width: 30px;
		height: 30px;
		fill: currentColor;
	}

	.calc-cart-toolbar__menu-panel {
		position: absolute;
		top: calc(100% - 5px);
		right: 0;
		display: flex;
		flex-direction: column;
		width: min(70vw, 360px);
		min-width: 270px;
		background: #fff;
		border: 1px solid #2e2e2e20;
		border-radius: 15px;
		box-shadow: 0 4px 12px #2e2e2e20;
		overflow: hidden;
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
		transform: translateY(-8px) scaleY(.92);
		transform-origin: top center;
		transition: transform .28s ease, opacity .22s ease, visibility 0s linear .28s;
	}

	.calc-cart-toolbar.is-open .calc-cart-toolbar__menu-panel {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
		transform: translateY(0) scaleY(1);
		transition-delay: 0s;
	}

	.calc-cart-toolbar__menu-panel .calc-cart-toolbar__button {
		width: 100%;
		height: auto;
		min-height: 60px;
		padding: 16px 24px;
		justify-content: flex-end;
		gap: 8px;
		border: 0;
		border-radius: 0;
		background: #fff;
		box-shadow: none;
		transform: none;
	}

	.calc-cart-toolbar__menu-panel .calc-cart-toolbar__button + .calc-cart-toolbar__button {
		border-top: 1px solid #2e2e2e20;
	}

	.calc-cart-toolbar__menu-panel .calc-cart-toolbar__button:hover,
	.calc-cart-toolbar__menu-panel .calc-cart-toolbar__button:focus-visible {
		border-color: transparent;
		box-shadow: none;
		transform: none;
		filter: brightness(1);
	}

	.calc-cart-toolbar__menu-panel .calc-cart-toolbar__icon-wrap {
		width: calc(clamp(16px, 1.9vw, 18px) * 2);
		height: calc(clamp(16px, 1.9vw, 18px) * 2);
		flex: 0 0 calc(clamp(16px, 1.9vw, 18px) * 2);
		margin: 0;
	}

	.calc-cart-toolbar__menu-panel .calc-cart-toolbar__icon {
		width: calc(clamp(16px, 1.9vw, 18px) * 2);
		height: calc(clamp(16px, 1.9vw, 18px) * 2);
	}

	.calc-cart-toolbar__menu-panel .calc-cart-toolbar__icon svg {
		display: block;
		width: 100%;
		height: 100%;
	}

	.calc-cart-toolbar__menu-panel .calc-cart-toolbar__label {
		position: static;
		display: inline-flex;
		align-items: center;
		justify-content: flex-start;
		font-size: clamp(16px, 1.9vw, 18px);
		font-weight: 300;
		line-height: 1.15;
		color: #2e2e2e;
		white-space: nowrap;
		opacity: 1;
		visibility: visible;
		pointer-events: none;
		transform: none;
		transition: none;
	}

	.calc-cart-toolbar__menu-panel .calc-cart-toolbar__label-text {
		position: static;
		z-index: auto;
	}
}

@media (max-width: 430px) {
	.calc-cart-toolbar__menu-panel {
		width: calc(90vw - 10px);
		min-width: 0;
	}

	.contact-modal-closer {
		left: 37px;
		top: 51px;
	}
}

@media (max-width:653px) {
	.calc-preview-card__label {
		font-size: 14px;
	}

	.calc-preview-card__loading-spinner {
		width: 68px;
		height: 68px;
	}

	.calc-preview-card__loading-title {
		font-size: 16px;
		max-width: 200px;
	}

	.calc-preview-card__loading-phrase {
		font-size: 13px;
		max-width: 200px;
	}

	.calc-step[data-step="2"] .calc-grid {
		grid-template-columns: 1fr;
		grid-auto-rows: auto;
		align-items: stretch;
	}

	/* На мобильной версии резервируем для превью такую же высоту,
	   как у карточки с загруженным фото выбранного цвета. */

	.calc-step[data-step="2"] .calc-preview {
		min-height: auto;
		overflow: visible;
	}

	.calc-step[data-step="2"] .calc-preview-card__image-wrap {
		aspect-ratio: 3 / 4;
		min-height: 340px;
	}

	.calc-step[data-step="2"] .calc-preview img {
		width: 100%;
		height: auto;
		max-height: none;
	}

	.calc-step[data-step="3"] .calc-grid {
		grid-template-columns: 1fr;
		grid-auto-rows: auto;
		align-items: stretch;
		transform: translate3d(0, var(--calc-step3-keyboard-offset, 0px), 0);
		transition: transform 240ms ease-out;
	}

	.calc-step[data-step="3"] .calc-grid.is-keyboard-lifted {
		will-change: transform;
	}

	.calc-step[data-step="3"] .calc-preview {
		min-height: 255px;
		overflow: visible;
	}

	.calc-step[data-step="3"] .calc-preview img {
		width: 100%;
		height: auto;
		max-height: none;
	}

	.calc-step[data-step="4"] .calc-grid {
		grid-template-columns: 1fr;
		grid-auto-rows: auto;
		align-items: stretch;
	}

	.calc-step[data-step="4"] .calc-preview {
		min-height: 255px;
		overflow: visible;
	}

	.calc-step[data-step="4"] .calc-preview img {
		width: 100%;
		height: auto;
		max-height: none;
	}

	.calc-step[data-step="5"] .calc-grid {
		grid-template-columns: 1fr;
		grid-auto-rows: auto;
		align-items: stretch;
	}

	.calc-step[data-step="5"] .calc-preview {
		min-height: 255px;
		overflow: visible;
	}

	.calc-step[data-step="5"] .calc-preview img {
		width: 100%;
		height: auto;
		max-height: none;
	}

	.orderStage .calc-grid {
		grid-template-columns: 1fr;
		grid-auto-rows: auto;
		align-items: stretch;
	}

	.orderStage .calc-preview {
		min-height: 255px;
		overflow: visible;
	}

	.orderStage .calc-preview img {
		width: 100%;
		height: auto;
		max-height: none;
	}

	.calc-step[data-step="4"] .calc-summary-money-card {
		font-size: 16px;
	}

}

@media (max-width:653px) and (prefers-reduced-motion: reduce) {
	.calc-step[data-step="3"] .calc-grid {
		transition-duration: 0.01ms;
	}
}

@media only screen and (max-width: 575px) {
	/* На узких экранах переносим имя файла под кнопку, чтобы не ломать ширину блока. */

	.file {
		flex-wrap: wrap;
		align-items: stretch;
		gap: 12px;
	}

	.file__btn {
		width: 100%;
	}

	.file__name {
		flex: 1 1 100%;
	}
}

@media (max-width:991px) {
	.calc-grid-3 {
		grid-template-columns: 1fr;
	}

	.calc-color-preview img {
		height: 200px;
	}
}

@media (max-width:767px) {
	.calc-radio-grid {
		grid-template-columns: 1fr;
	}
}


/* Сетка шага 4: один ряд для двух колонок, включая карточку скидки произвольной высоты.
   На узкой сетке <=653 px продолжаем штатную последовательность сверху вниз. */
@media (min-width: 654px) {
    .calc-step[data-step="4"] .calc-grid {
        grid-auto-rows: auto;
        align-items: stretch !important;
    }
    .calc-step[data-step="4"] .calc-grid > div:first-child {
        display: flex;
        flex-direction: column;
        min-width: 0;
    }
    .calc-step[data-step="4"] #calcSummary {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        gap: 10px;
        margin: 0;
    }
    .calc-step[data-step="4"] #calcSummary > label {
        flex: 1 1 auto;
        margin: 0;
    }
    .calc-step[data-step="4"] #calcSummary .calc-summary-money-card {
        flex: 1 0 auto;
        margin: 0;
    }
    .calc-step[data-step="4"] .calc-grid > div:first-child > .inner-divider-post {
        display: none;
    }
    .calc-step[data-step="4"] .calc-step4-side {
        height: 100%;
    }
    .calc-step[data-step="4"] .calc-step4-gallery:not([hidden]) {
        aspect-ratio: auto;
        height: 100%;
        flex: 1 1 auto;
        min-height: 0;
    }
    /* При 0–1 фото старое превью должно занять весь ряд без фиксированной высоты. */
    .calc-step[data-step="4"] .calc-step4-side:not(.has-step4-gallery) {
        position: relative;
    }
    .calc-step[data-step="4"] .calc-step4-side:not(.has-step4-gallery) > #calcSummaryPreviewCard {
        position: absolute;
        inset: 0;
        height: 100%;
        width: 100%;
        flex: 1 1 auto;
    }
}

/* Окна копирования и промокода принадлежат текущему калькулятору, а не новому сайту. */
.calc-cart-dialog[hidden] { display: none !important; }
.calc-cart-dialog {
    position: fixed;
    z-index: 1250;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    box-sizing: border-box;
}
.calc-cart-dialog__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(18, 24, 37, .48);
}
.calc-cart-dialog__panel {
    position: relative;
    width: min(100%, 440px);
    max-height: min(85dvh, 750px);
    overflow: auto;
    box-sizing: border-box;
    padding: 30px 28px;
    border-radius: 18px;
    background: #fff;
    color: #2e2e2e;
    box-shadow: 0 18px 50px rgba(20, 30, 55, .22);
}
.calc-cart-dialog__panel h2 {
    font-size: clamp(22px, 3vw, 27px);
    line-height: 1.25;
    font-weight: 500;
    color: #5576d1;
    margin: 0 40px 10px 0;
}
.calc-cart-dialog__intro {
    margin: 0 0 22px;
    font-size: 15px;
    line-height: 1.5;
    color: #555;
}
.calc-cart-dialog__close {
    position: absolute;
    top: 15px;
    right: 16px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
    color: #2e2e2e;
    font-size: 30px;
    cursor: pointer;
}

.calc-cart-dialog__preview {
    padding: 18px;
    border-radius: 12px;
    background: #f5f6f9;
    color: #2e2e2e;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    margin: 0 0 22px;
}
.calc-cart-dialog__action {
    width: 100%;
    min-height: 49px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}
/* Поле промокода единственное в DOM; прежнюю раскрывающуюся кнопку скрываем только в новом окне. */
#calcCartPromoDialog .calc-promo-box {
    margin: 0;
    min-height: 0;
}
#calcCartPromoDialog #promoToggleBtn { display: none; }
#calcCartPromoDialog #promoCollapse {
    position: static;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    transition: none;
}
#calcCartPromoDialog .calc-input-wrap-promo .calc-input {
    width: 100%;
    margin: 0;
    box-sizing: border-box;
}
/* Минимальная высота и отступы подсказки промокода. */
#calcCartPromoDialog #promoMessage {
    display: block;
    box-sizing: border-box;
    width: calc(100% - 10px);
    min-height: 20px;
    margin: 8px 5px 0;
    font-size: 14px;
    line-height: 1.35;
}
#calcCartPromoDialog #promoMessage[hidden] {
    display: block !important;
    visibility: hidden;
}
#calcCartPromoDialog .calc-help-gradient { max-width: 100%; overflow-wrap: anywhere; }
@media (max-width: 653px) {
    .calc-cart-dialog__panel { padding: 25px 20px; }
}
