/**
 * Variant CSS: before-after--scalable-strip-scroller
 * Layer 2 — Path B before-after role (2026-06-10).
 * A SCALABLE horizontal scroll strip of before|after pair cards. Cards sit in one
 * row inside an overflow-x:auto track with scroll-snap; a fixed card width means
 * ~2.x cards show at once so the NEXT card peeks past the edge, inviting a swipe.
 * Each card = num + title header over a horizontal before|after split with corner
 * tags. Card count flows to the client's project count (clone/trim case-N-* cards;
 * 6 demo baked) — the strip simply gets longer. Distinct from dense-duo-grid /
 * thumb-pair-grid / results-card-trio (static wrapping grids): here the cards do NOT
 * wrap — they scroll horizontally like a contact-sheet carousel.
 */

body.aibt-universal .universal-before-after--scalable-strip-scroller {
	background: var(--background);
	color: var(--text-primary);
}

/* Intro — centred block, A8-safe. */
body.aibt-universal .universal-before-after--scalable-strip-scroller .universal-before-after__intro {
	margin-bottom: var(--space-xl);
	text-align: center;
}

body.aibt-universal .universal-before-after--scalable-strip-scroller .universal-before-after__intro > * {
	margin-inline: auto !important;
}

body.aibt-universal .universal-before-after--scalable-strip-scroller .universal-before-after__kicker {
	font-family: var(--font-body) !important;
	font-size: var(--text-xs) !important;
	font-weight: 600 !important;
	letter-spacing: var(--tracking-widest) !important;
	text-transform: uppercase !important;
	color: var(--accent) !important;
	margin: 0 0 var(--space-sm) 0 !important;
}

body.aibt-universal .universal-before-after--scalable-strip-scroller h2.universal-before-after__headline,
body.aibt-universal .universal-before-after--scalable-strip-scroller .universal-before-after__headline {
	font-family: var(--font-display) !important;
	color: var(--text-primary) !important;
	margin: 0 !important;
}

/* Strip — single-row horizontal scroller. The negative inline margin + matching
   padding lets cards bleed to the section edge while keeping the first card aligned
   to the constrained content box; trailing padding leaves room for the last snap. */
body.aibt-universal .universal-before-after--scalable-strip-scroller .universal-before-after__strip {
	display: flex;
	flex-wrap: nowrap !important;
	gap: var(--space-lg) !important;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-padding-left: 2px;
	-webkit-overflow-scrolling: touch;
	padding-bottom: var(--space-sm);
	scrollbar-width: thin;
}

/* Card — fixed-width so ~2.x show → the next card peeks. Never shrinks. */
body.aibt-universal .universal-before-after--scalable-strip-scroller .universal-before-after__card {
	flex: 0 0 clamp(300px, 42%, 520px);
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	gap: var(--space-sm) !important;
}

/* Header — ordinal + title on one line above the split. */
body.aibt-universal .universal-before-after--scalable-strip-scroller .universal-before-after__head {
	gap: var(--space-sm) !important;
}

body.aibt-universal .universal-before-after--scalable-strip-scroller .universal-before-after__num {
	flex: 0 0 auto;
	font-family: var(--font-display) !important;
	font-size: var(--text-xl) !important;
	font-weight: 700 !important;
	line-height: 1 !important;
	letter-spacing: -0.02em !important;
	color: var(--accent) !important;
	margin: 0 !important;
	/* Numeric — keep intact, never break. */
	overflow-wrap: normal;
}

body.aibt-universal .universal-before-after--scalable-strip-scroller .universal-before-after__card-title {
	font-family: var(--font-display) !important;
	font-size: var(--text-lg) !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
	color: var(--text-primary) !important;
	margin: 0 !important;
	min-width: 0;
	/* Title cell can be narrow — wrap on spaces, never break PL mid-word. */
	overflow-wrap: normal;
}

/* Split — before | after halves meeting on a centre seam. */
body.aibt-universal .universal-before-after--scalable-strip-scroller .universal-before-after__split {
	position: relative;
	gap: 0 !important;
	border-radius: var(--decor-radius);
	overflow: hidden;
}

/* Centre seam between the two halves. */
body.aibt-universal .universal-before-after--scalable-strip-scroller .universal-before-after__split::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	width: 2px;
	transform: translateX(-50%);
	background: var(--divider-primary);
	z-index: 2;
}

