/* AXI Event Popup — premium UI matching design reference */

.axi-event-popup {
	--axi-popup-width: 640px;
	--axi-popup-radius: 28px;
	--axi-popup-border: transparent;
	--axi-popup-accent: #1a73e8;
	--axi-popup-button: #1a73e8;
	--axi-popup-button-2: #0b57d0;
	--axi-popup-overlay: rgba(15, 23, 42, 0.55);
	--axi-popup-text: #0f172a;
	--axi-popup-muted: #475467;
	--axi-popup-gap: 10px;
	--axi-popup-pad: 40px 44px 36px;
	--axi-popup-img-h: 148px;
	--axi-popup-z: 999999;

	position: fixed;
	inset: 0;
	z-index: var(--axi-popup-z);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	line-height: 1.5;
	color: var(--axi-popup-text);
}

.axi-event-popup[hidden] {
	display: none !important;
}

.axi-event-popup *,
.axi-event-popup *::before,
.axi-event-popup *::after {
	box-sizing: border-box;
}

.axi-event-popup figure,
.axi-event-popup p,
.axi-event-popup h1,
.axi-event-popup h2,
.axi-event-popup h3,
.axi-event-popup img,
.axi-event-popup a {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
	text-decoration: none;
}

.axi-event-popup__overlay {
	position: absolute;
	inset: 0;
	background: var(--axi-popup-overlay);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.32s ease;
}

.axi-event-popup__dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: var(--axi-popup-width);
	max-height: calc(100vh - 48px);
	overflow-x: hidden;
	overflow-y: auto;
	background: #ffffff;
	border: 0;
	border-radius: var(--axi-popup-radius);
	padding: var(--axi-popup-pad);
	box-shadow:
		0 2px 8px rgba(15, 23, 42, 0.06),
		0 24px 64px rgba(15, 23, 42, 0.22);
	outline: none;
	opacity: 0;
	transform: translateY(12px) scale(0.97);
	transition: opacity 0.32s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	scrollbar-color: #e2e8f0 transparent;
}

.axi-event-popup__dialog::-webkit-scrollbar {
	width: 6px;
}

.axi-event-popup__dialog::-webkit-scrollbar-thumb {
	background: #e2e8f0;
	border-radius: 6px;
}

.axi-event-popup__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	text-align: center;
	padding-top: 4px;
	padding-right: 8px;
}

.axi-event-popup.is-open .axi-event-popup__overlay {
	opacity: 1;
}

.axi-event-popup.is-open .axi-event-popup__dialog {
	opacity: 1;
	transform: translateY(0) scale(1);
}

.axi-event-popup--fade .axi-event-popup__dialog {
	transform: none;
}

.axi-event-popup--none .axi-event-popup__overlay,
.axi-event-popup--none .axi-event-popup__dialog {
	transition: none;
	transform: none;
}

.axi-event-popup--none.is-open .axi-event-popup__dialog {
	opacity: 1;
}

/* Close — square chip, theme-safe */
.axi-event-popup__close {
	position: absolute;
	top: 20px;
	right: 20px;
	z-index: 20;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 44px !important;
	height: 44px !important;
	min-width: 44px !important;
	min-height: 44px !important;
	max-width: 44px !important;
	max-height: 44px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 1px solid #e5e7eb !important;
	border-radius: 12px !important;
	background: #ffffff !important;
	box-shadow: 0 4px 16px rgba(15, 23, 42, 0.14) !important;
	color: #334155 !important;
	line-height: 0 !important;
	flex: 0 0 auto !important;
	aspect-ratio: 1 / 1;
	cursor: pointer;
	overflow: hidden;
	appearance: none;
	-webkit-appearance: none;
	transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.axi-event-popup__close svg {
	display: block;
	width: 18px !important;
	height: 18px !important;
	flex-shrink: 0;
}

.axi-event-popup__close:hover,
.axi-event-popup__close:focus-visible {
	background: #f8fafc !important;
	color: #0f172a !important;
	outline: none;
	transform: scale(1.05);
	box-shadow:
		0 4px 12px rgba(15, 23, 42, 0.1),
		0 14px 32px rgba(15, 23, 42, 0.2) !important;
}

.axi-event-popup__close:focus-visible {
	box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.35), 0 10px 28px rgba(15, 23, 42, 0.16) !important;
}

/* Badge — text only, no icon */
.axi-event-popup__badge {
	display: inline-flex;
	align-self: flex-start;
	align-items: center;
	justify-content: center;
	margin: 0 0 22px;
	padding: 7px 16px;
	border: 1.5px solid var(--axi-popup-accent);
	border-radius: 999px;
	background: transparent !important;
	color: var(--axi-popup-accent) !important;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.08em;
	line-height: 1.2;
	text-transform: uppercase;
	white-space: nowrap;
}

