/**
 * Variant CSS: testimonials--speech-bubble-cards
 * Layer 2 — Path B testimonials role (2026-06-10).
 * Client quotes rendered as chat "speech bubbles": each quote sits inside a
 * rounded bubble with a CSS-drawn tail; the author + role + star row sits
 * BELOW the bubble like a message sender. Friendly messaging metaphor,
 * distinct from the bordered card grid / rating-first cards / compact star grid.
 * Scales to the client review count (loader rebuilds __grid > __card into rows
 * of three). Every selector scoped to .universal-testimonials--speech-bubble-cards.
 */

body.aibt-universal .universal-testimonials--speech-bubble-cards {
	/* Bubble fill resolved once here so the bubble body and its tail stay in
	   lockstep across every theme (card tint when defined, else the alt surface). */
	--tm-bubble-bg: var(--background-card, var(--background-alt));
	background: var(--background);
	color: var(--text-primary);
}

body.aibt-universal .universal-testimonials--speech-bubble-cards .universal-testimonials__intro {
	margin-bottom: var(--space-7, 48px);
}
body.aibt-universal .universal-testimonials--speech-bubble-cards .universal-testimonials__kicker {
	font-family: var(--font-body) !important;
	font-size: var(--text-xs) !important;
	font-weight: 600 !important;
	letter-spacing: var(--tracking-widest, 0.16em) !important;
	text-transform: uppercase !important;
	color: var(--accent) !important;
	margin: 0 0 var(--space-3, 12px) 0 !important;
}
body.aibt-universal .universal-testimonials--speech-bubble-cards .universal-testimonials__headline {
	font-family: var(--font-display) !important;
	color: var(--text-primary) !important;
	margin: 0 !important;
}

body.aibt-universal .universal-testimonials--speech-bubble-cards .universal-testimonials__grid {
	gap: var(--space-6, 32px) var(--space-5, 24px) !important;
	flex-wrap: wrap;
	align-items: stretch !important;
}
/* The column is a vertical track: bubble on top, sender beneath. No box of its own. */
body.aibt-universal .universal-testimonials--speech-bubble-cards .universal-testimonials__card {
	display: flex;
	flex-direction: column;
}

/* The bubble — rounded everywhere except a squared bottom-left where the tail
   springs from, the classic chat-bubble silhouette. */
body.aibt-universal .universal-testimonials--speech-bubble-cards .universal-testimonials__bubble {
	position: relative;
	background: var(--tm-bubble-bg) !important;
	border: 1px solid var(--divider-primary);
	border-radius: var(--radius-lg, 16px) var(--radius-lg, 16px) var(--radius-lg, 16px) var(--radius-xs, 2px);
	padding: var(--space-5, 24px) var(--space-5, 24px);
	box-shadow: var(--decor-shadow, none);
	transition: border-color var(--duration-fast, 150ms) var(--ease-standard, ease),
		transform var(--duration-fast, 150ms) var(--ease-standard, ease);
}
/* Tail: a small square rotated 45° pinned to the bubble's bottom-left, sharing
   the bubble fill + border so only its outer two edges read as the pointer. */
body.aibt-universal .universal-testimonials--speech-bubble-cards .universal-testimonials__bubble::after {
	content: "";
	position: absolute;
	left: var(--space-6, 32px);
	bottom: -7px;
	width: 14px;
	height: 14px;
	background: var(--tm-bubble-bg);
	border-right: 1px solid var(--divider-primary);
	border-bottom: 1px solid var(--divider-primary);
	transform: rotate(45deg);
}
body.aibt-universal .universal-testimonials--speech-bubble-cards .universal-testimonials__card:hover .universal-testimonials__bubble {
	border-color: var(--accent);
	transform: translateY(-3px);
}
body.aibt-universal .universal-testimonials--speech-bubble-cards .universal-testimonials__card:hover .universal-testimonials__bubble::after {
	border-color: var(--accent);
}
/* Keyboard focus parity with hover (cards may carry a focusable link when bound). */
body.aibt-universal .universal-testimonials--speech-bubble-cards .universal-testimonials__card:focus-within .universal-testimonials__bubble {
	border-color: var(--accent);
}
body.aibt-universal .universal-testimonials--speech-bubble-cards .universal-testimonials__card a:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
	border-radius: var(--radius-xs, 2px);
}

body.aibt-universal .universal-testimonials--speech-bubble-cards .universal-testimonials__quote {
	font-family: var(--font-body) !important;
	font-size: var(--text-md) !important;
	line-height: var(--leading-relaxed, 1.7) !important;
	color: var(--text-primary) !important;
	margin: 0 !important;
}

/* Sender row — author meta on the left, stars on the right, offset to sit
   clear of the tail like a chat attribution under a message. */
body.aibt-universal .universal-testimonials--speech-bubble-cards .universal-testimonials__sender {
	gap: var(--space-3, 12px) !important;
	justify-content: space-between;
	align-items: center;
	margin: var(--space-4, 16px) 0 0 var(--space-5, 24px);
}
body.aibt-universal .universal-testimonials--speech-bubble-cards .universal-testimonials__authormeta {
	gap: 2px !important;
}
body.aibt-universal .universal-testimonials--speech-bubble-cards .universal-testimonials__name {
	font-family: var(--font-display) !important;
	font-size: var(--text-base) !important;
	font-weight: 600 !important;
	color: var(--text-primary) !important;
	margin: 0 !important;
	line-height: 1.3 !important;
}
body.aibt-universal .universal-testimonials--speech-bubble-cards .universal-testimonials__authorrole {
	font-family: var(--font-body) !important;
	font-size: var(--text-sm) !important;
	color: var(--text-secondary) !important;
	margin: 0 !important;
	line-height: 1.3 !important;
}
body.aibt-universal .universal-testimonials--speech-bubble-cards .universal-testimonials__stars {
	font-size: var(--text-sm) !important;
	line-height: 1 !important;
	letter-spacing: 0.08em !important;
	color: var(--accent) !important;
	margin: 0 !important;
	white-space: nowrap;
}

@media (max-width: 781px) {
	body.aibt-universal .universal-testimonials--speech-bubble-cards .universal-testimonials__card {
		flex-basis: 100% !important;
	}
}

@media (max-width: 640px) {
	/* A5: cap uppercase kicker tracking on small screens to avoid line-break artifacts. */
	body.aibt-universal .universal-testimonials--speech-bubble-cards .universal-testimonials__kicker {
		letter-spacing: 0 !important;
	}
	/* Keep the sender row readable if author + stars get tight; let stars drop. */
	body.aibt-universal .universal-testimonials--speech-bubble-cards .universal-testimonials__sender {
		margin-left: var(--space-3, 12px);
	}
}

/* Respect reduced-motion: drop the bubble lift for users who opt out. */
@media (prefers-reduced-motion: reduce) {
	body.aibt-universal .universal-testimonials--speech-bubble-cards .universal-testimonials__bubble {
		transition: none;
	}
	body.aibt-universal .universal-testimonials--speech-bubble-cards .universal-testimonials__card:hover .universal-testimonials__bubble {
		transform: none;
	}
}
