.modal {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.modal[hidden] {
	display: none;
}

.modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(54, 55, 66, .8);
	animation: msk-fade .2s ease;
}

.modal__box {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 458px;
	max-width: 100%;
	max-height: min(660px, calc(100vh - 32px));
	max-height: min(660px, calc(100dvh - 32px));
	overflow: hidden;
	border-radius: 10px;
	background: #fff;
	color: #363742;
	animation: msk-fade .2s ease;
}

.modal__close {
	position: absolute;
	top: 29px;
	right: 7.2%;
	width: 17px;
	height: 17px;
	color: #363742;
}

.modal__close .icon {
	width: 17px;
	height: 17px;
}

.modal__close .icon path {
	stroke-width: 1.6;
}

.modal__close:hover {
	color: var(--msk-green);
}

.modal__head {
	flex: none;
	padding: 25px calc(7.2% + 30px) 20px 7.2%;
	font-size: 24px;
	font-weight: 800;
	line-height: 1.35;
	text-transform: uppercase;
	color: #363742;
}

.modal__head--tall {
	padding-top: 60px;
	padding-right: 7.2%;
}

.modal__head span {
	color: var(--msk-green-dark);
}

.modal__form {
	display: flex;
	flex-direction: column;
	min-height: 0;
	flex: 1;
}

.modal__note {
	flex: none;
	padding: 10px 7.2%;
	background: #f2f2f2;
	font-size: 12px;
	line-height: 1.5;
}

.modal__info-title {
	color: var(--msk-green-dark);
}

.modal__info:empty {
	display: none;
}

.req {
	color: #ff1864;
}

.modal__body {
	flex: 1;
	min-height: 0;
	padding: 26px 7.2% 0;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.form-row {
	margin-bottom: 20px;
}

.form-row__label {
	display: block;
	margin-bottom: 5px;
	font-size: 12px;
}

.form-row__input {
	display: block;
	width: 100%;
	padding: 8px 16px;
	border: 1px solid #d3d3d3;
	border-radius: 3px;
	background: #f9f9f9;
	font-size: 18.88px;
	line-height: 25px;
	color: #363742;
}

.form-row__input::placeholder {
	color: #8a8a8a;
}

.form-row__input:focus {
	border-color: var(--msk-green);
	outline: none;
	background: #fff;
	box-shadow: rgba(81, 185, 5, .3) 0 0 5px 0;
}

.form-row__input--area {
	min-height: 100px;
	resize: vertical;
	font-size: 12.96px;
	line-height: 1.5;
}

.form-consent {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	margin-bottom: 20px;
	font-size: 16px;
	line-height: 22px;
}

.form-consent input {
	flex: none;
	width: 15px;
	height: 15px;
	margin: 4px 0 0;
	accent-color: var(--msk-green);
}

.form-consent a {
	color: var(--msk-green);
}

.form-consent a:hover {
	color: var(--msk-green-dark);
}

.modal__foot {
	flex: none;
	padding: 16px 0;
	background: rgba(236, 236, 236, .8);
	text-align: center;
}

.modal__submit {
	min-width: 166px;
	padding: 10px 15px;
	font-size: 14px;
	line-height: 18px;
}

.quick-call-toggle {
	position: fixed;
	right: 6%;
	bottom: 10%;
	z-index: 998;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--msk-green);
	box-shadow: 1px 1px 1px 1px rgba(0, 0, 0, .2);
	color: #fff;
	transition: background-color .2s;
	animation: msk-pulse 2s infinite;
}

.quick-call-toggle:hover {
	background: #429405;
}

.quick-call-toggle .icon {
	position: absolute;
	width: 28px;
	height: 28px;
	transition: opacity .2s;
}

.quick-call-toggle .icon--close {
	width: 16px;
	height: 16px;
	opacity: 0;
	color: #363742;
}

.quick-call-toggle.is-active {
	background: #dadada;
	animation: none;
}

.quick-call-toggle.is-active .icon--phone-retro {
	opacity: 0;
}

.quick-call-toggle.is-active .icon--close {
	opacity: 1;
}

.quick-call {
	position: fixed;
	right: calc(6% + 48px);
	bottom: calc(10% + 61px);
	z-index: 999;
	width: 400px;
	max-width: calc(100% - 32px);
	padding: 30px;
	border-radius: 5px;
	background: #fff;
	box-shadow: 0 0 8px 3px rgba(0, 0, 0, .2);
	color: #000;
	animation: msk-fade .2s ease;
}

.quick-call[hidden] {
	display: none;
}

.quick-call__head {
	margin-bottom: 30px;
	font-size: 22px;
	font-weight: 700;
	line-height: 30px;
	text-align: center;
}

.quick-call__group {
	position: relative;
	margin-bottom: 10px;
}

.quick-call__input {
	display: block;
	width: 100%;
	padding: 10px 15px;
	border: 1px solid rgba(0, 0, 0, .4);
	border-radius: 5px;
	font-size: 16px;
	line-height: 20px;
}

.quick-call__input:focus {
	border-color: #000;
	outline: none;
}