/* Gallery viewport — nav overlays image edges */
.axi-event-popup__gallery-wrap {
	width: 100%;
	margin: 2px 0 28px;
}

.axi-event-popup__gallery-viewport {
	position: relative;
	width: 100%;
	height: var(--axi-popup-img-h);
}

.axi-event-popup__gallery {
	display: flex;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: var(--axi-popup-gap);
	width: 100%;
	height: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.axi-event-popup__gallery::-webkit-scrollbar {
	display: none;
}

.axi-event-popup__item {
	flex: 1 1 0;
	min-width: 0;
	position: relative;
	overflow: hidden;
	border-radius: 14px;
	background: #eef2f7;
	line-height: 0;
	height: 100%;
	box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
}

/* 1 image full width */
.axi-event-popup__gallery-wrap[data-count="1"] .axi-event-popup__gallery-viewport {
	height: 160px;
}

.axi-event-popup__gallery-wrap[data-count="1"] .axi-event-popup__item {
	min-width: 100%;
}

/* 2–6 images: equal cards filling row */
.axi-event-popup__gallery-wrap[data-count="2"] .axi-event-popup__gallery,
.axi-event-popup__gallery-wrap[data-count="3"] .axi-event-popup__gallery,
.axi-event-popup__gallery-wrap[data-count="4"] .axi-event-popup__gallery,
.axi-event-popup__gallery-wrap[data-count="5"] .axi-event-popup__gallery,
.axi-event-popup__gallery-wrap[data-count="6"] .axi-event-popup__gallery {
	overflow-x: hidden;
}

.axi-event-popup__gallery-wrap[data-count="2"] .axi-event-popup__item,
.axi-event-popup__gallery-wrap[data-count="3"] .axi-event-popup__item,
.axi-event-popup__gallery-wrap[data-count="4"] .axi-event-popup__item,
.axi-event-popup__gallery-wrap[data-count="5"] .axi-event-popup__item,
.axi-event-popup__gallery-wrap[data-count="6"] .axi-event-popup__item {
	flex: 1 1 0;
	min-width: 0;
}

/* 7+ images: fixed card width + scroll */
.axi-event-popup__gallery-wrap[data-count]:not([data-count="1"]):not([data-count="2"]):not([data-count="3"]):not([data-count="4"]):not([data-count="5"]):not([data-count="6"]) .axi-event-popup__item {
	flex: 0 0 auto;
	width: calc((100% - (5 * var(--axi-popup-gap))) / 6);
	min-width: 88px;
	max-width: 110px;
}

.axi-event-popup__item img,
.axi-event-popup__image {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	object-fit: cover !important;
	object-position: center;
}

/* Slider arrows — centered on images, overlapping edges */
.axi-event-popup__nav {
	position: absolute;
	top: 50%;
	z-index: 6;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	margin: 0 !important;
	padding: 0 !important;
	border: 1px solid rgba(255, 255, 255, 0.9) !important;
	border-radius: 50%;
	background: #ffffff !important;
	box-shadow: 0 4px 18px rgba(15, 23, 42, 0.2) !important;
	color: #1e293b !important;
	line-height: 0;
	cursor: pointer;
	transform: translateY(-50%);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	pointer-events: auto;
}

.axi-event-popup__nav svg {
	display: block;
	flex-shrink: 0;
}

.axi-event-popup__nav:hover,
.axi-event-popup__nav:focus-visible {
	transform: translateY(-50%) scale(1.07);
	background: #ffffff !important;
	outline: none;
	box-shadow: 0 6px 22px rgba(15, 23, 42, 0.26) !important;
}

.axi-event-popup__nav--prev {
	left: 4px;
}

.axi-event-popup__nav--next {
	right: 4px;
}

/* Title — centered */
.axi-event-popup__title {
	display: block !important;
	margin: 0 0 14px !important;
	padding: 0 8px !important;
	color: var(--axi-popup-text) !important;
	font-size: 28px !important;
	font-weight: 800 !important;
	line-height: 1.22 !important;
	letter-spacing: -0.03em;
	text-align: center !important;
}

.axi-event-popup__title-accent {
	color: var(--axi-popup-accent) !important;
}

.axi-event-popup__divider {
	width: 56px;
	height: 3px;
	margin: 0 auto 18px;
	border-radius: 999px;
	background: linear-gradient(90deg, #7dd3fc 0%, var(--axi-popup-accent) 55%, var(--axi-popup-button-2) 100%);
}

.axi-event-popup__description {
	display: block !important;
	max-width: 520px;
	margin: 0 auto 22px !important;
	padding: 0 6px !important;
	color: var(--axi-popup-muted) !important;
	font-size: 15px !important;
	font-weight: 400 !important;
	line-height: 1.7 !important;
	text-align: center !important;
}

/* CTA — pill gradient + arrow chip */
.axi-event-popup__cta-wrap {
	display: flex;
	justify-content: center;
	width: 100%;
	margin: 0;
}

.axi-event-popup__cta {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 12px;
	min-width: 260px;
	min-height: 54px;
	padding: 12px 14px 12px 28px;
	border: 0 !important;
	border-radius: 999px;
	background: linear-gradient(90deg, #38bdf8 0%, var(--axi-popup-accent) 48%, var(--axi-popup-button-2) 100%) !important;
	color: #ffffff !important;
	font-size: 16px !important;
	font-weight: 700 !important;
	line-height: 1.2;
	text-align: center;
	text-decoration: none !important;
	cursor: pointer;
	box-shadow: 0 10px 28px rgba(26, 115, 232, 0.38);
	transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.axi-event-popup__cta:hover,
.axi-event-popup__cta:focus-visible {
	transform: translateY(-2px);
	filter: brightness(1.04);
	box-shadow: 0 14px 32px rgba(26, 115, 232, 0.45);
	outline: none;
	color: #ffffff !important;
	text-decoration: none !important;
}

.axi-event-popup__cta:focus-visible {
	box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.45), 0 14px 32px rgba(26, 115, 232, 0.4);
}

.axi-event-popup__cta:active {
	transform: translateY(0);
}

.axi-event-popup__cta-label {
	color: #ffffff;
}

.axi-event-popup__cta-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: #ffffff;
	color: var(--axi-popup-accent);
	flex-shrink: 0;
}

.axi-event-popup__cta-icon svg {
	display: block;
}

body.axi-event-popup-open {
	overflow: hidden;
}

.axi-event-popup-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 24px;
	border: 0;
	border-radius: 999px;
	background: #1a73e8;
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}

@media (max-width: 782px) {
	.axi-event-popup {
		--axi-popup-pad: 32px 24px 28px;
		--axi-popup-img-h: 128px;
		padding: 16px;
	}

	.axi-event-popup__title {
		font-size: 24px !important;
	}

	.axi-event-popup__description {
		font-size: 14px !important;
		margin-bottom: 20px !important;
	}

	.axi-event-popup__nav--prev {
		left: 2px;
	}

	.axi-event-popup__nav--next {
		right: 2px;
	}
}

@media (max-width: 560px) {
	.axi-event-popup {
		--axi-popup-pad: 28px 18px 24px;
		--axi-popup-gap: 8px;
		--axi-popup-img-h: 118px;
		--axi-popup-radius: 22px;
		padding: 12px;
		align-items: flex-start;
		padding-top: max(12px, env(safe-area-inset-top));
	}

	.axi-event-popup__dialog {
		max-height: calc(100vh - 24px);
	}

	.axi-event-popup__close {
		top: 14px;
		right: 14px;
		width: 42px;
		height: 42px;
		border-radius: 12px;
	}

	.axi-event-popup__gallery-wrap {
		margin-bottom: 20px;
	}

	.axi-event-popup__badge {
		margin-bottom: 18px;
		padding: 6px 14px;
		font-size: 10px;
	}

	.axi-event-popup__item {
		border-radius: 12px;
	}

	.axi-event-popup__nav {
		width: 38px;
		height: 38px;
	}

	.axi-event-popup__nav--prev {
		left: 0;
	}

	.axi-event-popup__nav--next {
		right: 0;
	}

	.axi-event-popup__gallery-wrap[data-count="3"] .axi-event-popup__gallery,
	.axi-event-popup__gallery-wrap[data-count="4"] .axi-event-popup__gallery,
	.axi-event-popup__gallery-wrap[data-count="5"] .axi-event-popup__gallery,
	.axi-event-popup__gallery-wrap[data-count="6"] .axi-event-popup__gallery {
		overflow-x: auto;
	}

	.axi-event-popup__gallery-wrap[data-count="3"] .axi-event-popup__item,
	.axi-event-popup__gallery-wrap[data-count="4"] .axi-event-popup__item,
	.axi-event-popup__gallery-wrap[data-count="5"] .axi-event-popup__item,
	.axi-event-popup__gallery-wrap[data-count="6"] .axi-event-popup__item {
		flex: 0 0 auto;
		width: 88px;
		min-width: 88px;
	}

	.axi-event-popup__title {
		font-size: 22px !important;
		padding: 0 4px !important;
	}

	.axi-event-popup__description {
		font-size: 13.5px !important;
		line-height: 1.6 !important;
		margin-bottom: 18px !important;
	}

	.axi-event-popup__cta {
		width: 100%;
		min-width: 0;
		padding-left: 20px;
	}

	.axi-event-popup__cta-wrap {
		margin-bottom: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.axi-event-popup__overlay,
	.axi-event-popup__dialog,
	.axi-event-popup__close,
	.axi-event-popup__cta,
	.axi-event-popup__nav,
	.axi-event-popup__gallery {
		transition: none !important;
		scroll-behavior: auto;
	}

	.axi-event-popup__dialog {
		transform: none !important;
	}
}
