html.mtt-popup-open,
body.mtt-popup-open {
	overflow: hidden;
}

.mtt-popup[hidden],
.mtt-popup.is-hidden {
	display: none !important;
}

.mtt-popup {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: grid;
	place-items: center;
	padding: 24px;
}

.mtt-popup__overlay {
	position: absolute;
	inset: 0;
	background: rgba(31, 20, 14, 0.56);
	backdrop-filter: blur(3px);
}

.mtt-popup__dialog {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	width: min(1040px, calc(100dvw - 48px));
	max-width: calc(100dvw - 48px);
	max-height: min(calc(100dvh - 48px), 620px);
	overflow: hidden;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--wp--preset--color--almond, #613a25);
	box-shadow: 0 18px 48px rgba(20, 14, 11, 0.16);
	box-sizing: border-box;
}

.mtt-popup__dialog:focus,
.mtt-popup__dialog:focus-visible {
	outline: none;
	box-shadow: 0 18px 48px rgba(20, 14, 11, 0.16);
}

.mtt-popup__close {
	position: absolute;
	top: 28px;
	right: 28px;
	z-index: 3;
	display: block;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--wp--preset--color--almond, #613a25);
	cursor: pointer;
	font-size: 0;
	opacity: 0.9;
	transition: opacity 0.2s ease;
}

.mtt-popup__close::before,
.mtt-popup__close::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 30px;
	height: 1px;
	background: currentColor;
	transform-origin: center;
}

.mtt-popup__close::before {
	transform: translate(-50%, -50%) rotate(45deg);
}

.mtt-popup__close::after {
	transform: translate(-50%, -50%) rotate(-45deg);
}

.mtt-popup__close span[aria-hidden="true"] {
	display: none;
}

.mtt-popup__close:hover,
.mtt-popup__close:focus-visible {
	opacity: 1;
}

.mtt-popup__close:focus-visible {
	outline: none;
	box-shadow: none;
}

.mtt-popup__content {
	flex: 1 1 auto;
	min-height: 0;
	height: 100%;
	overflow: hidden;
}

.mtt-popup__screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.mtt-popup .wp-block {
	max-width: 100%;
}

.mtt-popup .alignwide,
.mtt-popup .alignfull {
	width: 100%;
	max-width: 100%;
	margin-right: 0;
	margin-left: 0;
}

.mtt-popup__content > .mtt-popup-pattern {
	margin: 0;
}

.mtt-popup-pattern.wp-block-cover {
	--mtt-popup-frame-height: min(620px, calc(100dvh - 48px));
	height: var(--mtt-popup-frame-height);
	min-height: var(--mtt-popup-frame-height);
	overflow: hidden;
	background-color: var(--wp--preset--color--cream, #faf7f1);
	box-sizing: border-box;
}

.mtt-popup-pattern.wp-block-cover .wp-block-cover__inner-container {
	width: 100%;
	max-width: none;
	height: 100%;
	min-height: inherit;
	margin: 0;
}

.mtt-popup-pattern__layout.wp-block-media-text {
	display: grid;
	gap: 40px;
	grid-template-columns: minmax(320px, 409px) minmax(0, 1fr);
	align-items: center;
	height: 100%;
	min-height: min(620px, calc(100dvh - 48px));
	padding: 40px 20px 40px 90px;
	box-sizing: border-box;
}

.mtt-popup-pattern__layout.wp-block-media-text.has-media-on-the-right {
	grid-template-areas: "content media";
}

.mtt-popup-pattern__layout .wp-block-media-text__content {
	min-width: 0;
	padding: 0;
}

.mtt-popup-pattern__content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 20px;
	min-width: 0;
	padding: 0;
}

.mtt-popup-pattern__eyebrow,
.mtt-popup-pattern__content > .mtt-popup-pattern__eyebrow {
	margin: 0;
	font-family: var(--wp--preset--font-family--im-fell-great-primer, serif);
	font-size: 16px;
	line-height: 1.23;
	letter-spacing: 1.28px;
	text-transform: uppercase;
}

.mtt-popup-pattern__title,
.mtt-popup-pattern__content > .mtt-popup-pattern__title {
	margin: 14px 0 0;
	font-family: var(--wp--preset--font-family--im-fell-great-primer, serif);
	font-size: 50px;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: -1px;
	text-transform: uppercase;
}

.mtt-popup-pattern__title em {
	font-style: italic;
}

.mtt-popup-pattern__description,
.mtt-popup-pattern__content > .mtt-popup-pattern__description {
	margin: 0;
	font-family: var(--wp--preset--font-family--im-fell-great-primer, serif);
	font-size: 20px;
	font-weight: 400;
	line-height: 25px;
	letter-spacing: 0;
	text-wrap: pretty;
}

.mtt-popup-pattern__actions,
.mtt-popup-pattern__content > .mtt-popup-pattern__actions {
	margin-top: 0;
}

.mtt-popup-pattern__actions .wp-block-button {
	margin: 0;
}