.quick-call__label {
	position: absolute;
	top: 12px;
	left: 16px;
	font-size: 16px;
	line-height: 16px;
	color: #000;
	pointer-events: none;
	transition: .2s;
}

.quick-call__input:focus + .quick-call__label,
.quick-call__input:not(:placeholder-shown) + .quick-call__label {
	top: -22px;
	left: 0;
	font-size: 14px;
	line-height: 14px;
	color: rgba(0, 0, 0, .4);
}

.quick-call__submit {
	display: block;
	width: 100%;
	margin-bottom: 20px;
	padding: 10px 15px;
	border-radius: 5px;
	background: var(--msk-green);
	font-size: 16px;
	line-height: 22px;
	color: #fff;
}

.quick-call__submit:hover {
	background: #429405;
}

.quick-call .form-consent {
	margin: 0;
	font-size: 14px;
	line-height: 19px;
}

.form-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.form-row__input.is-invalid,
.quick-call__input.is-invalid {
	border-color: #e2401c;
	background: #fff8f6;
}

.form-error {
	margin-top: 5px;
	font-size: 13px;
	line-height: 1.4;
	color: #d0331a;
}

.form-consent .form-error {
	flex-basis: 100%;
	margin-top: 0;
}

.form-consent:has(.form-error) {
	flex-wrap: wrap;
}

.form-status {
	margin: 0 0 16px;
	padding: 10px 14px;
	border-left: 3px solid #e2401c;
	background: #fff3f0;
	font-size: 14px;
	line-height: 1.5;
	color: #363742;
}

.form-status[hidden],
.form-status:empty {
	display: none;
}

.form-captcha__box {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.form-captcha__img {
	display: block;
	width: 150px;
	height: 50px;
	border: 1px solid #d3d3d3;
	border-radius: 3px;
}

.form-captcha__new {
	width: 36px;
	height: 36px;
	border: 1px solid #d3d3d3;
	border-radius: 3px;
	background: #f9f9f9;
	font-size: 20px;
	line-height: 1;
	color: var(--msk-gray);
	cursor: pointer;
}

.form-captcha__new:hover {
	border-color: var(--msk-green);
	color: var(--msk-green-dark);
}

.form-captcha__input.form-row__input {
	flex: 1 1 120px;
	width: auto;
	min-width: 0;
	letter-spacing: 3px;
}

.form-captcha .form-error {
	flex-basis: 100%;
}

form.is-done > :not(.form-done) {
	display: none;
}

.form-done {
	padding: 24px 0;
	font-size: 18px;
	line-height: 1.5;
	color: var(--msk-green-dark);
}

.modal__form .form-done {
	padding: 30px 7.2%;
}

.quick-call:has(form.is-done) .quick-call__head {
	display: none;
}

.quick-call .form-done {
	padding: 0;
	text-align: center;
}

.to-top {
	position: fixed;
	right: 20px;
	bottom: 30px;
	z-index: 997;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: #ebebeb;
	box-shadow: rgba(0, 0, 0, .15) 0 1px 4px;
	color: #6b6b6b;
	font-size: 11px;
	font-weight: 800;
	line-height: 1;
}

.to-top .icon {
	width: 22px;
	height: 16px;
	margin-bottom: 1px;
}

.to-top:hover {
	color: var(--msk-green);
}

@keyframes msk-fade {
	from {
		opacity: 0;
	}
}

@keyframes msk-pulse {
	0% {
		box-shadow: 0 0 0 0 rgba(81, 185, 5, .4);
	}

	70% {
		box-shadow: 0 0 0 12px rgba(81, 185, 5, 0);
	}

	100% {
		box-shadow: 0 0 0 0 rgba(81, 185, 5, 0);
	}
}

@media (max-width: 768px) {
	.to-top {
		right: auto;
		bottom: 20px;
		left: 20px;
		width: 40px;
		height: 40px;
	}

	.to-top span {
		display: none;
	}
}

@media (max-width: 560px) {
	.quick-call-toggle {
		bottom: 5%;
	}

	.quick-call {
		bottom: calc(5% + 61px);
	}

	.modal {
		padding: 16px 0;
	}

	.modal__box {
		width: 100%;
	}

	.modal__head {
		padding: 22px 50px 14px 20px;
		font-size: 20px;
	}

	.modal__head--tall {
		padding-top: 22px;
	}

	.modal__close {
		top: 22px;
		right: 20px;
	}

	.modal__note {
		padding: 8px 20px;
	}

	.modal__body {
		padding: 18px 20px 0;
	}

	.form-row {
		margin-bottom: 14px;
	}

	.form-row__input {
		font-size: 16px;
		line-height: 22px;
	}

	.form-row__input--area {
		min-height: 70px;
	}

	.form-consent {
		margin-bottom: 14px;
		font-size: 14px;
		line-height: 19px;
	}

	.modal__foot {
		padding: 12px 0;
	}
}

@media (max-width: 500px) {
	.quick-call {
		right: 0;
		left: 0;
		width: 350px;
		margin: 0 auto;
		padding: 24px 20px;
	}

	.quick-call__head {
		margin-bottom: 30px;
		font-size: 20px;
		line-height: 27px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.quick-call-toggle {
		animation: none;
	}
}
