/**
 * News Element — Post Carousel block (from news-element's slider-5,
 * on Splide). Structure only; image height, padding, colours and arrow /
 * dot looks come from the block's controls.
 */

.ne-carousel-card {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.ne-carousel-card.is-flipped {
	flex-direction: column-reverse;
}

.ne-carousel .ft-thumbwrap {
	display: block;
}

/* Arrows: Splide's buttons, shown on hover like the original. */
.ne-carousel .splide__arrow {
	opacity: 0;
	z-index: 2;
	transition: opacity 0.3s ease, background 0.2s ease, color 0.2s ease;
}

.ne-carousel:hover .splide__arrow,
.ne-carousel .splide__arrow:focus-visible {
	opacity: 1;
}

.ne-carousel .splide__arrow svg {
	fill: currentColor;
}

/* Arrows sit on the left and right edges, centred vertically. :where() keeps the
   specificity low so the Arrows controls (size, vertical position, side offset) win. */
:where(.ne-pc) .splide__arrow {
	position: absolute;
	top: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	cursor: pointer;
	transform: translateY(-50%);
}

:where(.ne-pc) .splide__arrow--prev {
	left: 0;
}

:where(.ne-pc) .splide__arrow--next {
	right: 0;
}

:where(.ne-pc) .splide__arrow:disabled {
	opacity: 0.4;
}

/* Splide's core CSS doesn't flip the shared arrow icon for "previous". */
.ne-carousel .splide__arrow--prev svg {
	transform: scaleX(-1);
}

.ne-carousel .splide__pagination__page {
	width: 8px;
	height: 8px;
	margin: 0 5px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
}

/* Before Splide mounts (editor preview, no JavaScript): one row of three. */
.ne-carousel:not(.is-initialized) .splide__list {
	display: flex;
	gap: 30px;
	overflow: hidden;
}

.ne-carousel:not(.is-initialized) .splide__slide {
	flex: 0 0 calc((100% - 60px) / 3);
}

@media (prefers-reduced-motion: reduce) {
	.ne-carousel .splide__arrow {
		transition: none;
	}
}

/* Numbered counter (Show counter): a badge on the image's top-left corner.
   Size, offsets and colours come from the Counter controls. */
.ne-carousel .ne-ca-count {
	position: absolute;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	top: 15px;
	left: 15px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
	color: #fff;
	background: #e60023;
}
