/* Iguana Events — accessible featured-event announcement. */

.igev-popup {
	position: fixed;
	inset: 0;
	z-index: 100000;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

/* The hidden attribute is the popup's single source of truth. Author CSS can
   otherwise override the browser's native [hidden] rule, making a dismissed
   or not-yet-triggered popup remain visibly stuck over the page. */
.igev-popup[hidden] {
	display: none !important;
}

.igev-popup:not([hidden]) {
	display: flex;
}

.igev-popup__overlay {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: auto;
	background: var(--igev-popup-overlay, rgba(20, 12, 8, .6));
	animation: igev-popup-fade .22s ease-out;
	will-change: opacity;
}

.igev-popup__card {
	position: relative;
	z-index: 1;
	width: var(--igev-popup-width, 460px);
	max-width: 100%;
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	overflow-y: auto;
	overscroll-behavior: contain;
	background: var(--igev-popup-bg, #fff);
	color: var(--igev-popup-text, #222);
	border-radius: var(--igev-popup-radius, 16px);
	box-shadow: 0 24px 64px rgba(0, 0, 0, .35);
	animation: igev-popup-rise .25s cubic-bezier(.2, .9, .3, 1.1);
	will-change: opacity, transform;
}

.igev-popup__card:focus { outline: none; }

@keyframes igev-popup-fade { from { opacity: 0; } }
@keyframes igev-popup-rise { from { opacity: 0; transform: translateY(18px) scale(.98); } }
@keyframes igev-popup-fade-out { to { opacity: 0; } }
@keyframes igev-popup-dismiss { to { opacity: 0; transform: translateY(12px) scale(.985); } }

.igev-popup.is-closing .igev-popup__overlay {
	animation: igev-popup-fade-out .2s ease-in both;
}

.igev-popup.is-closing .igev-popup__card {
	animation: igev-popup-dismiss .22s cubic-bezier(.4, 0, 1, 1) both;
}

.igev-popup__close {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 1;
	appearance: none;
	border: 1px solid rgba(255, 255, 255, .72);
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: rgba(20, 12, 8, .72);
	color: #fff;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	transition: background .15s ease, transform .15s ease;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
}

.igev-popup__close:active { transform: translateY(1px); }

.igev-popup__media img {
	display: block;
	width: 100%;
	height: 210px;
	object-fit: cover;
	border-radius: var(--igev-popup-radius, 16px) var(--igev-popup-radius, 16px) 0 0;
}

.igev-popup__body { padding: 1.35rem 1.5rem 1.5rem; }

.igev-popup__eyebrow {
	display: inline-block;
	margin-bottom: .35rem;
	color: var(--igev-accent, #b3452a);
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.igev-popup__title { margin: 0 0 .5rem; font-size: 1.5rem; line-height: 1.2; }
.igev-popup__when { margin: 0 0 .15rem; font-weight: 600; }
.igev-popup__loc { margin: 0 0 .5rem; font-size: .9rem; opacity: .74; }
.igev-popup__excerpt { margin: .6rem 0 0; font-size: .95rem; line-height: 1.55; }

.igev-popup__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.15rem; }

/* A manual pager gives multiple featured events a clear, accessible order.
   There is intentionally no timer or auto-advance. */
.igev-popup__pager {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: .75rem;
	padding: 0 1.5rem 1.35rem;
}

.igev-popup__nav {
	appearance: none;
	min-width: 44px;
	min-height: 44px;
	border: 1.5px solid var(--igev-accent, #b3452a);
	border-radius: var(--igev-popup-button-radius, 999px);
	background: transparent;
	color: var(--igev-accent, #b3452a);
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
}

.igev-popup__count { min-width: 3.5rem; text-align: center; font-size: .85rem; font-weight: 700; }

.igev-popup__btn {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: .55rem 1.1rem;
	border: 1.5px solid var(--igev-accent, #b3452a);
	border-radius: var(--igev-popup-button-radius, 999px);
	background: transparent;
	color: var(--igev-accent, #b3452a);
	font: inherit;
	font-size: .95rem;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	transition: background .15s ease, color .15s ease, transform .15s ease;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
}

.igev-popup__btn:active { transform: translateY(1px); }
.igev-popup__btn--primary { background: var(--igev-accent, #b3452a); color: #fff; }

@media (hover: hover) and (pointer: fine) {
	.igev-popup__close:hover { background: rgba(20, 12, 8, .92); }
	.igev-popup__btn:hover { background: rgba(179, 69, 42, .1); }
	.igev-popup__btn--primary:hover { background: var(--igev-accent-dark, #913824); color: #fff; }
}

.igev-popup__close:focus-visible,
.igev-popup__btn:focus-visible,
.igev-popup__nav:focus-visible {
	outline: 3px solid var(--igev-popup-focus, #0b74a5);
	outline-offset: 3px;
}

@media (max-width: 480px) {
	.igev-popup { align-items: flex-end; padding: 0; }
	.igev-popup__card { border-radius: var(--igev-popup-radius, 16px) var(--igev-popup-radius, 16px) 0 0; max-height: 88vh; max-height: 88dvh; }
	.igev-popup__media img { height: 160px; }
	.igev-popup__body { padding: 1.15rem 1.25rem 1.35rem; }
	.igev-popup__actions { display: grid; grid-template-columns: 1fr; }
	.igev-popup__btn { width: 100%; }
	.igev-popup__pager { padding-bottom: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
	.igev-popup__overlay,
	.igev-popup__card { animation: none; }
	.igev-popup__close,
	.igev-popup__btn,
	.igev-popup__nav { transition: none; }
}
