/**
 * Blazesoft Popups Pro — front-end styles.
 *
 * Ported from blazesoft-popups/assets/css/blazesoft-popups.css (bsf-popup* renamed to
 * bsfpro-popup*), merged with accessibility-relevant styles from custom-popup-manager's
 * assets/css/popup.css (focus-visible outlines), plus new rules for overlay blur, card
 * background/border colors, and the [bsfpro_timer] shortcode output.
 *
 * Two layout variants:
 *   .bsfpro-popup--modal  — large, centered, dimmed overlay behind it
 *   .bsfpro-popup--corner — small floating card anchored to a screen corner
 */

.bsfpro-popup {
	--bsfpro-card-radius: 16px;
	--bsfpro-cta-border: #ffffff;
	--bsfpro-focus-ring: transparent;
	position: fixed;
	z-index: 100000;
	inset: 0;
	display: flex;
	pointer-events: none;
}

.bsfpro-popup[hidden] {
	display: none;
}

.bsfpro-popup__overlay {
	position: absolute;
	inset: 0;
	background: var( --bsfpro-overlay-bg, rgba( 8, 10, 30, 0.72 ) );
	opacity: 0;
	transition: opacity var( --bsfpro-anim-duration, 350ms ) ease;
	pointer-events: auto;
}

.bsfpro-popup.is-open .bsfpro-popup__overlay {
	opacity: 1;
	backdrop-filter: blur( var( --bsfpro-overlay-blur, 0px ) );
	-webkit-backdrop-filter: blur( var( --bsfpro-overlay-blur, 0px ) );
}

.bsfpro-popup__card {
	position: relative;
	width: 100%;
	height: var( --bsfpro-height-desktop, 460px );
	overflow: hidden;
	left: var( --bsfpro-card-left, 0 );
	right: var( --bsfpro-card-right, 0 );
	pointer-events: auto;
	opacity: 0;
	border-radius: var( --bsfpro-card-radius, 16px );
	background-color: var( --bsfpro-card-bg, transparent );
	border-width: var( --bsfpro-card-border-width, 0 );
	border-style: solid;
	border-color: var( --bsfpro-card-border-color, transparent );
	transition: opacity var( --bsfpro-anim-duration, 350ms ) ease, transform var( --bsfpro-anim-duration, 350ms ) ease;
}

.bsfpro-popup.is-open .bsfpro-popup__card {
	opacity: 1;
	transform: none !important;
}

/* ---------------- Modal variant ---------------- */

.bsfpro-popup--modal {
	align-items: center;
	justify-content: center;
}

.bsfpro-popup--modal .bsfpro-popup__card {
	max-width: var( --bsfpro-width-desktop, 470px );
}

/* ---------------- Corner variant ---------------- */

.bsfpro-popup--corner {
	inset: auto;
	align-items: flex-end;
}

.bsfpro-popup--corner .bsfpro-popup__card {
	max-width: var( --bsfpro-width-mobile, 300px );
	height: var( --bsfpro-height-mobile, 340px );
}

.bsfpro-popup--bottom-right { bottom: 24px; right: 24px; }
.bsfpro-popup--bottom-left  { bottom: 24px; left: 24px; }
.bsfpro-popup--top-right    { top: 24px; right: 24px; }
.bsfpro-popup--top-left     { top: 24px; left: 24px; }

/* ---------------- Shared card contents ---------------- */

.bsfpro-popup__media {
	position: relative;
	width: 100%;
	line-height: 0;
}

.bsfpro-popup__image {
	display: block;
	width: 100%;
	height: auto;
}

.bsfpro-popup__close {
	position: absolute;
	top: var( --bsfpro-close-top, 16px );
	right: var( --bsfpro-close-right, 16px );
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: none;
	background: rgba( 255, 255, 255, 0.14 );
	color: #ffffff;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2;
}

.bsfpro-popup__close:hover {
	background: rgba( 255, 255, 255, 0.25 );
}

.bsfpro-popup__close:focus-visible,
.bsfpro-popup__cta:focus-visible,
.bsfpro-popup__timer:focus-visible {
	outline: 2px solid var( --bsfpro-focus-ring );
	outline-offset: 2px;
}

