/**
 * Variant CSS: before-after--trio-slider-handle-row
 * Layer 2 — Path B before-after role (2026-06-10).
 * Exactly THREE before|after splits in a single row. Each split carries a faux
 * image-comparison SLIDER at the seam: a vertical handle bar (::before) plus a
 * round knob with a ↔ grip glyph (::after). Static, pure CSS — it reads as a
 * "drag to compare" affordance without any JS. A numbered title sits beneath.
 * Distinct from slider-divider (a single comparison frame) and trio-pair-cards-row
 * (a flat centre seam, no grip): here three portrait comparisons stand level, each
 * wearing the unmistakable slider knob.
 */

body.aibt-universal .universal-before-after--trio-slider-handle-row {
	background: var(--background-alt);
	color: var(--text-primary);
}

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

body.aibt-universal .universal-before-after--trio-slider-handle-row .universal-before-after__intro > * {
	margin-inline: auto !important;
}

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

/* Row — 3 equal columns; force wrap so the 3-up degrades cleanly. */
body.aibt-universal .universal-before-after--trio-slider-handle-row .universal-before-after__row {
	flex-wrap: wrap !important;
	align-items: stretch;
}

body.aibt-universal .universal-before-after--trio-slider-handle-row .universal-before-after__col {
	display: flex;
	flex-direction: column;
}

/* Slider — before half | after half meeting on a centre seam.
   gap:0 so the two photos kiss; position:relative anchors the handle. */
body.aibt-universal .universal-before-after--trio-slider-handle-row .universal-before-after__slider {
	position: relative;
	gap: 0 !important;
	border-radius: var(--decor-radius);
	overflow: hidden;
	border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
}

body.aibt-universal .universal-before-after--trio-slider-handle-row .universal-before-after__half {
	position: relative;
	flex: 1 1 50%;
	min-width: 0;
	overflow: hidden;
}

body.aibt-universal .universal-before-after--trio-slider-handle-row .universal-before-after__img {
	margin: 0 !important;
	display: block;
	height: 100%;
}

body.aibt-universal .universal-before-after--trio-slider-handle-row .universal-before-after__img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: var(--photo-filter, none);
}

/* Handle bar — a bright vertical rule down the seam (the slider track). */
body.aibt-universal .universal-before-after--trio-slider-handle-row .universal-before-after__slider::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	width: 3px;
	transform: translateX(-50%);
	background: var(--on-dark, #fff);
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
	z-index: 4;
	pointer-events: none;
}

/* Knob — round grip centred on the seam, bearing a ↔ glyph; the classic
   "drag to compare" handle. Accent-filled so it reads as interactive. */
body.aibt-universal .universal-before-after--trio-slider-handle-row .universal-before-after__slider::after {
	content: "\2194"; /* ↔ */
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 2.6rem;
	height: 2.6rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--decor-radius-pill);
	background: var(--accent);
	color: var(--on-accent, #fff);
	font-family: var(--font-body);
	font-size: var(--text-md);
	font-weight: 700;
	line-height: 1;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.32), 0 0 0 3px var(--on-dark, #fff);
	z-index: 5;
	pointer-events: none;
}

/* Corner tags — sit on each half. */
body.aibt-universal .universal-before-after--trio-slider-handle-row .universal-before-after__tag {
	position: absolute;
	top: var(--space-xs);
	z-index: 6;
	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.35em 0.8em !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--trio-slider-handle-row .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--trio-slider-handle-row .universal-before-after__tag--after {
	right: var(--space-xs);
	background: var(--cta-bg-primary);
	color: var(--cta-text-primary) !important;
}

/* Footer bar — ordinal number + title on one baseline, beneath the comparison. */
body.aibt-universal .universal-before-after--trio-slider-handle-row .universal-before-after__foot {
	gap: var(--space-sm) !important;
	margin-top: var(--space-sm);
}

body.aibt-universal .universal-before-after--trio-slider-handle-row .universal-before-after__num {
	flex: 0 0 auto;
	font-family: var(--font-display) !important;
	font-size: var(--text-sm) !important;
	font-weight: 700 !important;
	line-height: 1 !important;
	letter-spacing: 0 !important;
	color: var(--accent) !important;
	background: color-mix(in srgb, var(--accent) 14%, transparent);
	border-radius: var(--decor-radius-pill);
	padding: 0.4em 0.7em !important;
	margin: 0 !important;
}

body.aibt-universal .universal-before-after--trio-slider-handle-row .universal-before-after__col-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;
	overflow-wrap: break-word;
}

/* Tablet — 641-959: drop to a 2-up wrap, third column flows to a new line. */
@media (max-width: 959px) {
	body.aibt-universal .universal-before-after--trio-slider-handle-row .universal-before-after__col {
		flex-basis: calc(50% - var(--space-md)) !important;
	}
}

/* Phone — ≤640: single column; cap wide tracking (A5). */
@media (max-width: 640px) {
	body.aibt-universal .universal-before-after--trio-slider-handle-row .universal-before-after__col {
		flex-basis: 100% !important;
		width: 100% !important;
	}
	body.aibt-universal .universal-before-after--trio-slider-handle-row .universal-before-after__kicker,
	body.aibt-universal .universal-before-after--trio-slider-handle-row .universal-before-after__tag {
		letter-spacing: 0 !important;
	}
}

/* Keyboard affordance — focus-visible ring on each image. */
body.aibt-universal .universal-before-after--trio-slider-handle-row .universal-before-after__img img:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

/* A8/A9 left-shift fix: centered intro children (kicker/headline) are max-width-capped
   by WP constrained layout but carry horizontal margin 0, pinning them 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; harmless on already-centered
   elements (auto margins compute to 0). Only left/right are overridden; top/bottom kept. */
body.aibt-universal .universal-before-after--trio-slider-handle-row.universal-before-after--trio-slider-handle-row .universal-before-after__kicker,
body.aibt-universal .universal-before-after--trio-slider-handle-row.universal-before-after--trio-slider-handle-row .universal-before-after__headline { margin-inline: auto !important; }
