/*
 * Imani Blessed Friday Landing: sitewide popup.
 *
 * Loaded on every page while the popup is live, so it is kept small and every
 * rule is scoped to .imani-bfp. Tweak from Appearance > Customize > Additional CSS:
 *
 *   .imani-bfp { --bfp-gold: #E3A82B; }     "Extra" word
 *   .imani-bfp { --bfp-w: 360px; }          card width
 *   .imani-bfp { --bfp-h: 640px; }          card height
 *   .imani-bfp { --bfp-pos: 50% 30%; }      which part of the photo stays in view
 */

.imani-bfp {
	--bfp-gold: #e3a82b;
	--bfp-w: 360px;
	--bfp-h: 640px;
	--bfp-pos: 50% 30%;
	--bfp-serif: 'Cormorant Garamond', 'Playfair Display', 'Didot', 'Bodoni MT', Georgia, 'Times New Roman', serif;

	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 12px;
	box-sizing: border-box;
	font-family: inherit;
	font-size: 16px;
	line-height: 1.3;
	text-align: center;
	-webkit-text-size-adjust: 100%;
}

.imani-bfp[hidden] {
	display: none !important;
}

.imani-bfp *,
.imani-bfp *::before,
.imani-bfp *::after {
	box-sizing: border-box;
}

/* Reset what themes like to style globally. */
.imani-bfp h2,
.imani-bfp p {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	text-transform: none;
	letter-spacing: normal;
	font-style: normal;
}

.imani-bfp__backdrop {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background: rgba(0, 0, 0, 0.62);
	opacity: 0;
	transition: opacity 0.25s ease;
}

.imani-bfp.is-open .imani-bfp__backdrop {
	opacity: 1;
}

/* ------------------------------------------------------------------ card */

.imani-bfp__card:focus {
	outline: 0;
}

.imani-bfp__card {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items: center;
	width: min(var(--bfp-w), 100%);
	height: min(var(--bfp-h), 100%);
	overflow: hidden;
	color: #fff;
	background: #1c1511;
	border: 1px solid rgba(255, 255, 255, 0.9);
	border-radius: 10px;
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
	opacity: 0;
	transform: translateY(14px) scale(0.98);
	transition: opacity 0.25s ease, transform 0.25s ease;
	outline: 0;
}

.imani-bfp.is-open .imani-bfp__card {
	opacity: 1;
	transform: none;
}

.imani-bfp .imani-bfp__img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	object-fit: cover;
	object-position: var(--bfp-pos);
}

/* Darkens the top and bottom so the white text stays readable on any photo. */
.imani-bfp__shade {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background: linear-gradient(
		to bottom,
		rgba(0, 0, 0, 0.66) 0%,
		rgba(0, 0, 0, 0.4) 30%,
		rgba(0, 0, 0, 0.06) 50%,
		rgba(0, 0, 0, 0.1) 68%,
		rgba(0, 0, 0, 0.6) 100%
	);
	pointer-events: none;
}

.imani-bfp__top,
.imani-bfp__timer,
.imani-bfp .imani-bfp__cta {
	position: relative;
	z-index: 1;
}

/* ----------------------------------------------------------------- close */

.imani-bfp .imani-bfp__x {
	position: absolute;
	top: 6px;
	right: 6px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	box-shadow: none;
	color: #fff;
	line-height: 1;
	cursor: pointer;
	filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
	-webkit-appearance: none;
	appearance: none;
}

.imani-bfp .imani-bfp__x:hover {
	background: rgba(255, 255, 255, 0.18);
	color: #fff;
}

.imani-bfp .imani-bfp__x svg {
	display: block;
	width: 26px;
	height: 26px;
}

.imani-bfp .imani-bfp__x:focus-visible,
.imani-bfp .imani-bfp__cta:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

/* ------------------------------------------------------------------- top */

.imani-bfp__top {
	width: 100%;
	padding: 46px 14px 0;
}

.imani-bfp .imani-bfp__title {
	margin: 0 auto;
	padding: 0 0 10px;
	max-width: 100%;
	font-family: var(--bfp-serif);
	font-size: clamp(18px, 6.4vw, 25px);
	font-weight: 400;
	line-height: 1.15;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #fff;
	text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
	border-bottom: 1px solid rgba(255, 255, 255, 0.7);
	overflow-wrap: break-word;
}

