.lift {
	--accent: #3a8ed8;
	--text: #333;
	--title: #000;
	--bg: #eee;
	--border: #ddd;
	--gray: #666;
	--gap--l: 20px;
	--gap: 20px;
	--gap--s: 10px;
	--shadow: 0 5px 10px rgba(0, 0, 0, 0.25);
	--preview-width: 280px;
	--max-width: 480px;
	--p: 10px;
	--r: 6px;
	--fs-text: 16px;
	--fs-title: 20px;
	font-size: var(--fs-text);
}
@media screen and (min-width: 768px) {
	.lift {
		--preview-width: 280px;
		--gap--l: 40px;
	}
}
@media screen and (min-width: 1200px) {
	.lift {
		--preview-width: 480px;
	}
}

.lift-calculator {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--gap--l);
	margin: var(--gap--l) auto;
}

@media screen and (min-width: 768px) {
	.lift-calculator {
		grid-template-columns: var(--preview-width) 1fr;
	}
}

.lift-calculator .lift-preview {
	position: relative;
	width: 100%;
	aspect-ratio: 1080/1980;
	max-height: 60vh;
}

@media screen and (min-width: 768px) {
	.lift-calculator .lift-preview {
		position: -webkit-sticky;
		position: sticky;
		top: 140px;
		max-height: calc(100vh - 150px);
	}
}

.lift-calculator .lift-preview img.layer {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	-o-object-fit: contain;
	object-fit: contain;
	pointer-events: none;

	opacity: 1;
	transition: opacity 0.15s ease;
}

.lift-calculator .lift-controls {
	display: flex;
	flex-direction: column;
	gap: var(--gap);
	padding: 0;
}

.lift-calculator .lift-controls > * {
	display: flex;
	flex-direction: column;
	gap: var(--gap);
}

.lift-calculator #controls .controls-title {
	font-size: var(--fs-title);
	font-weight: bold;
	padding: var(--p);
	background: var(--bg);
	border-radius: var(--r);
}

.lift-calculator .gallery {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--gap--s);
}

@media screen and (min-width: 768px) {
	.lift-calculator .gallery {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media screen and (min-width: 1200px) {
	.lift-calculator .gallery {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}
}

.lift-calculator .gallery.buttons {
	display: flex;
	flex-wrap: wrap;
}

.lift-calculator .gallery .option {
	cursor: pointer;
	border: 2px solid transparent;
	border-radius: var(--r);
	padding: var(--r);
	text-align: center;
	transition: border-color 0.3s;
}

.lift-calculator .gallery .option.active {
	border-color: var(--accent);
}

.lift-calculator .gallery .option:not(.active):hover {
	border-color: var(--border);
}

.lift-calculator .gallery .option img {
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	-o-object-fit: contain;
	object-fit: contain;
	display: block;
}

.checkbox {
	display: flex;
	align-items: center;
	gap: var(--gap--s);
	cursor: pointer;
	font-family: inherit;
}

/* скрываем стандартный чекбокс */
.checkbox input[type="checkbox"] {
	-moz-appearance: none;
	appearance: none;
	-webkit-appearance: none;
	width: 44px;
	height: 24px;
	background: #d1d5db;
	border-radius: 999px;
	position: relative;
	cursor: pointer;
	transition: background 0.25s;
}

/* кружок */
.checkbox input[type="checkbox"]::before {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	background: white;
	border-radius: 50%;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
	transition: transform 0.25s;
}

/* состояние включено */
.checkbox input[type="checkbox"]:checked {
	background: var(--accent);
}

.checkbox input[type="checkbox"]:checked::before {
	transform: translateX(20px);
}

/* текст */
.checkbox span {
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

/* === Общие настройки формы === */
.lift-form {
	max-width: var(--max-width);
	margin: var(--gap--l) auto;
}

/* Контейнер CF7 */
.lift-form .wpcf7 {
	width: 100%;
	padding: var(--gap--l);
	border-radius: var(--r);
	background-color: var(--bg);
}

/* Поля */
.lift-form input[type="date"],
.lift-form input[type="email"],
.lift-form input[type="number"],
.lift-form input[type="password"],
.lift-form input[type="search"],
.lift-form input[type="tel"],
.lift-form input[type="text"],
.lift-form input[type="url"],
.lift-form textarea,
.lift-form select {
	width: 100%;
	padding: var(--p);
	border: 1px solid var(--border);
	border-radius: var(--r);
	font-size: var(--fs-text);
	transition: 0.2s;
	box-sizing: border-box;
}

.lift-form .wpcf7-form p:has(.wpcf7-validates-as-required) label::after {
	content: " *";
	color: var(--accent, #e11d48);
	font-weight: 600;
}

/* Фокус */
.lift-form input:focus,
.lift-form textarea:focus,
.lift-form select:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.15);
	box-shadow: 0 0 5px var(--accent);
}

/* Кнопка */
/*
.lift-form input[type="submit"],
.lift-form button {
	background: var(--accent);
	color: #fff;
	border: none;
	padding: var(--p);
	border-radius: var(--r);
	cursor: pointer;
	transition: 0.2s;
	font-weight: bold;
	width: 100%;
}
.lift-form input[type="submit"]:hover {
	opacity: 0.9;
}
*/

/* === Поле конфигурации (textarea lift_config) === */

/* делаем визуально неактивным */
.lift-form textarea[name="lift_config"] {
	opacity: 0.5;
	pointer-events: none;
	resize: none;
	/* display: none !important; */
}

.lift-total-card {
	background: #fff;
	border-radius: var(--r);
	padding: var(--p);

	box-shadow: var(--shadow);
	border: 1px solid var(--border);

	display: flex;
	justify-content: space-between;
	align-items: center;
}

.lift-total-label {
	font-size: var(--fs-text);
	color: var(--gray);
}

.lift-total-value {
	font-size: var(--fs-title);
	font-weight: bold;
	color: var(--accent, #4f46e5);
}

/* ===== Плавающая панель суммы ===== */

.lift-total-bar {
	position: fixed;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	z-index: 9999;

	width: 100%;
	max-width: var(--max-width);
	padding: 0 var(--gap--l) var(--gap--l);
	box-sizing: border-box;
}

.lift-total-inner {
	background: var(--accent);
	border-radius: var(--r);
	padding: var(--p);

	display: flex;
	justify-content: space-between;
	align-items: center;

	box-shadow: var(--shadow);
}

.lift-total-label {
	font-size: var(--fs-text);
	color: var(--bg);
}

.lift-total-value {
	font-size: var(--fs-title);
	font-weight: bold;
	color: var(--bg);
}

.wpcf7 p,
.wpcf7 div {
	position: relative;
}
.wpcf7-spinner {
	position: absolute;
	top: 50%;
	right: 0;
	margin-top: -12px;
}
