/**
 * ROOT 
 * Переменные модального окна
 */

.overlay {
	--overlay-padding-bottom: 48px;
	--modal-content-padding-top: 64px;
	--modal-content-border-radius: 10px 10px 0 0;
	--modal-content-overflow-y: auto;
	--modal-content-form-width: 100%;
	--modal-title-size: 22px;
	--modal-right-row-gap: 32px;
}

@media (min-width: 768px) {
	.overlay {
		--modal-content-border-radius: 10px;
		--modal-content-overflow-y: hidden;
		--modal-content-padding-top: 0;
		--modal-content-form-width: 440px;
		--modal-title-size: 26px;
	}
}

/**
 * DEFAULT 
 * Дефолтные стили
 */

.overlay.active {
	background: rgba(2, 5, 9, .6);
	position: fixed;
	height: 100%;
	width: 100%;
	z-index: 9999;	
	top: 0;
	left: 0;
	overflow-y: scroll;
}

.overlay.active .modal {
	opacity: 1;
	width: auto;
	height: auto;
	max-height: 100%;
}

.modal {
	position: absolute;
	opacity: 0;
	height: 0;
	width: 0;
	overflow-x: hidden;
	overflow-y: auto;
}

.modal-close {
	position: absolute;
	top: 24px;
	right: 24px;
	width: 20px;
	height: 20px;
	border: none;
	padding: 0;
	background: transparent;
}

.modal-close:hover path {
	fill: #FF6420;
}

.modal-content {
	position: relative;
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: var(--modal-content-border-radius);
	overflow-x: hidden;
	overflow-y: var(--modal-content-overflow-y);
	row-gap: 64px;
	padding-top: var(--modal-content-padding-top);
}

.modal-left {
	display: flex;
	flex-direction: column;
	row-gap: 40px;
}

.modal-right {
	display: flex;
	flex-direction: column;
	row-gap: var(--modal-right-row-gap);
	background: #F9F9F9;
	padding-bottom: var(--modal-content-padding-top);
	padding-top: var(--modal-content-padding-top);
}

@media (min-width: 768px) {
	.modal-left { padding: 64px;}
	.modal-right { padding: 64px 48px; }
}

/**
 * MODAL CONTACT LIST
 */

.modal-right-contact {
	display: flex;
	flex-direction: column;
	row-gap: var(--modal-right-row-gap);
}

.modal-right-contact-list {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	row-gap: 24px;
	padding-bottom: var(--modal-right-row-gap);
	border-bottom: 1px solid #DFE1E7;
}

.phone {
	display: flex;
	flex-direction: column;
	row-gap: 6px;
	text-decoration: none;
	color: #504D5D;
}

.phone-value {
	font-weight: bold;
	font-size: 24px;
	line-height: 1em;
	transition: all .15s ease-in-out;
}

.phone-text {
	font-weight: 300;
	font-size: 15px;
	line-height: 1em;
	transition: all .15s ease-in-out;
}

.phone:hover .phone-text,
.phone:hover .phone-value {
	color: #FF6420;
}

.button-whatsapp {
	border-radius: 100px;
	display: flex;
	align-items: center;
	column-gap: 8px;
	padding: 2px 16px 2px 2px;
	background: #009F46;
	border: none;
	outline: none;
	text-decoration: none;
	transition: all .15s ease-in-out;
}

.button-whatsapp .button-whatsapp-text {
	font-size: 16px;
	font-weight: bold;
	color: #fff;
	line-height: 1em;
}

.button-whatsapp .button-whatsapp-icon {
	width: 36px;
	height: 36px;
}

.button-whatsapp:hover {
	box-shadow: 0 0 20px rgba(0,0,0,.2);
}

.button-whatsapp:active {
	box-shadow: none;
}

/**
 * MODAL ADDRESS
 */

.modal-right-address {
	display: flex;
	flex-direction: column;
	row-gap: 24px;
}

.modal-right-address-title {
	font-weight: 300;
	font-size: 15px;
}

.modal-address {
	display: flex;
	flex-direction: column;
	row-gap: 8px;
	padding: 0;
	margin: 0;
}

.modal-address-item {
	list-style-type: none;
	margin: 0;
	padding: 0;
}

/**
 * MODAL POSITION
 * - center - модальное окно по центру
 * - top - модальное окно сверху экрана
 */

.overlay.active .modal.modal-pos-center .modal-content,
.overlay.active .modal.modal-pos-top .modal-content {
	height: auto;
	width: auto;
	opacity: 1;
	bottom: 0;
	left: 0;
	transform: none;
	margin-top: 16px;
}

@media (min-width: 768px) {
	.overlay.active .modal.modal-pos-top {
		top: var(--overlay-padding-bottom);
		left: 50%;
		transform: translate3d(-50%, 0, 0);
		margin-top: 0;
	}

	.overlay.active .modal.modal-pos-center {
		top: 50%;
		left: 50%;
		transform: translate3d(-50%, -50%, 0);
		margin-top: 0;
	}
}

/**
 * MOBILE
 * Стили для мобильных
 */

@media (max-width: 767px) {
	.overlay.active .modal {
		bottom: 0;
		position: absolute;
		width: 100%;
	}

	.modal-content {
		width: 100%;
		height: auto;
	}
}

/**
 * TABLET & DESKTOP
 * Стили для планшетов
 * Стили для десктопа
 */

@media (min-width: 768px) {
	.overlay.active .modal .modal-content {
		width: auto;
		height: auto;
		max-width: 100%;
		flex-flow: row wrap;
	}
}

@media (min-width: 1024px) {
	.overlay.active .modal .modal-content {
		flex-flow: row nowrap;
	}
}

/**
 * MODAL CONTENT
 */

.modal-content .form {
	width: var(--modal-content-form-width);
}