/* EMPOLAS Banner Slider — frontend styles.
 * All rules are scoped to .ebs-slider so they cannot leak into Divi
 * or other page elements.
 */

.ebs-slider,
.ebs-slider * {
	box-sizing: border-box;
}

.ebs-slider {
	width: 100%;
	max-width: 100%;
	margin: 0 auto;
}

/* ---------- Stage ---------- */

.ebs-slider .ebs-stage {
	position: relative;
	display: grid;
	width: 100%;
	overflow: hidden;
	border-radius: 8px;
}

.ebs-slider .ebs-slide {
	grid-area: 1 / 1;
	width: 100%;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.5s ease, visibility 0.5s ease;
	z-index: 1;
}

.ebs-slider .ebs-slide.is-active {
	opacity: 1;
	visibility: visible;
	z-index: 2;
}

.ebs-slider .ebs-slide.ebs-ineligible {
	display: none;
}

.ebs-slider .ebs-slide picture,
.ebs-slider .ebs-slide img {
	display: block;
	width: 100%;
	height: auto;
}

.ebs-slider .ebs-slide-link {
	display: block;
	line-height: 0;
	text-decoration: none;
	box-shadow: none;
}

/* ---------- Arrows ---------- */

.ebs-slider .ebs-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	width: 40px;
	height: 40px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.75);
	color: #0f4596;
	font-size: 18px;
	line-height: 40px;
	text-align: center;
	cursor: pointer;
	opacity: 0.85;
	transition: opacity 0.2s ease, background 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.ebs-slider .ebs-arrow:hover,
.ebs-slider .ebs-arrow:focus {
	opacity: 1;
	background: #ffffff;
	outline: none;
}

.ebs-slider .ebs-arrow:focus-visible {
	outline: 2px solid #0f4596;
	outline-offset: 2px;
}

.ebs-slider .ebs-arrow-prev {
	left: 12px;
}

.ebs-slider .ebs-arrow-next {
	right: 12px;
}

/* ---------- Thumbnails ---------- */

.ebs-slider .ebs-thumbs {
	display: flex;
	flex-wrap: nowrap;
	gap: 10px;
	margin-top: 10px;
	overflow-x: auto;
	scrollbar-width: thin;
	-webkit-overflow-scrolling: touch;
	padding-bottom: 4px;
}

.ebs-slider .ebs-thumb {
	flex: 0 0 calc((100% - (var(--ebs-visible-thumbs, 5) - 1) * 10px) / var(--ebs-visible-thumbs, 5));
	padding: 0;
	margin: 0;
	border: 2px solid transparent;
	border-radius: 6px;
	background: none;
	cursor: pointer;
	line-height: 0;
	overflow: hidden;
	opacity: 0.65;
	transition: opacity 0.2s ease, border-color 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.ebs-slider .ebs-thumb img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 4px;
}

.ebs-slider .ebs-thumb:hover,
.ebs-slider .ebs-thumb:focus {
	opacity: 1;
	outline: none;
}

.ebs-slider .ebs-thumb:focus-visible {
	outline: 2px solid #0f4596;
	outline-offset: 2px;
}

.ebs-slider .ebs-thumb.is-active {
	opacity: 1;
	border-color: #0f4596;
}

.ebs-slider .ebs-thumb.ebs-ineligible {
	display: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 767px) {
	.ebs-slider .ebs-arrow {
		width: 32px;
		height: 32px;
		font-size: 14px;
		line-height: 32px;
	}

	.ebs-slider[data-mobile-thumbs="0"] .ebs-thumbs {
		display: none;
	}

	.ebs-slider[data-mobile-thumbs="1"] .ebs-thumb {
		flex-basis: calc((100% - 2 * 10px) / 3);
	}
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
	.ebs-slider .ebs-slide,
	.ebs-slider .ebs-thumb,
	.ebs-slider .ebs-arrow {
		transition: none;
	}
}
