/* HHH Event Banner Popup – all selectors are prefixed with "hhhep-" to avoid theme/plugin conflicts. */

.hhhep-overlay {
	--hhhep-max-width: 560px;
	--hhhep-gap: 24px;
	position: fixed !important;
	top: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	left: 0 !important;
	z-index: 2147483000 !important; /* above Elementor/Divi sticky headers */
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center;
	-webkit-box-pack: center;
	-ms-flex-pack: center;
	justify-content: center;
	box-sizing: border-box;
	margin: 0 !important;
	padding: var(--hhhep-gap);
	background: rgba(10, 12, 18, 0.72);
	opacity: 0;
	visibility: hidden;
	-webkit-transition: opacity 0.35s ease, visibility 0s linear 0.35s;
	transition: opacity 0.35s ease, visibility 0s linear 0.35s;
	-webkit-tap-highlight-color: transparent;
	overscroll-behavior: contain;
	-ms-touch-action: none;
	touch-action: none;
}

.hhhep-overlay[hidden] {
	display: none !important;
}

.hhhep-overlay.hhhep-is-visible {
	opacity: 1;
	visibility: visible;
	-webkit-transition: opacity 0.35s ease, visibility 0s linear 0s;
	transition: opacity 0.35s ease, visibility 0s linear 0s;
}

.hhhep-overlay *,
.hhhep-overlay *::before,
.hhhep-overlay *::after {
	box-sizing: border-box;
}

.hhhep-dialog {
	position: relative;
	display: inline-block;
	margin: 0;
	padding: 0;
	line-height: 0;
	-webkit-transform: translateY(10px) scale(0.97);
	transform: translateY(10px) scale(0.97);
	-webkit-transition: -webkit-transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
	transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
	touch-action: auto;
}

.hhhep-dialog:focus {
	outline: none !important;
}

.hhhep-overlay.hhhep-is-visible .hhhep-dialog {
	-webkit-transform: none;
	transform: none;
}

/* The banner keeps its natural aspect ratio: width/height auto + both max limits. */
.hhhep-overlay .hhhep-img {
	display: block !important;
	width: auto !important;
	height: auto !important;
	max-width: calc(100vw - (var(--hhhep-gap) * 2) - 16px) !important;
	max-width: min(var(--hhhep-max-width), calc(100vw - (var(--hhhep-gap) * 2) - 16px)) !important;
	max-height: calc(100vh - (var(--hhhep-gap) * 2)) !important;
	max-height: calc(100dvh - (var(--hhhep-gap) * 2)) !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 10px;
	-o-object-fit: contain;
	object-fit: contain;
	background: #fff;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
	-webkit-user-select: none;
	user-select: none;
}

/* Close button – hard reset so theme/Elementor/Divi button styles never leak in. */
.hhhep-overlay .hhhep-close {
	position: absolute !important;
	top: -16px !important;
	right: -16px !important;
	z-index: 2 !important;
	display: -webkit-box !important;
	display: -ms-flexbox !important;
	display: flex !important;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center !important;
	-webkit-box-pack: center;
	-ms-flex-pack: center;
	justify-content: center !important;
	width: 40px !important;
	height: 40px !important;
	min-width: 0 !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 2px solid #fff !important;
	border-radius: 50% !important;
	background: #1d1d1f !important;
	color: #fff !important;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
	font: inherit;
	line-height: 1 !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	cursor: pointer !important;
	-webkit-appearance: none !important;
	-moz-appearance: none !important;
	appearance: none !important;
	-webkit-transition: background-color 0.2s ease, -webkit-transform 0.2s ease;
	transition: background-color 0.2s ease, transform 0.2s ease;
	touch-action: manipulation;
}

.hhhep-overlay .hhhep-close:hover {
	background: #b3122e !important;
	-webkit-transform: scale(1.06);
	transform: scale(1.06);
}

.hhhep-overlay .hhhep-close:focus {
	outline: none !important;
}

.hhhep-overlay .hhhep-close:focus-visible {
	outline: 3px solid #ffd166 !important;
	outline-offset: 2px !important;
}

.hhhep-overlay .hhhep-close svg {
	display: block;
	width: 18px;
	height: 18px;
	pointer-events: none;
}

.hhhep-sr-only {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* Tablet */
@media (max-width: 1024px) {
	.hhhep-overlay {
		--hhhep-gap: 22px;
	}
}

/* Mobile */
@media (max-width: 600px) {
	.hhhep-overlay {
		--hhhep-gap: 20px;
	}
	.hhhep-overlay .hhhep-img {
		border-radius: 8px;
	}
	.hhhep-overlay .hhhep-close {
		top: -14px !important;
		right: -12px !important;
		width: 38px !important;
		height: 38px !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hhhep-overlay,
	.hhhep-overlay.hhhep-is-visible,
	.hhhep-dialog {
		-webkit-transition: none !important;
		transition: none !important;
	}
}