body.aibt-universal .universal-before-after--scalable-strip-scroller .universal-before-after__half {
	position: relative;
	flex: 1 1 50%;
	min-width: 0;
	overflow: hidden;
}

body.aibt-universal .universal-before-after--scalable-strip-scroller .universal-before-after__img {
	margin: 0 !important;
	display: block;
	height: 100%;
}

body.aibt-universal .universal-before-after--scalable-strip-scroller .universal-before-after__img img {
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	filter: var(--photo-filter, none);
	transition: transform var(--duration-slow, 900ms) var(--ease-elegant, ease);
}

/* Gentle paired zoom on hover — tactile result cue. */
body.aibt-universal .universal-before-after--scalable-strip-scroller .universal-before-after__card:hover .universal-before-after__img img {
	transform: scale(1.04);
}

/* Corner tags — sit on each half.
   Fixed rgba drop-shadow lifts the chip off any photo (theme-independent,
   correct text-on-photo pattern) so light chips stay crisp on bright shots. */
body.aibt-universal .universal-before-after--scalable-strip-scroller .universal-before-after__tag {
	position: absolute;
	top: var(--space-xs);
	z-index: 3;
	font-family: var(--font-body) !important;
	font-size: var(--text-xs) !important;
	font-weight: 700 !important;
	letter-spacing: var(--tracking-wide) !important;
	text-transform: uppercase !important;
	margin: 0 !important;
	padding: 0.3em 0.7em !important;
	border-radius: var(--decor-radius-pill);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28), 0 1px 2px rgba(0, 0, 0, 0.22);
}

/* "Przed" — neutral dark chip (text-on-dark), pinned to the left half. */
body.aibt-universal .universal-before-after--scalable-strip-scroller .universal-before-after__tag--before {
	left: var(--space-xs);
	background: var(--background-dark, #141414);
	color: var(--text-on-dark, #fff) !important;
}

/* "Po" — accent CTA chip to signal the win, pinned to the right half. */
body.aibt-universal .universal-before-after--scalable-strip-scroller .universal-before-after__tag--after {
	right: var(--space-xs);
	background: var(--cta-bg-primary);
	color: var(--cta-text-primary) !important;
}

/* Phone — narrower cards keep a clear peek of the next; strip stays scrollable.
   Cap uppercase tracking (A5). */
@media (max-width: 640px) {
	body.aibt-universal .universal-before-after--scalable-strip-scroller .universal-before-after__card {
		flex-basis: 82%;
	}
	body.aibt-universal .universal-before-after--scalable-strip-scroller .universal-before-after__kicker,
	body.aibt-universal .universal-before-after--scalable-strip-scroller .universal-before-after__tag {
		letter-spacing: 0 !important;
	}
}

/* Keyboard affordance — card focus-within outline + image focus-visible. */
body.aibt-universal .universal-before-after--scalable-strip-scroller .universal-before-after__card:focus-within {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

body.aibt-universal .universal-before-after--scalable-strip-scroller .universal-before-after__img img:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

/* Respect reduced-motion — drop the hover zoom + snap easing. */
@media (prefers-reduced-motion: reduce) {
	body.aibt-universal .universal-before-after--scalable-strip-scroller .universal-before-after__strip {
		scroll-snap-type: none;
	}
	body.aibt-universal .universal-before-after--scalable-strip-scroller .universal-before-after__img img {
		transition: none !important;
	}
	body.aibt-universal .universal-before-after--scalable-strip-scroller .universal-before-after__card:hover .universal-before-after__img img {
		transform: none;
	}
}

/* A8/A9 left-shift fix (2026-06-10): centered intro children (kicker/headline) were
   max-width-capped by WP constrained layout but had horizontal margin 0, pinning them
   to the left. Force margin-inline:auto. Section class doubled -> specificity (0,4,1)
   beats element-tag-qualified rules like h2.__headline; harmless on already-centered
   elements (auto margins compute to 0). Only left/right are overridden. */
body.aibt-universal .universal-before-after--scalable-strip-scroller.universal-before-after--scalable-strip-scroller .universal-before-after__kicker,
body.aibt-universal .universal-before-after--scalable-strip-scroller.universal-before-after--scalable-strip-scroller .universal-before-after__headline { margin-inline: auto !important; }
