/* Mystifi cross-promo — Mystifi's look inside BioMyst. Popup (<dialog>) + thank-you card. */

.bm-mys {
	--mys-ink: #1c1f22;
	--mys-ink-2: rgba(28, 31, 34, .7);
	--mys-accent: #4b6776;
	--mys-fill: #b8d3e0;
	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
	color: var(--mys-ink);
	-webkit-font-smoothing: antialiased;
}

.bm-mys,
.bm-mys *,
.bm-mys *::before,
.bm-mys *::after {
	box-sizing: border-box;
}

dialog.bm-mys {
	padding: 0;
	margin: auto;
	border: 0;
	background: transparent;
	width: min(760px, calc(100vw - 32px));
	max-width: none;
	max-height: calc(100dvh - 32px);
	overflow: visible;
	color: var(--mys-ink);
}
dialog.bm-mys::backdrop {
	background: rgba(28, 31, 34, .38);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
}

.bm-mys__card {
	position: relative;
	display: grid;
	grid-template-columns: 5fr 6fr;
	border-radius: 28px;
	overflow: hidden;
	background: linear-gradient(155deg, #eef3f6 0%, #dde8ee 100%);
	border: 1px solid rgba(255, 255, 255, .7);
	box-shadow: 0 30px 80px -24px rgba(28, 31, 34, .45), inset 0 1px 0 rgba(255, 255, 255, .85);
	text-align: left;
}
dialog.bm-mys .bm-mys__card {
	max-height: calc(100dvh - 32px);
}

.bm-mys__media {
	position: relative;
	min-height: 100%;
	background: linear-gradient(180deg, #9fb7c3 0%, #b8d3e0 100%);
}
.bm-mys__media picture {
	display: contents;
}
.bm-mys__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: 50% 55%;
	display: block;
}

.bm-mys__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding: 46px 44px 34px 40px;
	min-width: 0;
	overflow-y: auto;
}

.bm-mys .bm-mys__logo {
	display: block;
	width: auto;
	height: 26px;
	margin: 0 0 30px;
}

.bm-mys .bm-mys__eyebrow {
	margin: 0 0 12px;
	font-size: 11px;
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--mys-accent);
}

.bm-mys .bm-mys__title {
	margin: 0 0 16px;
	font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
	font-style: italic;
	font-weight: 500;
	font-size: 44px;
	line-height: 1;
	letter-spacing: -.005em;
	color: var(--mys-ink);
	text-transform: none;
}

.bm-mys .bm-mys__text {
	margin: 0 0 18px;
	font-size: 15px;
	line-height: 1.55;
	color: var(--mys-ink-2);
}

.bm-mys .bm-mys__offer {
	margin: 0 0 26px;
	padding: 11px 14px;
	border-radius: 14px;
	background: rgba(184, 211, 224, .6);
	border: 1px solid rgba(255, 255, 255, .6);
	font-size: 13.5px;
	line-height: 1.45;
	color: var(--mys-ink);
}

.bm-mys .bm-mys__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 48px;
	padding: 0 28px;
	border-radius: 999px;
	background: #1c1f22;
	color: #fff;
	font-family: inherit;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	text-decoration: none;
	transition: background-color .2s ease;
}
.bm-mys .bm-mys__cta:hover,
.bm-mys .bm-mys__cta:focus-visible {
	background: #4b6776;
	color: #fff;
}

.bm-mys .bm-mys__dismiss {
	margin: 10px 0 0 -4px;
	min-height: 44px;
	padding: 0 4px;
	border: 0;
	background: none;
	font-family: inherit;
	font-size: 13px;
	color: var(--mys-ink-2);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
	box-shadow: none;
}
.bm-mys .bm-mys__dismiss:hover {
	color: var(--mys-ink);
	background: none;
}

.bm-mys .bm-mys__close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, .7);
	border-radius: 50%;
	background: rgba(255, 255, 255, .55);
	color: var(--mys-ink);
	cursor: pointer;
	box-shadow: none;
}
.bm-mys .bm-mys__close:hover {
	background: rgba(255, 255, 255, .85);
	color: var(--mys-ink);
}

.bm-mys a:focus-visible,
.bm-mys button:focus-visible {
	outline: 2px solid #4b6776;
	outline-offset: 3px;
}

@media (prefers-reduced-motion: no-preference) {
	dialog.bm-mys[open] {
		animation: bm-mys-in .32s cubic-bezier(.2, .8, .2, 1);
	}
	dialog.bm-mys[open]::backdrop {
		animation: bm-mys-fade .32s ease;
	}
}
@keyframes bm-mys-in {
	from { opacity: 0; transform: translateY(14px) scale(.985); }
	to   { opacity: 1; transform: none; }
}
@keyframes bm-mys-fade {
	from { opacity: 0; }
	to   { opacity: 1; }
}

/* Thank-you card. */
.bm-mys--card {
	margin: 32px 0 8px;
}
.bm-mys--card .bm-mys__card {
	box-shadow: 0 18px 50px -30px rgba(28, 31, 34, .4), inset 0 1px 0 rgba(255, 255, 255, .85);
}
.bm-mys--card .bm-mys__media {
	min-height: 300px;
}
.bm-mys--card .bm-mys__body {
	padding: 38px 40px 34px;
}
.bm-mys--card .bm-mys__title {
	font-size: 38px;
}

/* Phones: bottom sheet, no image. */
@media (max-width: 639.98px) {
	dialog.bm-mys {
		width: 100%;
		max-width: 100%;
		margin: auto 0 0;
		max-height: calc(100dvh - 24px);
	}
	.bm-mys__card {
		grid-template-columns: minmax(0, 1fr);
	}
	dialog.bm-mys .bm-mys__card {
		border-radius: 28px 28px 0 0;
		border-bottom: 0;
		max-height: calc(100dvh - 24px);
	}
	.bm-mys__media,
	.bm-mys--card .bm-mys__media {
		min-height: 0;
		aspect-ratio: 2 / 1;
	}
	.bm-mys__media img {
		object-position: 50% 50%;
	}
	dialog.bm-mys .bm-mys__body {
		overflow: visible;
	}
	dialog.bm-mys .bm-mys__card {
		overflow-y: auto;
	}
	.bm-mys__body,
	.bm-mys--card .bm-mys__body {
		padding: 32px 22px 22px;
	}
	dialog.bm-mys .bm-mys__body {
		padding-bottom: calc(18px + env(safe-area-inset-bottom));
	}
	.bm-mys .bm-mys__logo {
		height: 22px;
		margin-bottom: 22px;
	}
	.bm-mys .bm-mys__title,
	.bm-mys--card .bm-mys__title {
		font-size: 34px;
	}
	.bm-mys .bm-mys__cta {
		width: 100%;
	}
	.bm-mys .bm-mys__dismiss {
		align-self: center;
		margin: 6px 0 0;
	}
	@media (prefers-reduced-motion: no-preference) {
		dialog.bm-mys[open] {
			animation-name: bm-mys-up;
		}
	}
}
@keyframes bm-mys-up {
	from { transform: translateY(40px); opacity: .4; }
	to   { transform: none; opacity: 1; }
}
