.shop-popup-form,
.shop-popup-form *,
.shop-popup-form *:before,
.shop-popup-form *:after {
	box-sizing: border-box;
}

.shop-popup-form[hidden] {
	display: none;
}

.shop-popup-form {
	--shop-popup-accent: var(--theme_color_main, #37544f);
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.shop-popup-form__overlay {
	position: absolute;
	inset: 0;
	background: rgba(1, 1, 1, 0.58);
}

.shop-popup-form__dialog {
	position: relative;
	z-index: 1;
	width: min(100%, 980px);
	max-height: calc(100vh - 48px);
	overflow: hidden;
	background: #fff;
	color: var(--color-text-1, #010101);
	border-radius: 8px;
	box-shadow: 0 24px 80px rgba(1, 1, 1, 0.22);
}

.shop-popup-form__close {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 3;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.88);
	color: var(--shop-popup-accent);
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

.shop-popup-form__close:hover,
.shop-popup-form__close:focus {
	background: #fff;
}

.shop-popup-form__layout {
	display: grid;
	grid-template-columns: minmax(280px, 36%) minmax(0, 1fr);
	min-height: 520px;
}

.shop-popup-form__brand {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-height: 520px;
	padding: 42px 38px;
	overflow: hidden;
	background: var(--shop-popup-accent);
	color: #fff;
}

.shop-popup-form__brand:before {
	content: "";
	position: absolute;
	inset: auto -80px -60px -80px;
	height: 230px;
	background:
		linear-gradient(105deg, transparent 0 28%, rgba(255, 255, 255, 0.18) 28% 29%, transparent 29% 45%, rgba(255, 255, 255, 0.18) 45% 46%, transparent 46%),
		repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 54px),
		repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.1) 0 1px, transparent 1px 44px);
	opacity: 0.55;
	transform: rotate(-4deg);
}

.shop-popup-form__logo,
.shop-popup-form__brand-copy,
.shop-popup-form__contact-note,
.shop-popup-form__contacts {
	position: relative;
	z-index: 1;
}

.shop-popup-form__logo {
	width: 100%;
	height: auto;
}

.shop-popup-form__brand-copy {
	max-width: 280px;
	margin-top: auto;
	margin-bottom: 38px;
	font-size: 32px;
	font-weight: 600;
	line-height: 1.12;
}

.shop-popup-form__contact-note {
	margin-bottom: 16px;
	color: rgba(255, 255, 255, 0.78);
	font-size: 15px;
	line-height: 1.4;
}

.shop-popup-form__contacts {
	display: flex;
	gap: 14px;
}

.shop-popup-form__contact {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 54px;
	height: 54px;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.92);
	color: var(--shop-popup-accent);
	font-size: 22px;
	text-decoration: none;
	transition: background 0.15s ease;
}

.shop-popup-form__contact:hover,
.shop-popup-form__contact:focus {
	background: #fff;
	color: var(--shop-popup-accent);
	text-decoration: none;
}

.shop-popup-form__content {
	min-width: 0;
	max-height: calc(100vh - 48px);
	overflow: auto;
	padding: 52px 58px;
}

.shop-popup-form__step {
	display: none;
}

.shop-popup-form__step--active {
	display: block;
}

.shop-popup-form__title {
	margin: 0 38px 28px 0;
	color: #1c2422;
	font-size: 38px;
	font-weight: 600;
	line-height: 1.12;
}

.shop-popup-form__description {
	margin: -14px 0 24px;
	color: rgba(1, 1, 1, 0.66);
	font-size: 16px;
	line-height: 1.5;
}

