/**
 * Normal Gallery Slider - frontend styles.
 * Namespaced with .ngs-* to avoid theme conflicts.
 */

.ngs-slider,
.ngs-slider *,
.ngs-slider *::before,
.ngs-slider *::after {
	box-sizing: border-box;
}

.ngs-slider {
	--ngs-height: 850px;
	--ngs-transition: 0.7s;
	--ngs-arrow-color: #201D1A;

	position: relative;
	width: 100%;
	max-width: 100%;
	height: var(--ngs-height);
	overflow: hidden;
	background-color: #ece7df; /* neutral loading placeholder */
}

/* Prevent any horizontal overflow caused by the slider. */
.ngs-slider img,
.ngs-slider svg {
	max-width: 100%;
}

/* ---- Slides ----------------------------------------------------------- */

.ngs-slide {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	margin: 0;
	padding: 0;
	opacity: 0;
	visibility: hidden;
	transition:
		opacity var(--ngs-transition) ease,
		visibility 0s linear var(--ngs-transition);
}

.ngs-slide--is-active {
	opacity: 1;
	visibility: visible;
	transition:
		opacity var(--ngs-transition) ease,
		visibility 0s linear 0s;
}

.ngs-slide img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

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

.ngs-arrow {
	position: absolute;
	top: 50%;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--ngs-arrow-color);
	cursor: pointer;
	transform: translateY(-50%);
	-webkit-tap-highlight-color: transparent;
	transition: opacity 0.2s ease, background-color 0.2s ease;
}

.ngs-arrow--prev { left: 28px; }
.ngs-arrow--next { right: 28px; }

.ngs-arrow svg {
	display: block;
	width: 34px;
	height: 34px;
	transition: opacity 0.2s ease;
}

.ngs-arrow:hover svg,
.ngs-arrow:focus-visible svg {
	opacity: 0.45;
}

.ngs-arrow:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.ngs-arrow:active {
	opacity: 0.8;
}

/* ---- Screen reader live region ---------------------------------------- */

.ngs-status {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* ---- Responsive -------------------------------------------------------- */
/*
 * The [data-ngs] attribute selector raises specificity above the per-slider
 * class (.ngs-slider--N) that carries the configured desktop height, so the
 * mobile heights below always win regardless of the admin-set desktop value.
 */

@media (max-width: 1024px) {
	.ngs-slider[data-ngs] { --ngs-height: 620px; }

	.ngs-arrow { width: 50px; height: 50px; }
	.ngs-arrow--prev { left: 18px; }
	.ngs-arrow--next { right: 18px; }
	.ngs-arrow svg { width: 30px; height: 30px; }
}

@media (max-width: 768px) {
	.ngs-slider[data-ngs] { --ngs-height: 520px; }

	.ngs-arrow { width: 46px; height: 46px; }
	.ngs-arrow--prev { left: 10px; }
	.ngs-arrow--next { right: 10px; }
	.ngs-arrow svg { width: 26px; height: 26px; }
}

@media (max-width: 480px) {
	.ngs-slider[data-ngs] { --ngs-height: 500px; }
}

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

@media (prefers-reduced-motion: reduce) {
	.ngs-slide,
	.ngs-slide--is-active {
		transition: none;
	}

	.ngs-arrow,
	.ngs-arrow svg {
		transition: none;
	}
}
