/* ═══════════════════════════════════════════════════════════════
   Swiper Carousel Block — Shared Styles (frontend + editor)
   ═══════════════════════════════════════════════════════════════ */

/* ── CSS Custom Properties ────────────────────────────────────── */
.scb-carousel-wrap {
	--scb-accent:      #ffffff;
	--scb-ratio:       16/9;
	--scb-radius:      8px;
	--scb-nav-size:    44px;
	--scb-nav-offset:  12px;

	display: block;
	width: 100%;
	position: relative;
}

/* ── Swiper container ─────────────────────────────────────────── */
.scb-swiper {
	width: 100%;
	border-radius: var( --scb-radius );
	overflow: hidden;
	background: #0f0f0f;
	box-shadow:
		0 2px 8px  rgba( 0, 0, 0, .12 ),
		0 8px 32px rgba( 0, 0, 0, .10 );
}

/* ── Slide ────────────────────────────────────────────────────── */
.scb-slide {
	position: relative;
	overflow: hidden;
	/* Enforce aspect ratio */
	aspect-ratio: var( --scb-ratio );
	max-height: 600px;
	background: #111;
}

.scb-slide img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	pointer-events: none;
	user-select: none;
	-webkit-user-drag: none;
}

/* ── Caption overlay ──────────────────────────────────────────── */
.scb-caption {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 20px 20px 16px;
	background: linear-gradient( to top, rgba( 0,0,0,.75 ) 0%, transparent 100% );
	color: #fff;
	font-size: clamp( 13px, 1.5vw, 16px );
	font-weight: 500;
	letter-spacing: .01em;
	line-height: 1.4;
	pointer-events: none;
}

/* ── Navigation buttons ───────────────────────────────────────── */
.scb-nav-btn {
	position: absolute;
	top: 50%;
	transform: translateY( -50% );
	z-index: 20;
	display: flex;
	align-items: center;
	justify-content: center;
	width:  var( --scb-nav-size );
	height: var( --scb-nav-size );
	border-radius: 50%;
	background: var( --scb-accent );
	color: #111;
	border: none;
	cursor: pointer;
	box-shadow: 0 2px 12px rgba( 0,0,0,.25 );
	transition:
		background .18s ease,
		transform  .18s ease,
		box-shadow .18s ease,
		opacity    .18s ease;
	outline: none;
}

.scb-nav-btn:hover {
	background: var( --scb-accent );
	filter: brightness( 0.88 );
	transform: translateY( -50% ) scale( 1.08 );
	box-shadow: 0 4px 18px rgba( 0,0,0,.32 );
}

.scb-nav-btn:active {
	transform: translateY( -50% ) scale( .96 );
}

.scb-nav-btn svg {
	display: block;
	flex-shrink: 0;
	color: #111;
}

/* Force icon colour to contrast with accent */
.scb-carousel-wrap[style*="--scb-accent:#0"] .scb-nav-btn svg,
.scb-carousel-wrap[style*="--scb-accent:#1"] .scb-nav-btn svg,
.scb-carousel-wrap[style*="--scb-accent:#2"] .scb-nav-btn svg {
	color: #fff;
}

.scb-btn-prev { left:  var( --scb-nav-offset ); }
.scb-btn-next { right: var( --scb-nav-offset ); }

/* Disabled state */
.scb-btn-prev.swiper-button-disabled,
.scb-btn-next.swiper-button-disabled {
	opacity: .35;
	pointer-events: none;
}

/* ── Pagination dots ──────────────────────────────────────────── */
.scb-pagination {
	position: absolute;
	bottom: 14px !important;
	left: 0 !important;
	width: 100% !important;
	display: flex;
	justify-content: center;
	gap: 6px;
	z-index: 20;
	pointer-events: none;
}

.scb-pagination .swiper-pagination-bullet {
	width:  8px;
	height: 8px;
	border-radius: 4px;
	background: rgba( 255, 255, 255, .45 );
	opacity: 1;
	transition:
		background .2s ease,
		width       .2s ease;
	pointer-events: all;
}

.scb-pagination .swiper-pagination-bullet-active {
	background: var( --scb-accent );
	width: 22px;
}

/* ── Keyboard / focus ring ───────────────────────────────────── */
.scb-nav-btn:focus-visible {
	outline: 3px solid var( --scb-accent );
	outline-offset: 2px;
}

/* ── Wide / Full align ───────────────────────────────────────── */
.alignwide .scb-carousel-wrap  { max-width: 1200px; margin-inline: auto; }
.alignfull .scb-carousel-wrap  { max-width: 100%; }
.alignfull .scb-swiper          { border-radius: 0; }

/* ── Touch highlight suppression ─────────────────────────────── */
.scb-carousel-wrap * {
	-webkit-tap-highlight-color: transparent;
}

/* ── Swiper overrides (suppress default nav/pagination) ─────── */
.scb-swiper .swiper-button-prev,
.scb-swiper .swiper-button-next {
	display: none !important;
}
.scb-swiper .swiper-pagination {
	display: none;
}