.mtt-popup-pattern__actions .wp-block-button__link {
	color: var(--wp--preset--color--almond, #613a25);
	background: var(--wp--preset--color--cream, #faf7f1);
}

.mtt-popup-pattern__actions .wp-block-button__link:hover,
.mtt-popup-pattern__actions .wp-block-button__link:focus-visible {
	background: #f3ead8;
}

.mtt-popup-pattern__layout .wp-block-media-text__media {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-width: 0;
	height: calc(var(--mtt-popup-frame-height) - 80px);
	max-height: calc(var(--mtt-popup-frame-height) - 80px);
	margin: 0;
	align-self: stretch;
	justify-self: end;
	width: min(100%, 470px);
	overflow: hidden;
	transform: translate(10px, -12px);
	filter: none;
}

.mtt-popup-pattern__layout .wp-block-media-text__media img {
	display: block;
	width: 100%;
	max-width: 100%;
	max-height: 100%;
	height: 100%;
	object-fit: contain;
	object-position: left center;
}

.mtt-popup-pattern__layout .wp-block-media-text__media .components-placeholder,
.mtt-popup-pattern__layout .wp-block-media-text__media .components-placeholder__label,
.mtt-popup-pattern__layout .wp-block-media-text__media .components-placeholder__fieldset {
	min-height: 320px;
}

@media (max-width: 900px) {
	.mtt-popup {
		padding: 16px;
	}

	.mtt-popup__dialog {
		width: min(100%, 680px);
		max-width: calc(100dvw - 32px);
		max-height: calc(100dvh - 32px);
	}

	.mtt-popup__close {
		top: 16px;
		right: 16px;
		width: 30px;
		height: 30px;
	}

	.mtt-popup-pattern.wp-block-cover {
		height: auto;
		min-height: auto;
	}

	.mtt-popup-pattern__layout.wp-block-media-text {
		grid-template-columns: 1fr;
		gap: 24px;
		height: auto;
		min-height: auto;
		padding: 76px 28px 32px;
	}

	.mtt-popup-pattern__layout .wp-block-media-text__content,
	.mtt-popup-pattern__content {
		max-width: 100%;
	}

	.mtt-popup-pattern__content {
		align-items: flex-start;
		gap: 10px;
	}

	.mtt-popup-pattern__layout .wp-block-media-text__media {
		display: block;
		height: auto;
		max-height: none;
		width: min(76vw, 320px);
		margin-inline: auto;
		align-self: center;
		justify-self: center;
		overflow: visible;
		transform: translateY(4px);
	}

	.mtt-popup-pattern__layout .wp-block-media-text__media img {
		height: auto;
	}

	.mtt-popup-pattern__title,
	.mtt-popup-pattern__content > .mtt-popup-pattern__title {
		font-size: 30px;
		line-height: 1.27;
		letter-spacing: -0.6px;
	}

	.mtt-popup-pattern__description,
	.mtt-popup-pattern__content > .mtt-popup-pattern__description {
		max-width: 24ch;
		font-size: 19px;
	}

	.mtt-popup-pattern__layout .wp-block-media-text__media img {
		max-height: 42vh;
	}
}

@media (max-width: 1180px) and (min-width: 901px) {
	.mtt-popup__dialog {
		width: min(1040px, calc(100dvw - 48px));
	}

	.mtt-popup-pattern__layout.wp-block-media-text {
		grid-template-columns: 1fr 1fr;
		padding: 40px 32px 40px 40px;
	}

	.mtt-popup-pattern__layout .wp-block-media-text__media {
		width: min(100%, 420px);
		transform: translate(0, -8px);
	}
}

@media (max-width: 782px) {
	.mtt-popup {
		padding: 12px;
	}

	.mtt-popup__dialog {
		width: min(350px, calc(100dvw - 24px));
		max-width: calc(100dvw - 24px);
		max-height: calc(100dvh - 24px);
	}

	.mtt-popup__close {
		top: 12px;
		right: 12px;
		width: 28px;
		height: 28px;
		font-size: 28px;
	}

	.mtt-popup-pattern.wp-block-cover {
		height: auto;
		min-height: 0;
	}

	.mtt-popup-pattern__layout.wp-block-media-text {
		grid-template-columns: 1fr;
		grid-template-rows: auto auto auto auto;
		gap: 18px;
		height: auto;
		min-height: auto;
		padding: 22px 22px 0;
	}

	.mtt-popup-pattern__layout .wp-block-media-text__content {
		grid-row: 1;
	}

	.mtt-popup-pattern__layout .wp-block-media-text__media {
		grid-row: 2;
	}

	.mtt-popup-pattern__content {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 18px;
	}

	.mtt-popup-pattern__eyebrow,
	.mtt-popup-pattern__content > .mtt-popup-pattern__eyebrow {
		max-width: 260px;
		font-size: 16px;
		line-height: 1.23;
		letter-spacing: 1.28px;
		text-align: center;
	}

	.mtt-popup-pattern__title,
	.mtt-popup-pattern__content > .mtt-popup-pattern__title {
		max-width: 270px;
		margin-top: 0;
		font-size: 30px;
		line-height: 1.27;
		letter-spacing: -0.6px;
		text-align: center;
	}

	.mtt-popup-pattern__description,
	.mtt-popup-pattern__content > .mtt-popup-pattern__description {
		display: none;
	}

	.mtt-popup-pattern__layout .wp-block-media-text__media {
		display: block;
		height: auto;
		max-height: none;
		align-self: end;
		justify-self: center;
		width: min(100%, 290px);
		margin-top: 6px;
		overflow: visible;
		transform: none;
		filter: none;
	}

	.mtt-popup-pattern__layout .wp-block-media-text__media img {
		height: auto;
		max-height: 260px;
		object-position: center bottom;
	}

	.mtt-popup-pattern__actions,
	.mtt-popup-pattern__content > .mtt-popup-pattern__actions {
		margin-top: 0;
	}

	.mtt-popup-pattern__actions .wp-block-button,
	.mtt-popup-pattern__actions .wp-block-button__link {
		width: auto;
	}

	.mtt-popup-pattern__actions .wp-block-button__link {
		padding-inline: 28px;
	}
}