.imani-bfp .imani-bfp__sub {
	margin-top: 10px;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #fff;
}

.imani-bfp__offers {
	display: flex;
	justify-content: center;
	align-items: stretch;
	margin-top: 14px;
}

.imani-bfp__offer {
	flex: 1 1 0;
	min-width: 0;
	padding: 0 8px;
}

.imani-bfp__offer + .imani-bfp__offer {
	border-left: 1px solid rgba(255, 255, 255, 0.6);
}

.imani-bfp .imani-bfp__cond {
	margin-bottom: 3px;
	font-size: 12px;
	line-height: 1.25;
	color: #fff;
}

.imani-bfp .imani-bfp__pct {
	display: flex;
	justify-content: center;
	align-items: baseline;
	gap: 4px;
	font-weight: 800;
	line-height: 1.1;
	text-transform: uppercase;
	text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.imani-bfp .imani-bfp__pre {
	font-size: 17px;
	color: var(--bfp-gold);
}

.imani-bfp .imani-bfp__num {
	font-size: 30px;
	color: #fff;
}

.imani-bfp .imani-bfp__post {
	font-size: 17px;
	color: #fff;
}

.imani-bfp .imani-bfp__code {
	margin-top: 3px;
	font-size: 12px;
	letter-spacing: 0.02em;
	color: #fff;
}

/* ----------------------------------------------------------------- timer */

.imani-bfp__timer {
	display: flex;
	justify-content: center;
	align-items: flex-start;
	gap: 8px;
	width: 100%;
	padding: 0 8px;
}

.imani-bfp__cell {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 54px;
}

.imani-bfp .imani-bfp__box {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 50px;
	height: 50px;
	background: #fff;
	color: #111;
	font-family: Georgia, 'Times New Roman', serif;
	font-size: 20px;
	font-weight: 700;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

.imani-bfp .imani-bfp__lab {
	margin-top: 7px;
	font-size: 15px;
	line-height: 1.1;
	color: #fff;
	text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

/* ---------------------------------------------------------------- button */

.imani-bfp .imani-bfp__cta,
.imani-bfp .imani-bfp__cta:hover,
.imani-bfp .imani-bfp__cta:focus,
.imani-bfp .imani-bfp__cta:active,
.imani-bfp .imani-bfp__cta:visited {
	display: inline-block;
	margin: 0 0 22px;
	padding: 12px 36px;
	border: 0;
	border-radius: 4px;
	background: #fff;
	color: #111;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.02em;
	text-align: center;
	text-decoration: none;
	text-transform: none;
	box-shadow: none;
}

.imani-bfp .imani-bfp__cta:hover {
	background: #f0e6d6;
}

/* ---------------------------------------------------------------- narrow */

@media (max-width: 400px) {
	.imani-bfp {
		padding: 10px;
	}

	.imani-bfp__top {
		padding-top: 44px;
	}

	.imani-bfp__timer {
		gap: 4px;
	}

	.imani-bfp .imani-bfp__box {
		width: 46px;
		height: 46px;
		font-size: 19px;
	}

	.imani-bfp__cell {
		min-width: 50px;
	}

	.imani-bfp .imani-bfp__lab {
		font-size: 14px;
	}
}

/* Short screens (phones on their side, small laptops). */
@media (max-height: 560px) {
	.imani-bfp .imani-bfp__title {
		font-size: 20px;
		padding-bottom: 6px;
	}

	.imani-bfp__top {
		padding-top: 34px;
	}

	.imani-bfp__offers {
		margin-top: 8px;
	}

	.imani-bfp .imani-bfp__num {
		font-size: 24px;
	}

	.imani-bfp .imani-bfp__cta {
		margin-bottom: 14px;
		padding: 9px 30px;
	}

	.imani-bfp .imani-bfp__box {
		width: 40px;
		height: 40px;
		font-size: 17px;
	}

	.imani-bfp .imani-bfp__lab {
		margin-top: 4px;
		font-size: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.imani-bfp__backdrop,
	.imani-bfp__card {
		transition: none;
	}

	.imani-bfp__card {
		transform: none;
	}
}

/* Old browsers without min() fall back to fixed sizes. */
@supports not (width: min(10px, 5px)) {
	.imani-bfp__card {
		width: 340px;
		max-width: 100%;
		height: 600px;
		max-height: 100%;
	}
}
