/* Поп-ап "Подарок" (ТЗ 2026-09-03) — изолированные стили с префиксом gw-gift- */

.gw-gift {
	position: fixed;
	inset: 0;
	z-index: 10000;
	font-family: inherit;
}

.gw-gift__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
}

.gw-gift__dialog {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 720px;
	max-width: calc(100% - 30px);
	max-height: calc(100vh - 30px);
	overflow: auto;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 10px 60px rgba(0, 0, 0, 0.35);
	box-sizing: border-box;
}

.gw-gift__body {
	display: flex;
	align-items: stretch;
}

.gw-gift__img {
	width: 45%;
	flex: 0 0 45%;
	background: url(/local/templates/goodwill/images/gift/banner.jpg) center / cover no-repeat;
	min-height: 320px;
}

.gw-gift__img img {
	display: none;
}

.gw-gift__content {
	flex: 1 1 auto;
	padding: 30px 30px 25px;
	box-sizing: border-box;
}

.gw-gift__title {
	font-size: 20px;
	line-height: 1.35;
	font-weight: 700;
	color: #181818;
	margin: 0 0 18px;
}

.gw-gift__accent {
	color: #B6102C;
}

.gw-gift__label {
	font-size: 15px;
	color: #181818;
	margin: 0 0 8px;
}

.gw-gift__radio {
	display: flex;
	gap: 10px;
	margin: 0 0 14px;
}

.gw-gift__radio label {
	flex: 1 1 0;
	margin: 0;
	cursor: pointer;
}

.gw-gift__radio input {
	display: none;
}

.gw-gift__radio span {
	display: block;
	text-align: center;
	padding: 9px 10px;
	border: 2px solid #d9d9d9;
	border-radius: 8px;
	font-size: 15px;
	color: #181818;
	box-sizing: border-box;
	transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.gw-gift__radio input:checked + span {
	border-color: #B6102C;
	background: #B6102C;
	color: #fff;
}

.gw-gift__field {
	margin: 0 0 14px;
}

.gw-gift__field input[type="tel"] {
	width: 100%;
	height: 48px;
	padding: 0 15px;
	font-size: 16px;
	color: #181818;
	border: 2px solid #d9d9d9;
	border-radius: 8px;
	box-sizing: border-box;
	outline: none;
	background: #fff;
}

.gw-gift__field input[type="tel"]:focus {
	border-color: #B6102C;
}

.gw-gift__field.gw-gift--invalid input[type="tel"] {
	border-color: #B6102C;
}

.gw-gift__error {
	display: none;
	font-size: 13px;
	color: #B6102C;
	margin: 5px 2px 0;
}

.gw-gift__field.gw-gift--invalid .gw-gift__error {
	display: block;
}

.gw-gift__submit {
	display: block;
	width: 100%;
	height: 50px;
	border: 2px solid #B6102C;
	border-radius: 100px;
	background: #B6102C;
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
}

.gw-gift__submit:hover {
	background: #fff;
	color: #181818;
	border-color: #181818;
}

.gw-gift__policy {
	font-size: 12px;
	line-height: 1.45;
	color: #8a8a8a;
	margin-top: 14px;
}

.gw-gift__policy a {
	color: #8a8a8a;
	text-decoration: underline;
}

.gw-gift__success {
	display: none;
	font-size: 20px;
	font-weight: 700;
	color: #181818;
	margin: 0 0 18px;
}

.gw-gift--sent .gw-gift__form,
.gw-gift--sent .gw-gift__label {
	display: none;
}

.gw-gift--sent .gw-gift__success {
	display: block;
}

.gw-gift__close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 36px;
	height: 36px;
	border: none;
	border-radius: 50%;
	background: rgba(24, 24, 24, 0.08);
	color: #181818;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	z-index: 2;
	transition: background 0.15s;
}

.gw-gift__close:hover {
	background: rgba(24, 24, 24, 0.18);
}

@media (max-width: 767px) {
	.gw-gift__dialog {
		width: 100%;
		max-width: 100%;
		left: 0;
		right: 0;
		bottom: 0;
		top: auto;
		transform: none;
		border-radius: 12px 12px 0 0;
		max-height: 92vh;
	}

	.gw-gift__body {
		flex-direction: column;
	}

	.gw-gift__img {
		width: 100%;
		flex: 0 0 auto;
		height: 150px;
		min-height: 0;
		background-position: center 30%;
	}

	.gw-gift__content {
		padding: 20px 16px 18px;
	}

	.gw-gift__title {
		font-size: 17px;
	}

	.gw-gift__success {
		font-size: 17px;
	}

	.gw-gift__close {
		background: rgba(255, 255, 255, 0.85);
	}
}
