/**
 * TechBBQ Speakers List — Airtable all-speakers tabbed searchable grid for the Speakers page.
 *
 * Figma refs in widget PHP (1440 / 1024 / 768 / 380).
 *
 * Search field: components/input.css (.techbbq-input--with-icon).
 * Scroll-to-top: components/carousel-nav.css (.techbbq-carousel-nav__btn).
 * Breakpoints (mobile-first): 0–767 (base), 768–1023, 1024–1440, 1440+.
 */

.techbbq-speakers-list {
	--techbbq-speakers-list-grid-gap: var(--techbbq-space-1);
	--techbbq-speakers-list-card-radius: 12px;
	--techbbq-speakers-list-photo-radius: 4px;
	--techbbq-speakers-list-role-size: var(--techbbq-text-paragraph-xs-size);
	--techbbq-speakers-list-photo-aspect: 306 / 306;
	--techbbq-speakers-list-search-width: 458px;

	box-sizing: border-box;
	width: 100%;
	padding-top: var(--techbbq-section-space-medium);
	color: var(--techbbq-content-primary);
	background-color: var(--techbbq-bg-main);
}

.techbbq-speakers-list__inner {
	display: flex;
	flex-direction: column;
	gap: var(--techbbq-speakers-list-section-gap);
	align-items: center;
}

/* ── Header ─────────────────────────────────────────────────── */

.techbbq-speakers-list__header {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	text-align: center;
}

.techbbq-speakers-list__title {
	margin: 0;
	font-size: var(--techbbq-speakers-list-title-size);
}

/* ── Tabs (shared .techbbq-filter-tabs — see components/filter-tabs.css) ── */

.techbbq-speakers-list__tabs-wrap {
	width: 100%;
}

/* ── Search (shared .techbbq-input — see components/input.css) ── */

.techbbq-speakers-list .techbbq-input {
	flex-shrink: 0;
	width: min(100%, var(--techbbq-speakers-list-search-width));
}

.techbbq-speakers-list__search-input::-webkit-search-cancel-button {
	display: none;
}

/* ── Grid ───────────────────────────────────────────────────── */

.techbbq-speakers-list__grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: var(--techbbq-speakers-list-grid-gap);
	width: 100%;
}

.techbbq-speakers-list__grid .techbbq-speakers-list__card[hidden] {
	display: none;
}

/* ── Card ───────────────────────────────────────────────────── */

.techbbq-speakers-list__card {
	--techbbq-speakers-list-card-border-width: 2px;

	position: relative;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: var(--techbbq-speakers-list-card-gap);
	padding: var(--techbbq-speakers-list-card-padding);
	overflow: hidden;
	border: var(--techbbq-speakers-list-card-border-width) solid transparent;
	border-radius: var(--techbbq-speakers-list-card-radius);
	background: var(--techbbq-bg-surface);
	isolation: isolate;
}

