/**
 * Модальное окно заявки — бирюза / акцент красный, Manrope в подключении темы.
 */

.lead-modal {
	position: fixed;
	inset: 0;
	z-index: 10050;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.25rem;
	box-sizing: border-box;
}

.lead-modal[hidden] {
	display: none !important;
}

.lead-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(10, 14, 18, 0.62);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.lead-modal__dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 440px;
	max-height: min(92vh, 720px);
	overflow-y: auto;
	padding: 2rem 1.75rem 1.75rem;
	margin: auto;
	background: linear-gradient(165deg, #ffffff 0%, #f8fafb 100%);
	border-radius: 22px;
	box-shadow:
		0 4px 6px rgba(0, 121, 121, 0.06),
		0 22px 48px rgba(0, 0, 0, 0.14),
		0 0 0 1px rgba(0, 121, 121, 0.1);
	font-family: "Manrope", system-ui, sans-serif;
	animation: lead-modal-in 0.45s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes lead-modal-in {
	from {
		opacity: 0;
		transform: translateY(22px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.lead-modal__close {
	position: absolute;
	top: 0.85rem;
	right: 0.85rem;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: none;
	border-radius: 12px;
	background: rgba(0, 121, 121, 0.08);
	color: #3d4449;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}

.lead-modal__close:hover {
	background: #007979;
	color: #fff;
}

.lead-modal__brand {
	display: flex;
	justify-content: center;
	margin-bottom: 1.25rem;
	padding-inline: 0.5rem;
}

.lead-modal__logo {
	max-width: 220px;
	height: auto;
	object-fit: contain;
}

.lead-modal__title {
	margin: 0 0 0.35rem;
	font-size: 1.35rem;
	font-weight: 800;
	text-align: center;
	color: #3d4449;
	letter-spacing: -0.02em;
	line-height: 1.25;
}

.lead-modal__type {
	margin: 0 0 1rem;
	font-size: 0.82rem;
	font-weight: 600;
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #007979;
}

.lead-modal__type:not([hidden]) {
	display: block;
}

.lead-modal__alert {
	margin: 0 0 1rem;
	padding: 0.75rem 1rem;
	border-radius: 12px;
	font-size: 0.92rem;
	line-height: 1.45;
}

.lead-modal__alert--ok {
	background: rgba(0, 121, 121, 0.1);
	color: #006060;
	border: 1px solid rgba(0, 121, 121, 0.2);
}

.lead-modal__alert--err {
	background: rgba(255, 75, 75, 0.1);
	color: #9a1c1c;
	border: 1px solid rgba(255, 75, 75, 0.25);
}

.lead-modal__form.is-busy {
	pointer-events: none;
	opacity: 0.65;
}

.lead-modal__field {
	margin: 0 0 1rem;
}

.lead-modal__label {
	display: block;
	margin-bottom: 0.4rem;
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #5c6468;
}

.lead-modal__input,
.lead-modal__textarea {
	width: 100%;
	padding: 0.75rem 1rem;
	font: inherit;
	font-size: 1rem;
	color: #3d4449;
	background: #fff;
	border: 1px solid #e2e8e8;
	border-radius: 12px;
	box-sizing: border-box;
	transition:
		border-color 0.2s ease,
		box-shadow 0.2s ease;
}

.lead-modal__textarea {
	min-height: 88px;
	resize: vertical;
}

.lead-modal__input:focus,
.lead-modal__textarea:focus {
	outline: none;
	border-color: #007979;
	box-shadow: 0 0 0 3px rgba(0, 121, 121, 0.15);
}

.lead-modal__input::placeholder,
.lead-modal__textarea::placeholder {
	color: #9aa4a8;
}

.lead-modal__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
	margin: 0;
	opacity: 0;
	pointer-events: none;
}

.lead-modal__submit {
	width: 100%;
	margin-top: 0.25rem;
	padding: 1rem 1.25rem;
	font-family: inherit;
	font-size: 0.95rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #fff;
	background: linear-gradient(180deg, #008888 0%, #007979 45%, #006b6b 100%);
	border: none;
	border-radius: 14px;
	cursor: pointer;
	box-shadow: 0 10px 24px rgba(0, 121, 121, 0.35);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lead-modal__submit:hover {
	transform: translateY(-2px);
	box-shadow: 0 14px 32px rgba(0, 121, 121, 0.4);
}

.lead-modal__submit:focus-visible {
	outline: 2px solid #ff4b4b;
	outline-offset: 3px;
}

.lead-modal__submit:active {
	transform: translateY(0);
}

body.lead-modal-open {
	overflow: hidden;
	position: fixed;
	inset: 0;
	width: 100%;
}

@media (max-width: 480px) {
	.lead-modal__dialog {
		padding: 1.75rem 1.25rem 1.5rem;
		border-radius: 18px;
	}

	.lead-modal__title {
		font-size: 1.2rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.lead-modal__dialog {
		animation: none;
	}
}