.shop-popup-form__choices {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.shop-popup-form__choice {
	display: grid;
	grid-template-columns: 54px minmax(0, 1fr);
	align-items: center;
	width: 100%;
	min-height: 78px;
	border: 1px solid rgba(55, 84, 79, 0.18);
	border-radius: 8px;
	padding: 14px 18px;
	background: #f7faf9;
	color: #1c2422;
	text-align: left;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.shop-popup-form__choice:hover,
.shop-popup-form__choice:focus,
.shop-popup-form__choice--active {
	border-color: var(--shop-popup-accent);
	background: #fff;
}

.shop-popup-form__choice-number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 8px;
	background: var(--shop-popup-accent);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
}

.shop-popup-form__choice-text {
	min-width: 0;
	font-size: 20px;
	font-weight: 500;
	line-height: 1.25;
	overflow-wrap: anywhere;
}

.shop-popup-form__back {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 20px;
	border: 0;
	background: transparent;
	color: var(--shop-popup-accent);
	font-size: 15px;
	font-weight: 500;
	padding: 0;
	cursor: pointer;
}

.shop-popup-form__back:before {
	content: "<";
	font-size: 18px;
	line-height: 1;
}

.shop-popup-form__back:hover,
.shop-popup-form__back:focus {
	color: #1c2422;
	text-decoration: underline;
}

.shop-popup-form__form {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

.shop-popup-form__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0;
	color: #1c2422;
	font-size: 14px;
	line-height: 1.35;
}

.shop-popup-form__field--textarea,
.shop-popup-form__field--checkbox,
.shop-popup-form__message,
.shop-popup-form__submit {
	grid-column: 1 / -1;
}

.shop-popup-form__field--checkbox {
	flex-direction: row;
	align-items: flex-start;
	gap: 10px;
}

.shop-popup-form__field--checkbox input {
	width: 18px;
	height: 18px;
	margin-top: 2px;
	flex: 0 0 auto;
}

.shop-popup-form__field input,
.shop-popup-form__field textarea,
.shop-popup-form__field select {
	width: 100%;
	border: 1px solid rgba(55, 84, 79, 0.22);
	border-radius: 8px;
	padding: 12px 13px;
	background: #f7faf9;
	color: inherit;
	font: inherit;
}

.shop-popup-form__field textarea {
	resize: vertical;
}

.shop-popup-form__field input:focus,
.shop-popup-form__field textarea:focus,
.shop-popup-form__field select:focus {
	outline: 2px solid var(--shop-popup-accent);
	outline-offset: 1px;
	background: #fff;
}

.shop-popup-form__honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.shop-popup-form__message {
	min-height: 20px;
	font-size: 14px;
	line-height: 1.4;
	color: var(--shop-popup-accent);
}

.shop-popup-form__message--error {
	color: #b42318;
}

.shop-popup-form__submit {
	width: 100%;
	border-radius: 8px;
}

.shop-popup-form-open {
	overflow: hidden;
}

@media (max-width: 991px) {
	.shop-popup-form__layout {
		grid-template-columns: 1fr;
		min-height: 0;
	}

	.shop-popup-form__brand {
		min-height: 220px;
		padding: 30px 28px;
	}

	.shop-popup-form__brand-copy {
		margin: 36px 0 22px;
		font-size: 26px;
	}

	.shop-popup-form__content {
		max-height: none;
		padding: 36px 28px;
	}

	.shop-popup-form--step-form .shop-popup-form__brand {
		display: none;
	}

	.shop-popup-form--step-form .shop-popup-form__close {
		background: #f7faf9;
		color: var(--shop-popup-accent);
	}
}

@media (max-width: 575px) {
	.shop-popup-form {
		align-items: flex-end;
		padding: 0;
	}

	.shop-popup-form__dialog {
		width: 100%;
		max-height: 90vh;
		overflow: auto;
		border-radius: 20px 20px 0 0;
		animation: shopPopupSlideUp 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
	}

	.shop-popup-form__brand {
		min-height: 190px;
		padding: 24px 20px;
	}

	.shop-popup-form__logo {
		max-width: 220px;
	}

	.shop-popup-form__brand-copy {
		font-size: 23px;
	}

	.shop-popup-form__content {
		padding: 30px 20px;
	}

	.shop-popup-form--step-form .shop-popup-form__content {
		padding-top: 48px;
	}

	.shop-popup-form__title {
		margin-right: 34px;
		font-size: 24px;
		margin-bottom: 16px;
	}

	.shop-popup-form__description {
		margin-bottom: 20px;
		font-size: 15px;
	}

	.shop-popup-form__field input,
	.shop-popup-form__field textarea,
	.shop-popup-form__field select {
		padding: 10px 12px;
		font-size: 16px;
	}

	.shop-popup-form__choice {
		grid-template-columns: 46px minmax(0, 1fr);
		min-height: 68px;
		padding: 12px;
	}

	.shop-popup-form__choice-text {
		font-size: 17px;
	}

	.shop-popup-form__form {
		grid-template-columns: 1fr;
	}
}

@keyframes shopPopupSlideUp {
	from { transform: translateY(100%); }
	to { transform: translateY(0); }
}