/**
 * Variant CSS: before-after--side-by-side
 * Layer 2 — Path B before-after role (2026-05-28).
 * Two labeled image columns ("Przed" / "Po") with a centre divider.
 */

body.aibt-universal .universal-before-after--side-by-side {
	background: var(--background-alt);
	color: var(--text-primary);
}

body.aibt-universal .universal-before-after--side-by-side .universal-before-after__intro {
	margin-bottom: var(--space-xl);
	text-align: center;
}

body.aibt-universal .universal-before-after--side-by-side .universal-before-after__intro > * {
	margin-inline: auto !important;
}

body.aibt-universal .universal-before-after--side-by-side .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--side-by-side h2.universal-before-after__headline,
body.aibt-universal .universal-before-after--side-by-side .universal-before-after__headline {
	font-family: var(--font-display) !important;
	color: var(--text-primary) !important;
	margin: 0 !important;
}

/* Pair container — centre divider sits between the two columns. */
body.aibt-universal .universal-before-after--side-by-side .universal-before-after__pair {
	position: relative;
	align-items: stretch;
	gap: 0 !important;
}

/* Vertical divider line down the middle. */
body.aibt-universal .universal-before-after--side-by-side .universal-before-after__pair::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--side-by-side .universal-before-after__side {
	padding: 0 !important;
}
body.aibt-universal .universal-before-after--side-by-side .universal-before-after__side--before {
	padding-right: var(--space-xs) !important;
}
body.aibt-universal .universal-before-after--side-by-side .universal-before-after__side--after {
	padding-left: var(--space-xs) !important;
}

body.aibt-universal .universal-before-after--side-by-side .universal-before-after__frame {
	position: relative;
	overflow: hidden;
	border-radius: var(--decor-radius);
	height: 100%;
}

body.aibt-universal .universal-before-after--side-by-side .universal-before-after__img {
	margin: 0 !important;
	height: 100%;
}

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

/* Gentle zoom on hover per frame — tactile "real result" cue (reduced-motion
   is handled globally by the skeleton). */
body.aibt-universal .universal-before-after--side-by-side .universal-before-after__frame:hover .universal-before-after__img img {
	transform: scale(1.04);
}

/* Label badges overlaid on each frame.
   Fixed rgba drop-shadow lifts the chip off any photo (correct text-on-photo
   pattern, theme-independent) so light accent chips stay crisp on bright shots. */
body.aibt-universal .universal-before-after--side-by-side .universal-before-after__label {
	position: absolute;
	top: var(--space-sm);
	z-index: 2;
	font-family: var(--font-body) !important;
	font-size: var(--text-xs) !important;
	font-weight: 700 !important;
	letter-spacing: var(--tracking-wide, 0.06em) !important;
	text-transform: uppercase !important;
	margin: 0 !important;
	padding: 0.4em 0.9em !important;
	border-radius: var(--decor-radius);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28), 0 1px 2px rgba(0, 0, 0, 0.22);
}

body.aibt-universal .universal-before-after--side-by-side .universal-before-after__label--before {
	left: var(--space-sm);
	background: var(--background-dark);
	color: var(--text-on-dark) !important;
}

body.aibt-universal .universal-before-after--side-by-side .universal-before-after__label--after {
	right: var(--space-sm);
	background: var(--cta-bg-primary);
	color: var(--cta-text-primary) !important;
}

@media (max-width: 781px) {
	body.aibt-universal .universal-before-after--side-by-side .universal-before-after__pair {
		flex-direction: column !important;
		gap: var(--space-sm) !important;
	}
	/* Centre divider becomes a horizontal line between stacked frames. */
	body.aibt-universal .universal-before-after--side-by-side .universal-before-after__pair::before {
		top: 50%;
		bottom: auto;
		left: 0;
		right: 0;
		width: auto;
		height: 2px;
		transform: translateY(-50%);
	}
	body.aibt-universal .universal-before-after--side-by-side .universal-before-after__side {
		flex-basis: 100% !important;
		width: 100% !important;
	}
	body.aibt-universal .universal-before-after--side-by-side .universal-before-after__side--before {
		padding-right: 0 !important;
		padding-bottom: var(--space-xs) !important;
	}
	body.aibt-universal .universal-before-after--side-by-side .universal-before-after__side--after {
		padding-left: 0 !important;
		padding-top: var(--space-xs) !important;
	}
}

/* Tighten uppercase tracking on small screens (wide tracking hurts small text). */
@media (max-width: 640px) {
	body.aibt-universal .universal-before-after--side-by-side .universal-before-after__kicker,
	body.aibt-universal .universal-before-after--side-by-side .universal-before-after__label {
		letter-spacing: 0 !important;
	}
}

/* A8/A9 left-shift fix (2026-06-08): 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. The section class is doubled to lift
   specificity to (0,4,1) so this beats element-tag-qualified rules like
   h2.__headline (0,3,2); harmless on already-centered elements (auto margins
   compute to 0). Only left/right are overridden, top/bottom margins are preserved. */
body.aibt-universal .universal-before-after--side-by-side.universal-before-after--side-by-side .universal-before-after__kicker,
body.aibt-universal .universal-before-after--side-by-side.universal-before-after--side-by-side .universal-before-after__headline { margin-inline: auto !important; }