.techbbq-speakers-list__card::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 3;
	border-radius: inherit;
	padding: var(--techbbq-speakers-list-card-border-width);
	background: var(--techbbq-gradient-accent-1);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease;
	-webkit-mask:
		linear-gradient(#fff 0 0) content-box,
		linear-gradient(#fff 0 0);
	-webkit-mask-composite: xor;
	mask:
		linear-gradient(#fff 0 0) content-box,
		linear-gradient(#fff 0 0);
	mask-composite: exclude;
}

.techbbq-speakers-list__photo {
	position: relative;
	z-index: 2;
	flex-shrink: 0;
	width: 100%;
	aspect-ratio: var(--techbbq-speakers-list-photo-aspect);
	overflow: hidden;
	border-radius: var(--techbbq-speakers-list-photo-radius);
	background:
		radial-gradient(
			120% 120% at 66% 0%,
			#5a5a5a 0%,
			#373737 32%,
			#262626 52%,
			#151515 72%
		);
}

/* Scope beats Elementor `.elementor img { height: auto; }`. */
.elementor .techbbq-speakers-list .techbbq-speakers-list__photo-image,
.techbbq-speakers-list .techbbq-speakers-list__photo-image,
img.techbbq-speakers-list__photo-image {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	min-width: 100%;
	min-height: 100%;
	object-fit: cover;
	object-position: center center;
}

.elementor .techbbq-speakers-list .techbbq-speakers-list__photo--speakers .techbbq-speakers-list__photo-image,
.techbbq-speakers-list .techbbq-speakers-list__photo--speakers .techbbq-speakers-list__photo-image,
.techbbq-speakers-list__photo--speakers img.techbbq-speakers-list__photo-image {
	object-position: center bottom;
}

.techbbq-speakers-list__photo .techbbq-speakers__linkedin {
	position: absolute;
	z-index: 4;
	top: 8px;
	right: 8px;
}

.techbbq-speakers-list__meta {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.techbbq-speakers-list__name {
	margin: 0;
	font-family: var(--techbbq-font-family-heading);
	font-size: var(--techbbq-speakers-list-name-size);
	font-weight: 500;
	line-height: var(--techbbq-speakers-list-name-line-height);
	letter-spacing: -0.01em;
}

.techbbq-speakers-list__room {
	margin: 0;
	font-family: var(--techbbq-font-family-body);
	font-size: var(--techbbq-speakers-list-role-size);
	font-weight: 700;
	line-height: var(--techbbq-text-paragraph-line-height);
	letter-spacing: var(--techbbq-text-paragraph-letter-spacing);
	color: var(--techbbq-content-primary);
}

.techbbq-speakers-list__room + .techbbq-speakers-list__name {
	margin-top: -3px;
}

.techbbq-speakers-list__role {
	margin: 0;
	font-family: var(--techbbq-font-family-body);
	font-size: var(--techbbq-speakers-list-role-size);
	font-weight: 400;
	line-height: var(--techbbq-text-paragraph-line-height);
	letter-spacing: var(--techbbq-text-paragraph-letter-spacing);
	color: var(--techbbq-content-secondary);
}

.techbbq-speakers-list__card--interactive {
	cursor: pointer;
}

.techbbq-speakers-list__card--interactive:focus {
	outline: none;
}

.techbbq-speakers-list__card--interactive:focus-visible {
	outline: 2px solid var(--techbbq-content-primary);
	outline-offset: 2px;
}

.techbbq-speakers-list__card:hover::after {
	opacity: 1;
}

.techbbq-speakers-list__empty,
.techbbq-speakers-list__no-results {
	width: 100%;
	margin: 0;
	font-family: var(--techbbq-font-family-body);
	font-size: var(--techbbq-text-paragraph-m-size);
	text-align: center;
	color: var(--techbbq-content-secondary);
}

/* ── Footer ─────────────────────────────────────────────────── */

.techbbq-speakers-list__footer {
	display: flex;
	justify-content: flex-end;
	width: 100%;
}

/* ── Mobile (0–767) ─────────────────────────────────────────── */
.techbbq-speakers-list {
	--techbbq-speakers-list-section-gap: var(--techbbq-space-2);
	--techbbq-speakers-list-title-size: 30px;
	--techbbq-speakers-list-name-size: 20px;
	--techbbq-speakers-list-name-line-height: 1.2;
	--techbbq-speakers-list-card-gap: 16px;
	--techbbq-speakers-list-card-padding: 12px;

	padding-bottom: 72px;
}

.techbbq-speakers-list__grid {
	display: flex;
	flex-direction: column;
	gap: var(--techbbq-speakers-list-grid-gap);
}

.techbbq-speakers-list__card {
	flex-direction: row;
	align-items: center;
	width: 100%;
}

.techbbq-speakers-list__photo {
	flex: 0 0 80px;
	width: 80px;
	height: 80px;
	aspect-ratio: auto;
}

.techbbq-speakers-list__meta {
	flex: 1 1 auto;
	justify-content: center;
	min-width: 0;
	gap: 8px;
}

/* ── Tablet (768–1023) ──────────────────────────────────────── */
@media (min-width: 768px) {
	/* Relocated from @media (max-width: 1024px) */
	.techbbq-speakers-list {
		--techbbq-speakers-list-card-padding: 14px 14px 20px;
		--techbbq-speakers-list-card-gap: 20px;
		--techbbq-speakers-list-name-size: 18px;
		--techbbq-speakers-list-name-line-height: 1.32;

		padding-bottom: 88px;
	}

	/* Relocated from @media (min-width: 768px) and (max-width: 1024px) */
	.techbbq-speakers-list {
		--techbbq-speakers-list-title-size: 41px;

		padding-bottom: 80px;
	}

	.techbbq-speakers-list__grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	/* Undo @media (max-width: 767px) — restored from original base */
	.techbbq-speakers-list {
		--techbbq-speakers-list-section-gap: var(--techbbq-space-4);
	}

	.techbbq-speakers-list__grid {
		display: grid;
		flex-direction: unset;
	}

	.techbbq-speakers-list__card {
		flex-direction: column;
		align-items: unset;
		width: unset;
	}

	.techbbq-speakers-list__photo {
		flex: unset;
		width: 100%;
		height: unset;
		aspect-ratio: var(--techbbq-speakers-list-photo-aspect);
	}

	.techbbq-speakers-list__meta {
		flex: unset;
		justify-content: unset;
		min-width: unset;
		gap: 6px;
	}
}

/* ── Desktop (1024–1440) ──────────────────────────────────────── */
@media (min-width: 1024px) {
	/* Restored from original base */
	.techbbq-speakers-list {
		--techbbq-speakers-list-title-size: var(--techbbq-text-h3-size);
		--techbbq-speakers-list-name-size: var(--techbbq-text-paragraph-s-size);
		--techbbq-speakers-list-name-line-height: 1.32;
		--techbbq-speakers-list-card-gap: 20px;

		padding: var(--techbbq-section-space-medium) 0 var(--techbbq-section-space-large);
	}

	.techbbq-speakers-list__grid {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}

	.techbbq-speakers-list__photo .techbbq-speakers__linkedin {
		top: 16px;
		right: 16px;
	}
}

/* ── Large desktop (1440+) ──────────────────────────────────────── */
@media (min-width: 1440px) {
	.techbbq-speakers-list {
		--techbbq-speakers-list-card-padding: 18px 18px 32px;
		--techbbq-speakers-list-card-gap: var(--techbbq-space-2);
		--techbbq-speakers-list-name-size: var(--techbbq-text-h6-size);
		--techbbq-speakers-list-name-line-height: 1.32;
	}
}