.bsfpro-popup__close--image {
	background: none;
	padding: 0;
}

.bsfpro-popup__close--image:hover {
	background: none;
}

.bsfpro-popup__close-image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.bsfpro-popup__body {
	position: absolute;
	top: var( --bsfpro-body-top-padding, 50% );
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1;
	text-align: center;
	color: #ffffff;
	padding: var( --bsfpro-body-padding, 20px 28px 28px 28px );
}

.bsfpro-popup__heading {
	margin: 0 0 var( --bsfpro-gap-heading-description-desktop, 12px );
	font-size: 26px;
	font-weight: 800;
	text-transform: uppercase;
	line-height: 1.2;
	letter-spacing: 0.02em;
}

.bsfpro-popup--corner .bsfpro-popup__heading {
	font-size: 18px;
}

.bsfpro-popup__description {
	margin: 0 0 var( --bsfpro-gap-description-cta-desktop, 16px );
	font-size: 15px;
	line-height: 1.5;
	color: rgba( 255, 255, 255, 0.82 );
}

.bsfpro-popup--corner .bsfpro-popup__description {
	font-size: 13px;
}

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

.bsfpro-popup__countdown,
.bsfpro-popup__timer {
	display: inline-block;
	margin: 0 0 16px;
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: #ffffff;
}

.bsfpro-popup__timer-label {
	font-weight: 400;
	opacity: 0.8;
}

.bsfpro-popup__cta {
	display: inline-block;
	width: 100%;
	box-sizing: border-box;
	padding: 14px 24px;
	border: 2px solid var( --bsfpro-cta-border );
	border-radius: 10px;
	background: rgba( 255, 255, 255, 0.06 );
	color: #ffffff;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	text-decoration: none;
	transition: background 0.2s ease;
}

.bsfpro-popup__cta--image {
	padding: 0;
	border: none;
	border-radius: 0;
	background: none;
}

.bsfpro-popup__cta-image {
	display: block;
	width: 100%;
	height: auto;
}

.bsfpro-popup__cta:hover {
	background: rgba( 255, 255, 255, 0.16 );
	color: #ffffff;
}

.bsfpro-popup__cta--image:hover {
	background: none;
}

.bsfpro-popup--corner .bsfpro-popup__cta {
	padding: 10px 18px;
	font-size: 13px;
}

.bsfpro-popup--corner .bsfpro-popup__body {
	padding-left: 20px;
	padding-right: 20px;
	padding-bottom: 20px;
}

/* ---------------- Entrance animation starting states ---------------- */

.bsfpro-popup[data-animation="slide-up"] .bsfpro-popup__card    { transform: translateY( 40px ); }
.bsfpro-popup[data-animation="slide-down"] .bsfpro-popup__card  { transform: translateY( -40px ); }
.bsfpro-popup[data-animation="slide-left"] .bsfpro-popup__card  { transform: translateX( 40px ); }
.bsfpro-popup[data-animation="slide-right"] .bsfpro-popup__card { transform: translateX( -40px ); }
.bsfpro-popup[data-animation="zoom"] .bsfpro-popup__card        { transform: scale( 0.85 ); }
.bsfpro-popup[data-animation="none"] .bsfpro-popup__card        { transition: none; }

@media ( max-width: 480px ) {
	.bsfpro-popup--modal {
		padding: var( --bsfpro-modal-edge-padding, 20px );
	}

	.bsfpro-popup--modal .bsfpro-popup__card {
		max-width: var( --bsfpro-width-mobile, 300px );
		height: var( --bsfpro-height-mobile, 340px );
	}

	.bsfpro-popup__heading {
		margin-bottom: var( --bsfpro-gap-heading-description-mobile, 8px );
	}

	.bsfpro-popup__description {
		margin-bottom: var( --bsfpro-gap-description-cta-mobile, 12px );
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.bsfpro-popup__overlay,
	.bsfpro-popup__card {
		transition-duration: 1ms !important;
	}
}
