/**
 * MH Hero (Figma Home "V1 Hero", apartment page hero, Apartments "L1 Hero", Gallery hero).
 *
 * Tall: 900 / 820 / 700 px photo, copy above the booking bar (92px gap, bar 56px from the bottom).
 * Medium: 720 / 600 / 640 px photo, copy at the bottom.
 * Phones: the booking bar leaves the photo and becomes a card under it.
 */

.mh-hero {
	--mh-hero-h: 900px;
	display: flex;
	flex-direction: column;
	min-height: var(--mh-hero-h);
	color: var(--mh-hero-text, var(--mh-c-white));
}

.mh-hero--medium {
	--mh-hero-h: 720px;
}

.mh-hero__media {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
	background: var(--mh-c-ink);
}

.mh-hero__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--mh-hero-shade, var(--mh-c-ink));
	opacity: calc(var(--mh-hero-shade-o, 38) / 100);
	pointer-events: none;
}

.mh-hero .mh-hero__img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: 50% 50%;
}

.mh-hero__inner {
	position: relative;
	z-index: 1;
	flex: 1 0 auto;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding-top: var(--mh-pad-t, 96px);
	padding-bottom: var(--mh-pad-b, 96px);
}

.mh-hero--booking .mh-hero__inner {
	padding-bottom: var(--mh-pad-b, 56px);
}

/* Copy ------------------------------------------------------------- */

.mh-hero .mh-hero__title {
	max-width: 1040px;
	color: var(--mh-hero-text, var(--mh-c-white));
	overflow-wrap: break-word;
}

.mh-hero .mh-hero__text {
	max-width: 560px;
	margin-top: 20px;
	color: var(--mh-hero-text, var(--mh-c-white));
}

.mh-hero--medium .mh-hero__text {
	max-width: 720px;
	margin-top: 16px;
}

/* The link box is 44px for touch; its 24px text line sits 20px under the text. */
.mh-hero .mh-hero__more {
	margin-top: 10px;
}

.mh-hero .mh-hero__link {
	color: var(--mh-hero-text, var(--mh-c-white));
}

.mh-hero__link:focus-visible {
	outline-color: var(--mh-hero-text, var(--mh-c-white));
}

/* Photo credit: bottom right, aligned with the container. */
.mh-hero__credit-wrap {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 20px;
	z-index: 1;
	text-align: right;
	pointer-events: none;
}

.mh-hero .mh-hero__credit {
	display: inline-block;
	pointer-events: auto;
}

/* Booking bar -------------------------------------------------------- */

.mh-hero__bar {
	--mh-text: var(--mh-c-ink);
	--mh-field: transparent;
	display: flex;
	align-items: center;
	gap: 24px;
	min-height: 120px;
	margin: 92px 0 0;
	padding: 24px;
	border: 1px solid var(--mh-c-line);
	background: var(--mh-c-white);
	color: var(--mh-c-ink);
}

.mh-hero__fields {
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	gap: 24px;
	min-width: 0;
}

.mh-hero__field {
	position: relative;
	flex: 1 1 0;
	gap: 0;
}

/* 1px x 56px dividers, 24px either side. */
.mh-hero__field + .mh-hero__field {
	padding-left: 25px;
}

.mh-hero__field + .mh-hero__field::before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	width: 1px;
	height: 56px;
	background: var(--mh-c-line);
	transform: translateY(-50%);
}

.mh-hero__field .mh-field__label {
	color: var(--mh-c-ink);
}

/* Borderless variant of the shared control. */
.mh-hero__field .mh-control {
	min-height: 44px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
}

.mh-hero__field .mh-control:focus-within {
	outline: 2px solid var(--mh-c-blue);
	outline-offset: 2px;
}

.mh-hero__field .mh-control select,
.mh-hero__field .mh-control input {
	height: 44px;
}

.mh-hero__field .mh-control__icon {
	right: 0;
}

.mh-hero__field .mh-control__lead {
	width: 18px;
	height: 18px;
}

