/* =========================================================================
   Nantucket Events — advertisements (hero, sidebar, inline)
   Behaviour: assets/js/ads.js · Markup: NE_Ads::render_slider()
   ========================================================================= */

.ne-ad-slider {
	--ne-ad-accent: #1b3a5a;
	position: relative;
	margin: 0 0 1.25rem;
	line-height: 0; /* collapse gap under images */
}

.ne-ad-slider__track {
	display: grid; /* every slide shares one cell → height of the tallest */
}

.ne-ad-slide {
	grid-area: 1 / 1;
	min-width: 0;
}

.ne-ad-slide__link {
	display: block;
	height: 100%;
}

.ne-ad-slide__img,
.ne-ad-slide picture {
	display: block;
	width: 100%;
	height: 100%;
}

.ne-ad-slide__img {
	object-fit: cover;
}

/* Slider state (JS adds .is-slider only when 2+ ads are running) */
.ne-ad-slider.is-slider .ne-ad-slide {
	opacity: 0;
	visibility: hidden;
	transition: opacity .6s ease, visibility 0s linear .6s;
}

.ne-ad-slider.is-slider .ne-ad-slide.is-active {
	opacity: 1;
	visibility: visible;
	transition: opacity .6s ease, visibility 0s;
	z-index: 1;
}

.ne-ad-slider.is-reduced-motion .ne-ad-slide,
.ne-ad-slider.is-reduced-motion .ne-ad-slide.is-active {
	transition: none;
}

/* "Sponsored" tag (optional, Ad Settings) */
.ne-ad-slider__label {
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 3;
	padding: 2px 7px;
	border-radius: 3px;
	background: rgba(0, 0, 0, .55);
	color: #fff;
	font-size: 11px;
	line-height: 1.5;
	letter-spacing: .04em;
	text-transform: uppercase;
	pointer-events: none;
}

/* ─── Controls ─────────────────────────────────────────────────────────── */

.ne-ad-slider__controls {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 10px;
	z-index: 3;
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	line-height: 1;
	pointer-events: none; /* let clicks reach the ad between the buttons */
}

.ne-ad-slider__controls > *,
.ne-ad-slider__dots > * {
	pointer-events: auto;
}

.ne-ad-slider__dots {
	display: flex;
	gap: 6px;
	padding: 5px 8px;
	border-radius: 999px;
	background: rgba(0, 0, 0, .35);
	pointer-events: none;
}

.ne-ad-slider button {
	margin: 0;
	border: 0;
	font: inherit;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.ne-ad-slider__dot {
	width: 9px;
	height: 9px;
	padding: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .55);
	transition: background .2s, transform .2s;
}

.ne-ad-slider__dot[aria-current="true"] {
	background: #fff;
	transform: scale(1.2);
}

.ne-ad-slider__pause {
	position: relative;
	width: 26px;
	height: 26px;
	padding: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, .35);
	color: #fff;
}

/* pause icon (two bars) / play icon (triangle) drawn in CSS */
.ne-ad-slider__pause::before,
.ne-ad-slider__pause::after {
	content: "";
	position: absolute;
	top: 8px;
	width: 3px;
	height: 10px;
	background: currentColor;
}
.ne-ad-slider__pause::before { left: 9px; }
.ne-ad-slider__pause::after  { left: 14px; }

.ne-ad-slider__pause.is-paused::before {
	left: 10px;
	width: 0;
	height: 0;
	background: none;
	border-style: solid;
	border-width: 5px 0 5px 8px;
	border-color: transparent transparent transparent currentColor;
}
.ne-ad-slider__pause.is-paused::after { display: none; }

.ne-ad-slider__arrow {
	position: absolute;
	top: 50%;
	z-index: 3;
	width: 44px;
	height: 44px;
	padding: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, .35);
	color: #fff;
	font-size: 30px;
	line-height: 1;
	transform: translateY(-50%);
	opacity: .75;
	transition: opacity .2s, background .2s;
}
.ne-ad-slider__arrow span { display: block; margin-top: -3px; }
.ne-ad-slider__arrow--prev { left: 12px; }
.ne-ad-slider__arrow--next { right: 12px; }

.ne-ad-slider:hover .ne-ad-slider__arrow,
.ne-ad-slider:focus-within .ne-ad-slider__arrow {
	opacity: 1;
}

.ne-ad-slider button:hover {
	background-color: rgba(0, 0, 0, .6);
}
.ne-ad-slider .ne-ad-slider__dot:hover {
	background: #fff;
}

.ne-ad-slider button:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
	box-shadow: 0 0 0 4px var(--ne-ad-accent);
}

/* Touch screens: smaller arrows; swipe also works. */
@media (hover: none) {
	.ne-ad-slider__arrow {
		opacity: 1;
		width: 34px;
		height: 34px;
		font-size: 24px;
	}
}

/* ─── Hero ─────────────────────────────────────────────────────────────── */

.ne-ad-slider--hero {
	width: 100%;
	overflow: hidden;
}

/* ─── Sidebar (inside the calendar's sticky sidebar) ───────────────────── */

.ne-ad-slider--sidebar-square,
.ne-ad-slider--sidebar-rectangle {
	margin: 0;
	border: 1px solid rgba(0, 0, 0, .10);
	border-radius: 8px;
	overflow: hidden;
}

.ne-ad-slider--sidebar-square .ne-ad-slide__img,
.ne-ad-slider--sidebar-rectangle .ne-ad-slide__img {
	height: auto;
}

/* Rectangle ads are only ~100px tall — tuck the controls into the corner. */
.ne-ad-slider--sidebar-rectangle .ne-ad-slider__controls {
	bottom: 4px;
	right: 4px;
	left: auto;
	gap: 4px;
}
.ne-ad-slider--sidebar-rectangle .ne-ad-slider__pause {
	width: 20px;
	height: 20px;
	transform: scale(.8);
}
.ne-ad-slider--sidebar-rectangle .ne-ad-slider__dot {
	width: 7px;
	height: 7px;
}

/* ─── Inline (between event cards) ─────────────────────────────────────── */

.ne-inline-ad-slot {
	border-radius: 8px;
	overflow: hidden;
	line-height: 0;
}

.ne-inline-ad-slot a {
	display: block;
	line-height: 0;
}

.ne-inline-ad-slot img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 8px;
}
