/*
 * Окно «Подробнее о мастере»
 */

.master-modal {
	position: fixed;
	inset: 0;
	z-index: 1200;

	display: none;

	width: 100%;
	height: 100dvh;

	background: rgba(0, 0, 0, .72);

	font-family: "SF Pro Display", Arial, sans-serif;
}

.master-modal.is-open {
	display: block;
}


/* =========================================================
   ОКНО
   ========================================================= */

.master-modal__dialog {
	position: relative;

	width: 100%;
	height: 100%;

	margin: 0;
	padding: 0;

	overflow: hidden;

	color: #2f2f2f;
	background: #fff;
}


/* =========================================================
   ПРОКРУЧИВАЕМАЯ ОБЛАСТЬ
   ========================================================= */

.master-modal__scroll {
	width: 100%;
	height: 100%;

	overflow-x: hidden;
	overflow-y: auto;

	-webkit-overflow-scrolling: touch;

	scrollbar-width: none;
}

.master-modal__scroll::-webkit-scrollbar {
	display: none;
	width: 0;
	height: 0;
}


/* =========================================================
   КРЕСТИК
   ========================================================= */

.master-modal__close {
	position: absolute;
	z-index: 20;

	top: 24px;
	right: 24px;

	display: flex;
	align-items: center;
	justify-content: center;

	width: 35px;
	height: 35px;

	margin: 0;
	padding: 0;

	background: transparent;
	border: 0;

	cursor: pointer;

	appearance: none;
	-webkit-appearance: none;
}

.master-modal__close svg {
	display: block;

	width: 35px;
	height: 35px;

	pointer-events: none;
}

.master-modal__close:hover {
	opacity: .85;
}

.master-modal__close:active {
	transform: scale(.96);
}


/* =========================================================
   ФОТО
   ========================================================= */

.master-modal__image-wrap {
	width: 100%;
	height: 300px;

	margin: 0;
	padding: 0;

	overflow: hidden;

	background: #fff;
}

.master-modal__image {
	display: block;

	width: 100%;
	height: 100%;

	max-width: none;

	margin: 0;
	padding: 0;

	object-fit: cover;
	object-position: center top;

	border-radius: 0;
}


/* =========================================================
   КОНТЕНТ
   ========================================================= */

.master-modal__content {
	width: 100%;
	max-width: 820px;

	margin: 0 auto;
	padding: 28px 24px 40px;

	box-sizing: border-box;
}


/* Должность */

.master-modal__eyebrow {
	margin: 0 0 6px;

	color: #2f2f2f;

	font-size: 16px;
	line-height: 1.3;
	font-weight: 400;

	text-align: center;
}


/* Имя */

.master-modal__title {
	margin: 0 0 22px;

	color: #2f2f2f;

	font-size: 28px;
	line-height: 1.15;
	font-weight: 500;

	text-align: center;
}


/* Текст */

.master-modal__text {
	color: #2f2f2f;

	font-size: 16px;
	line-height: 1.5;
}

.master-modal__text p {
	margin: 0 0 14px;
}

.master-modal__text p:last-child {
	margin-bottom: 0;
}


/* =========================================================
   КНОПКА
   ========================================================= */

.master-modal__actions {
	display: flex;
	justify-content: center;

	margin-top: 30px;
	padding-bottom: 10px;
}

.master-modal__action {
	display: flex;
	align-items: center;
	justify-content: center;

	width: 100%;
	max-width: 360px;
	min-height: 50px;

	padding: 14px 24px;

	box-sizing: border-box;

	color: #fff;

	font-size: 16px;
	line-height: 1;
	text-align: center;
	text-decoration: none;

	background: #89966f;
	border: 1px solid #89966f;
	border-radius: 999px;

	cursor: pointer;

	transition:
		background .2s ease,
		opacity .2s ease;
}

.master-modal__action:hover {
	opacity: .9;
}


/* =========================================================
   ДЕСКТОП
   ========================================================= */

@media (min-width: 768px) {

	.master-modal {
		display: none;

		align-items: center;
		justify-content: center;

		padding: 24px;

		box-sizing: border-box;
	}

	.master-modal.is-open {
		display: flex;
	}

	.master-modal__dialog {
		width: min(925px, 100%);
		height: auto;
		max-height: calc(100dvh - 48px);

		border-radius: 32px;
	}

	.master-modal__scroll {
		max-height: calc(100dvh - 48px);
	}

	.master-modal__image-wrap {
		height: 300px;
	}

	.master-modal__content {
		padding: 24px 40px 40px;
	}

	.master-modal__close {
		top: 20px;
		right: 20px;
	}
}


/* =========================================================
   МОБИЛЬНЫЙ
   ========================================================= */

@media (max-width: 767px) {

	.master-modal {
		padding: 0;

		align-items: flex-end;
	}

	.master-modal__dialog {
		width: 100%;
		height: 100dvh;

		border-radius: 0;
	}

	.master-modal__scroll {
		height: 100dvh;
	}

	/*
	 * Фото как в help:
	 * фиксированная область,
	 * заполнение всей ширины,
	 * лишнее изображение обрезается.
	 */
	.master-modal__image-wrap {
		width: 100%;
		height: 300px;

		margin: 0;
		padding: 0;

		overflow: hidden;
	}

	.master-modal__image {
		width: 100%;
		height: 100%;

		object-fit: cover;
		object-position: center top;
	}

	.master-modal__content {
		padding: 22px 20px 35px;
	}

	.master-modal__eyebrow {
		margin-bottom: 6px;

		font-size: 15px;

		text-align: left;
	}

	.master-modal__title {
		margin-bottom: 18px;

		font-size: 22px;
		line-height: 1.2;

		text-align: left;
	}

	.master-modal__text {
		font-size: 14px;
		line-height: 1.5;
	}

	.master-modal__text p {
		margin-bottom: 12px;
	}

	.master-modal__actions {
		margin-top: 24px;
	}

	.master-modal__action {
		min-height: 50px;

		font-size: 14px;
	}

	.master-modal__close {
		top: 14px;
		right: 14px;

		width: 35px;
		height: 35px;
	}

	.master-modal__close svg {
		width: 35px;
		height: 35px;
	}
}
@media (min-width: 768px) {
	.master-modal__image-wrap {
		display: none !important;
	}
}