/**
 * Variant CSS: social--ugc-wall-grid
 *
 * A dense "tag us" UGC photo wall: a hashtag kicker + headline + one line of
 * copy over a tight 5-column mosaic of ten square community shots (small gaps,
 * hover zoom), capped by the brand handle + a follow button. Unlike the looser
 * 6-tile feed grid and the captioned masonry: this is a maximally dense wall
 * with no captions, celebrating follower-made content. Tiles' img src are
 * swapped by the photo system. Text stays --ink (polarity-aware); kicker, em
 * and the button take --accent / CTA tokens. Part of the `social` role.
 */

body.aibt-universal .universal-social--ugc-wall-grid {
	padding-block: calc(clamp(3rem, 7vw, 5rem) * var(--density, 1));
}

/* Intro. */
body.aibt-universal .universal-social--ugc-wall-grid .universal-social__intro {
	margin-bottom: clamp(1.8rem, 4vw, 2.6rem);
}

body.aibt-universal .universal-social--ugc-wall-grid .universal-social__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;
	/* Centered child of a constrained section -> keep horizontal-auto margins (A8/A9). */
	margin: 0 auto var(--space-sm) auto !important;
}

body.aibt-universal .universal-social--ugc-wall-grid .universal-social__headline {
	font-family: var(--font-display) !important;
	color: var(--ink) !important;
	margin: 0 auto !important;
}

body.aibt-universal .universal-social--ugc-wall-grid .universal-social__headline em {
	color: var(--accent) !important;
	font-style: italic;
}

body.aibt-universal .universal-social--ugc-wall-grid .universal-social__deck {
	font-family: var(--font-body) !important;
	font-size: var(--text-base) !important;
	line-height: var(--leading-relaxed, 1.6) !important;
	color: color-mix(in srgb, var(--ink) 78%, transparent) !important;
	max-width: 54ch;
	margin: var(--space-sm) auto 0 auto !important;
}

/* Dense wall: 5 square tiles per row, tight gaps. */
body.aibt-universal .universal-social--ugc-wall-grid .universal-social__wall {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: clamp(3px, 0.7vw, 8px);
	border-radius: var(--decor-radius, 16px);
	overflow: hidden;
}

body.aibt-universal .universal-social--ugc-wall-grid .universal-social__tile {
	margin: 0 !important;
	position: relative;
	overflow: hidden;
	aspect-ratio: 1 / 1;
}

body.aibt-universal .universal-social--ugc-wall-grid .universal-social__tile img {
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	transition: transform 600ms var(--ease-default, ease),
		filter var(--duration-fast, 0.18s) var(--ease-default, ease);
}

body.aibt-universal .universal-social--ugc-wall-grid .universal-social__tile:hover img {
	transform: scale(1.07);
	filter: brightness(1.04);
}

/* Follow row. */
body.aibt-universal .universal-social--ugc-wall-grid .universal-social__follow {
	gap: 1rem 1.4rem !important;
	margin-top: clamp(1.6rem, 3.5vw, 2.4rem);
}

body.aibt-universal .universal-social--ugc-wall-grid .universal-social__handle {
	font-family: var(--font-display) !important;
	font-size: clamp(1.2rem, 2.6vw, 1.6rem) !important;
	font-weight: 600 !important;
	letter-spacing: -0.01em !important;
	color: var(--ink) !important;
	margin: 0 !important;
	overflow-wrap: anywhere;
}

body.aibt-universal .universal-social--ugc-wall-grid .universal-social__cta .wp-block-button__link {
	background: var(--cta-bg-primary, var(--accent)) !important;
	color: var(--cta-text-primary, #ffffff) !important;
	font-family: var(--font-body) !important;
	font-size: var(--text-base) !important;
	font-weight: 600 !important;
	padding: 0.7rem 1.6rem !important;
	border-radius: var(--decor-radius-pill, 999px) !important;
	border: none !important;
	transition: background var(--duration-fast, 0.18s) var(--ease-default, ease),
		transform var(--duration-fast, 0.18s) var(--ease-default, ease);
}

body.aibt-universal .universal-social--ugc-wall-grid .universal-social__cta .wp-block-button__link:hover,
body.aibt-universal .universal-social--ugc-wall-grid .universal-social__cta .wp-block-button__link:focus-visible {
	background: var(--accent-hover, var(--accent)) !important;
	transform: translateY(-2px);
}

/* Visible keyboard focus ring on the follow button. */
body.aibt-universal .universal-social--ugc-wall-grid .universal-social__cta .wp-block-button__link:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

/* Tablet: 4 across (10 tiles -> tidy, last row of 2). */
@media (max-width: 781px) {
	body.aibt-universal .universal-social--ugc-wall-grid .universal-social__wall {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* Small tablet / large phone: 3 across. */
@media (max-width: 600px) {
	body.aibt-universal .universal-social--ugc-wall-grid .universal-social__wall {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
	body.aibt-universal .universal-social--ugc-wall-grid .universal-social__kicker {
		letter-spacing: 0 !important;
	}
}

/* Phone: 2 across — still a wall, never overflows 375px. */
@media (max-width: 400px) {
	body.aibt-universal .universal-social--ugc-wall-grid .universal-social__wall {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Honor reduced-motion: freeze the tile zoom + button lift. */
@media (prefers-reduced-motion: reduce) {
	body.aibt-universal .universal-social--ugc-wall-grid .universal-social__tile img,
	body.aibt-universal .universal-social--ugc-wall-grid .universal-social__cta .wp-block-button__link {
		transition: background var(--duration-fast, 0.18s) var(--ease-default, ease);
	}
	body.aibt-universal .universal-social--ugc-wall-grid .universal-social__tile:hover img {
		transform: none;
		filter: none;
	}
	body.aibt-universal .universal-social--ugc-wall-grid .universal-social__cta .wp-block-button__link:hover,
	body.aibt-universal .universal-social--ugc-wall-grid .universal-social__cta .wp-block-button__link:focus-visible {
		transform: none;
	}
}