.mh-hero .mh-hero__submit {
	flex: none;
	width: 336px;
	max-width: 100%;
}

/* Sticky phone button: shown by assets/js/parts/hero.js on phones only. */
.mh-hero__phonebar {
	display: none;
}

/* ------------------------------------------------------------------ */
/* Tablet                                                             */
/* ------------------------------------------------------------------ */

@media (max-width: 1024px) {
	.mh-hero--tall {
		--mh-hero-h: 820px;
	}

	.mh-hero--medium {
		--mh-hero-h: 600px;
	}

	.mh-hero--booking .mh-hero__inner {
		padding-bottom: var(--mh-pad-b, 48px);
	}

	.mh-hero--medium .mh-hero__inner {
		padding-bottom: var(--mh-pad-b, 160px);
	}

	.mh-hero__bar {
		flex-wrap: wrap;
		gap: 12px 24px;
		min-height: 0;
		margin-top: 76px;
		padding: 20px;
	}

	.mh-hero__fields {
		flex-basis: 100%;
	}

	.mh-hero .mh-hero__submit {
		width: 100%;
	}

	.mh-hero__credit-wrap {
		bottom: 14px;
	}
}

/* The tablet frames keep the 56px heading in the hero (phones go back to 36px). */
@media (min-width: 768px) and (max-width: 1024px) {
	.mh-hero {
		--mh-fs-h1: 56px;
		--mh-lh-h1: 64px;
	}
}

/* ------------------------------------------------------------------ */
/* Phone                                                              */
/* ------------------------------------------------------------------ */

@media (max-width: 767px) {
	.mh-hero {
		--mh-hero-h: 700px;
		display: block;
		min-height: 0;
	}

	.mh-hero--medium {
		--mh-hero-h: 640px;
	}

	.mh-hero__media {
		bottom: auto;
		height: var(--mh-hero-h);
	}

	.mh-hero__inner,
	.mh-hero--booking .mh-hero__inner,
	.mh-hero--medium .mh-hero__inner {
		display: block;
		padding: 0;
	}

	.mh-hero__copy {
		display: flex;
		flex-direction: column;
		justify-content: flex-end;
		min-height: var(--mh-hero-h);
		padding-top: var(--mh-pad-t, 72px);
		padding-bottom: var(--mh-pad-b, 32px);
	}

	.mh-hero--medium .mh-hero__copy {
		padding-bottom: var(--mh-pad-b, 56px);
	}

	.mh-hero .mh-hero__text {
		font-size: 16px;
		line-height: 24px;
	}

	/* The bar becomes a bordered card under the photo. */
	.mh-hero__bar {
		display: block;
		margin: 48px 0 40px;
		padding: 20px;
	}

	.mh-hero__fields {
		display: block;
	}

	.mh-hero__field + .mh-hero__field {
		margin-top: 6px;
		padding-top: 6px;
		padding-left: 0;
		border-top: 1px solid var(--mh-c-line);
	}

	.mh-hero__field + .mh-hero__field::before {
		display: none;
	}

	.mh-hero .mh-hero__submit {
		margin-top: 8px;
	}

	.mh-hero__credit-wrap {
		bottom: 20px;
	}

	/* The card sits under the photo, so the credit would land on it. */
	.mh-hero--booking .mh-hero__credit-wrap {
		display: none;
	}

	.mh-js .mh-hero__phonebar {
		display: block;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 40;
		padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px));
		border-top: 1px solid var(--mh-c-line);
		background: var(--mh-c-white);
		transition: transform 0.25s ease, visibility 0.25s;
	}

	.mh-js .mh-hero__phonebar.is-hidden {
		visibility: hidden;
		transform: translateY(100%);
	}

	html.mh-phonebar-shown body {
		padding-bottom: calc(73px + env(safe-area-inset-bottom, 0px));
	}

	html.mh-menu-open .mh-hero__phonebar {
		visibility: hidden;
	}
}

/* Never in the Elementor editor. */
.elementor-editor-active .mh-hero__phonebar {
	display: none !important;
}
