/* Модальное окно контактов департамента (страница услуги/департамента) */

/* Оверлей: фиксирован, не скроллится. Скролл только внутри .ms-contacts-modal-content */
.ms-contacts-modal {
	z-index: 9999 !important;
	position: fixed;
	inset: 0;
	overflow: hidden;
	background: color-mix(in srgb, var(--ms-primary, #00739c) 20%, rgba(0, 0, 0, 0.8));
	align-items: flex-start;
	justify-content: center;
	padding-top: 60px;
	padding-bottom: 60px;
}
.ms-contacts-modal-body {
	padding-inline-end: 15px !important;
}

.ms-contacts-modal-content {
	position: relative;
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 8px;
	padding: 0;
	min-width: 50vw;
	max-width: 900px;
	min-height: 300px;
	max-height: calc(100vh - 120px);
	/* margin-top: 60px; */
	overflow: hidden;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Крестик всегда виден: не скроллится, прижат к верху */


.ms-contacts-modal .ms-modal-close {
	color: var(--ms-grey);
    flex-shrink: 0;
    z-index: 10000;
	margin: 10px;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.ms-contacts-modal .ms-contacts-modal-body {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	padding: 10px 20px 40px 40px;
	-webkit-overflow-scrolling: touch;
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.ms-contacts-modal .ma-modal-close:hover,
.ms-contacts-modal .ms-modal-close:hover {
	opacity: 0.7;
}

.ms-contacts-modal .ma-modal-close .ms-icon,
.ms-contacts-modal .ms-modal-close .ms-icon {
	width: 24px;
	height: 24px;
	fill: #000;
	stroke: #000;
}

.ms-contacts-modal .fluentform .ff-el-input--content {
	min-height: 1px;
}

.ms-contacts-modal .fluentform input,
.ms-contacts-modal .fluentform textarea,
.ms-contacts-modal .fluentform select {
	display: block !important;
	width: 100%;
}



h2.ms-contacts-modal__title {
	border-bottom: none ;
	/* text-align: center; */
	margin: 0 20px;
}

.ms-contacts-block__title {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 1.2rem;
}
.ms-contacts-block__icon {
	width: 1.25rem;
	height: 1.25rem;
	fill: transparent;
	stroke-width: 2;
}

.ms-contacts-list,
.ms-contacts-hours {
	margin-bottom: 0;
	list-style: none;
	padding-left: 0;
}

.ms-contacts-list__item {
	margin-bottom: 0.35rem;
}


.ms-contacts-list__item a {
	cursor: pointer;
}



.ms-contacts-list__item a:hover {
	text-decoration: underline;
	color: var(--ms-primary, #00739c);

}
.ms-contacts-list__label, .ms-contacts-hours__title {
	font-weight: 500;
}
.ms-contacts-list__desc {
	color: #666;
	font-size: 0.95em;
}

.ms-contacts-block__note {
	margin: 0.75rem 0 0;

}

.ms-contacts-block:not(.ms-contacts-block--content) {
	border-radius: 20px;
	padding: 40px;
	box-shadow: 0px 0px 30px 0px #9d9d9d61;
	padding-bottom: 1.25rem;
}

.ms-contacts-block--content {
	box-shadow: none;
	padding: 0 20px;
}

@media (max-width: 768px) {
	.ms-contacts-modal {
		padding-top: 40px;
		padding-bottom: 40px;
	}

	.ms-contacts-modal-content {
		margin: 0;
		padding: 0;
		max-width: 100%;
		max-height: 100%;
	}

	.ms-contacts-modal .ma-modal-close,
	.ms-contacts-modal .ms-modal-close {
		inset-inline-end: 10px;
		top: 10px;
	}

	.ms-contacts-modal .ma-modal-close .ms-icon,
	.ms-contacts-modal .ms-modal-close .ms-icon {
		fill: #000;
		stroke: #000;
	}

	.ms-contacts-modal__title {
		font-size: 1.25rem;
	}

	.ms-contacts-block {
		border-radius: 20px;
		padding: 20px !important;
		box-shadow: 0px 0px 30px 0px #9d9d9d61;
	}

	.ms-contacts-list {
		margin: 0 !important;
	}
}

@media only screen and (max-width: 768px) {
	.ma-modal {
		padding: 10px;
	}

	h2.ms-contacts-modal__title {
		margin: 0;
	}
}

