/*! YOH Popup front-end styles */

.yoh-popup {
	--yoh-accent: #0a6cb5;
	--yoh-max-width: 640px;
	--yoh-radius: 10px;
	--yoh-bg: #fff;
	--yoh-text: #1f2430;
	--yoh-muted: #5b6472;
	position: fixed;
	z-index: 2147483000;
	font-family: inherit;
	line-height: 1.5;
	color: var(--yoh-text);
	-webkit-font-smoothing: antialiased;
}

.yoh-popup[hidden] { display: none !important; }

/* Modal */
.yoh-popup--popup {
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(15, 20, 30, 0.6);
	overflow-y: auto;
	overscroll-behavior: contain;
}

.yoh-popup--popup .yoh-popup__dialog {
	width: min(var(--yoh-max-width), 100%);
	max-height: calc(100dvh - 32px);
	margin: auto;
}

/* Fly-in */
.yoh-popup--flyin {
	bottom: 16px;
	right: 16px;
	width: min(var(--yoh-max-width), calc(100% - 32px));
}

.yoh-popup--flyin-left { right: auto; left: 16px; }

.yoh-popup--flyin .yoh-popup__dialog {
	width: 100%;
	max-height: calc(100dvh - 32px);
}

/* Dialog box */
.yoh-popup__dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--yoh-bg);
	border-radius: var(--yoh-radius);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
	overflow: hidden;
	box-sizing: border-box;
}

.yoh-popup__body {
	overflow-y: auto;
	overscroll-behavior: contain;
}

/* Close */
.yoh-popup__close {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
	cursor: pointer;
	display: grid;
	place-items: center;
	transition: transform 0.15s ease;
}

.yoh-popup__close:hover,
.yoh-popup__close:focus-visible { transform: scale(1.08); outline: 2px solid var(--yoh-accent); outline-offset: 2px; }

.yoh-popup__close::before,
.yoh-popup__close::after {
	content: "";
	position: absolute;
	width: 16px;
	height: 2px;
	background: #1f2430;
	border-radius: 2px;
	transform: rotate(45deg);
}

.yoh-popup__close::after { transform: rotate(-45deg); }

/* Image */
.yoh-popup__image {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
	margin: 0;
}

.yoh-popup__image-button {
	display: block;
	width: 100%;
	padding: 0;
	margin: 0;
	border: 0;
	background: none;
	cursor: pointer;
	line-height: 0;
}

.yoh-popup__image-button:focus-visible { outline: 3px solid var(--yoh-accent); outline-offset: -3px; }

/* Text */
.yoh-popup__text { padding: 22px 26px 4px; }

.yoh-popup__title,
.yoh-popup__text h2 {
	margin: 0 0 10px;
	font-size: 1.45em;
	line-height: 1.25;
	font-weight: 700;
	color: var(--yoh-text);
}

.yoh-popup__message { color: var(--yoh-muted); font-size: 1em; }
.yoh-popup__message p { margin: 0 0 0.8em; }
.yoh-popup__message p:last-child { margin-bottom: 0; }
.yoh-popup__message strong { color: var(--yoh-text); }

/* CTA */
.yoh-popup__content:empty { display: none; }
.yoh-popup__actions { padding: 18px 26px 24px; }

.yoh-popup__button {
	display: block;
	width: 100%;
	margin: 0 auto;
	padding: 15px 20px;
	border: 0;
	border-radius: 8px;
	background: var(--yoh-accent);
	color: #fff;
	font: inherit;
	font-size: 1.05em;
	font-weight: 700;
	letter-spacing: 0.01em;
	cursor: pointer;
	transition: filter 0.15s ease, transform 0.15s ease;
}

.yoh-popup__button:hover { filter: brightness(1.08); }
.yoh-popup__button:active { transform: translateY(1px); }
.yoh-popup__button:focus-visible { outline: 3px solid var(--yoh-accent); outline-offset: 3px; }

/* Animations */
@keyframes yoh-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes yoh-fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes yoh-slide-up { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes yoh-slide-down { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(28px); } }

.yoh-popup--visible.yoh-popup--anim-fade { animation: yoh-fade-in 0.35s ease both; }
.yoh-popup--visible.yoh-popup--anim-slide-up { animation: yoh-fade-in 0.35s ease both; }
.yoh-popup--visible.yoh-popup--anim-slide-up .yoh-popup__dialog { animation: yoh-slide-up 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both; }

.yoh-popup--closing.yoh-popup--anim-fade,
.yoh-popup--closing.yoh-popup--anim-slide-up { animation: yoh-fade-out 0.3s ease both; }
.yoh-popup--closing.yoh-popup--anim-slide-up .yoh-popup__dialog { animation: yoh-slide-down 0.3s ease both; }

@media (prefers-reduced-motion: reduce) {
	.yoh-popup, .yoh-popup .yoh-popup__dialog { animation: none !important; }
}

/* Body lock while a modal is open */
body.yoh-popup-open { overflow: hidden; }

/* Mobile */
@media (max-width: 767px) {
	.yoh-popup--hide-mobile { display: none !important; }
	.yoh-popup__image--hide-mobile { display: none !important; }
	.yoh-popup--flyin { left: 12px; right: 12px; bottom: 12px; width: auto; }
	.yoh-popup__text { padding: 18px 18px 4px; }
	.yoh-popup__actions { padding: 14px 18px 20px; }
}
