/* Event Speakers (inc/event-speakers.php) */

.txwsw-speakers {
	--speaker-navy: var(--e-global-color-a2ce3bd, #112459);
	margin: 40px 0 20px;
	text-align: center;
}

.txwsw-speakers__rule {
	border: 0;
	border-top: 1px solid #000;
	margin: 15px 0;
}

.txwsw-speakers .txwsw-speakers__heading {
	color: var(--speaker-navy);
	font-family: "Playfair Display", serif;
	font-size: 40px !important; /* beats single-post template's post-content h2 rule */
	font-weight: 700;
	margin: 20px 0 30px;
}

.txwsw-speakers .txwsw-speakers__group-title {
	color: var(--speaker-navy);
	font-family: "Playfair Display", serif;
	font-size: 28px;
	margin: 30px 0 20px;
}

.txwsw-speakers__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 30px 10px;
	list-style: none;
	margin: 0 0 30px;
	padding: 0;
}

/* Center a short last row */
@supports (display: flex) {
	.txwsw-speakers__grid {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
	}
	.txwsw-speakers__grid > li {
		flex: 0 0 calc((100% - 20px) / 3);
	}
}

@media (max-width: 1024px) {
	.txwsw-speakers__grid > li { flex-basis: calc((100% - 10px) / 2); }
}

@media (max-width: 767px) {
	.txwsw-speakers__grid > li { flex-basis: 100%; }
	.txwsw-speakers .txwsw-speakers__heading { font-size: 32px !important; }
}

/* Card — reset Elementor kit/Hello button styles */
.txwsw-speakers .txwsw-speaker,
.txwsw-speakers .txwsw-speaker:hover,
.txwsw-speakers .txwsw-speaker:focus {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 0;
	background: none;
	color: var(--speaker-navy);
	font: inherit;
	letter-spacing: normal;
	text-transform: none;
	white-space: normal;
	text-align: center;
}

.txwsw-speakers button.txwsw-speaker { cursor: pointer; }

.txwsw-speaker__photo {
	display: block;
	width: 300px;
	max-width: 100%;
	aspect-ratio: 1;
	border: 1px solid #e0e0e0;
	border-radius: 50%;
	overflow: hidden;
	margin-bottom: 12px;
}

.txwsw-speaker__photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .3s ease;
}

.txwsw-speakers button.txwsw-speaker:hover .txwsw-speaker__photo img,
.txwsw-speakers button.txwsw-speaker:focus-visible .txwsw-speaker__photo img {
	transform: scale(1.04);
}

.txwsw-speaker__name {
	display: block;
	font-family: "Playfair Display", serif;
	font-size: 28px;
	font-weight: 700;
	line-height: 1.2;
	color: #212328cc;
}

.txwsw-speaker__role {
	display: block;
	margin-top: 6px;
	font-family: "Playfair Display", serif;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.2;
	color: #212328cc;
}

/* Bio popup */
html:has(.txwsw-speaker-dialog[open]) { overflow: hidden; }

.txwsw-speaker-dialog {
	width: min(800px, calc(100vw - 32px));
	max-height: calc(100vh - 64px);
	padding: 40px;
	border: 0;
	border-radius: 4px;
	box-shadow: 2px 8px 23px 3px rgba(0, 0, 0, .2);
	color: #212328;
	text-align: left;
}

.txwsw-speaker-dialog::backdrop { background: rgba(0, 0, 0, .8); }

.txwsw-speaker-dialog__close-form { margin: 0; }

.txwsw-speakers .txwsw-speaker-dialog__close,
.txwsw-speakers .txwsw-speaker-dialog__close:hover,
.txwsw-speakers .txwsw-speaker-dialog__close:focus {
	position: absolute;
	top: 8px;
	right: 12px;
	padding: 4px 10px;
	border: 0;
	background: none;
	color: #212328;
	font-size: 32px;
	line-height: 1;
	letter-spacing: 0;
}

.txwsw-speaker-dialog__header {
	margin-bottom: 20px;
	padding-right: 30px; /* clear the close button */
}

.txwsw-speakers .txwsw-speaker-dialog__name {
	margin: 0;
	font-family: "Playfair Display", serif;
	font-size: 42px !important;
	line-height: 1.15;
	color: var(--speaker-navy);
}

.txwsw-speaker-dialog__role {
	margin: 6px 0 0;
	font-family: "Playfair Display", serif;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.3;
}

.txwsw-speaker-dialog__bio { font-size: 16px; }
.txwsw-speaker-dialog__bio p:last-child { margin-bottom: 0; }

@media (max-width: 767px) {
	.txwsw-speaker-dialog { padding: 32px 20px 24px; }
	.txwsw-speakers .txwsw-speaker-dialog__name { font-size: 32px !important; }
	.txwsw-speaker-dialog__role { font-size: 20px; }
}
