/**
 * TechBBQ Event Programme — time + title accordion rows.
 *
 * Figma Nordic Africa Startup Summit: 7358:71445 (1440).
 * Section vertical spacing lives on the Elementor wrapper container.
 *
 * Breakpoints (mobile-first): 0–767, 768–1023, 1024–1439, 1440+.
 */

.techbbq-event-programme {
	--techbbq-ep-header-gap: var(--techbbq-space-3);
	--techbbq-ep-section-gap: var(--techbbq-space-4);
	--techbbq-ep-time-width: 100%;
	--techbbq-ep-icon-size: 32px;

	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	overflow-x: clip;
	color: var(--techbbq-content-primary);
	background-color: var(--techbbq-bg-main);
}

.techbbq-event-programme__inner {
	display: flex;
	flex-direction: column;
	gap: var(--techbbq-ep-section-gap);
}

.techbbq-event-programme__header {
	display: flex;
	flex-direction: column;
	gap: var(--techbbq-ep-header-gap);
	align-items: center;
	text-align: center;
}

.techbbq-event-programme__header .techbbq-event-programme__title {
	margin: 0;
}

.techbbq-event-programme__list {
	display: flex;
	flex-direction: column;
	width: 100%;
}

.techbbq-event-programme__tabs-wrap {
	width: 100%;
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.techbbq-event-programme__tabs-wrap::-webkit-scrollbar {
	display: none;
}

.techbbq-event-programme__tabs-wrap .techbbq-filter-tabs__list {
	justify-content: flex-start;
}

.techbbq-event-programme__panels {
	width: 100%;
}

.techbbq-event-programme__panel-wrap[hidden] {
	display: none;
}

.techbbq-event-programme--has-tabs .techbbq-event-programme__header {
	align-items: flex-start;
	text-align: left;
}

.techbbq-event-programme__item {
	display: flex;
	flex-direction: column;
	gap: var(--techbbq-space-1);
	align-items: flex-start;
	min-width: 0;
	max-width: 100%;
	padding: var(--techbbq-space-3) var(--techbbq-space-2);
	border-bottom: 1px solid var(--techbbq-border-tertiary);
}

.techbbq-event-programme__item.is-highlight {
	background-color: var(--techbbq-bg-surface);
}

.techbbq-event-programme__row {
	display: flex;
	flex-direction: column;
	gap: var(--techbbq-space-1);
	align-items: flex-start;
	width: 100%;
	max-width: 100%;
	min-width: 0;
}

.techbbq-event-programme__time {
	flex-shrink: 0;
	width: var(--techbbq-ep-time-width);
	margin: 0;
	padding-top: 2px;
	color: var(--techbbq-content-primary);
}

.techbbq-event-programme__content {
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	gap: var(--techbbq-space-1);
	align-items: flex-start;
	min-width: 0;
	max-width: 100%;
	width: 100%;
}

.techbbq-event-programme__heading {
	margin: 0;
	min-width: 0;
	width: 100%;
}

.techbbq-event-programme__trigger {
	display: flex;
	flex-direction: row;
	gap: var(--techbbq-space-1);
	align-items: flex-start;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	text-align: left;
	white-space: normal;
	cursor: pointer;
}

[type="button"].techbbq-event-programme__trigger:hover,
[type="button"].techbbq-event-programme__trigger:focus,
button.techbbq-event-programme__trigger:hover,
button.techbbq-event-programme__trigger:focus {
	background: transparent;
	border-color: transparent;
	color: inherit;
}

.techbbq-event-programme__trigger:focus-visible {
	outline: 2px solid var(--techbbq-content-primary);
	outline-offset: 2px;
	border-radius: 4px;
}

.techbbq-event-programme__title-text {
	display: block;
	flex: 1 1 0;
	min-width: 0;
	max-width: 100%;
	margin: 0;
	padding-top: 2px;
	overflow-wrap: break-word;
	word-wrap: break-word;
	color: var(--techbbq-content-primary);
}

.techbbq-event-programme__static-title {
	display: block;
	margin: 0;
	padding-top: 2px;
	overflow-wrap: break-word;
	word-wrap: break-word;
	color: var(--techbbq-content-primary);
}

.techbbq-event-programme__icon {
	display: flex;
	flex-shrink: 0;
	align-items: flex-start;
	justify-content: center;
	width: var(--techbbq-ep-icon-size);
	height: var(--techbbq-ep-icon-size);
	margin-left: auto;
	color: var(--techbbq-content-primary);
	transition: transform 0.2s ease;
}

.techbbq-event-programme__icon svg {
	display: block;
	width: var(--techbbq-ep-icon-size);
	height: var(--techbbq-ep-icon-size);
}

.techbbq-event-programme__icon svg path {
	transition: stroke-opacity 0.2s ease;
}

.techbbq-event-programme__item.is-open .techbbq-event-programme__icon {
	transform: rotate(180deg);
}

.techbbq-event-programme__item.is-open .techbbq-event-programme__icon svg path {
	stroke-opacity: 1;
}

.techbbq-event-programme__item:not(.is-open) .techbbq-event-programme__icon svg path {
	stroke-opacity: 0.4;
}

.techbbq-event-programme__trigger:hover .techbbq-event-programme__icon svg path {
	stroke-opacity: 1;
}

.techbbq-event-programme__panel[hidden] {
	display: none;
}

.techbbq-event-programme__description {
	margin: 0;
	overflow-wrap: break-word;
	word-wrap: break-word;
	color: var(--techbbq-content-secondary);
}

/* ── Tablet (768–1023) ── */
@media (min-width: 768px) {
	.techbbq-event-programme {
		--techbbq-ep-time-width: min(342px, 34%);
	}

	.techbbq-event-programme__row {
		flex-direction: row;
		gap: var(--techbbq-space-1);
		align-items: flex-start;
	}

	.techbbq-event-programme__content {
		padding-right: var(--techbbq-ep-icon-size);
	}
}

/* Faces on a programme row, before it is expanded. Geometry copied from
 * agenda-calendar.css (24px, -4px overlap, initial behind the image) so a
 * manual programme reads the same as the Brella-driven one, but with local
 * class names because that stylesheet is not enqueued here. Tracker item 18. */
.techbbq-event-programme__speaker-stack {
	--techbbq-ep-avatar-size: 24px;

	display: flex;
	align-items: center;
	margin: var(--techbbq-space-2) 0 0;
}

.techbbq-event-programme__speaker-avatar {
	position: relative;
	display: flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: var(--techbbq-ep-avatar-size);
	height: var(--techbbq-ep-avatar-size);
	overflow: hidden;
	border-radius: 50%;
	background-color: var(--techbbq-tag-primary);
}

.techbbq-event-programme__speaker-avatar + .techbbq-event-programme__speaker-avatar {
	margin-left: -4px;
}

.techbbq-event-programme__speaker-avatar-initial {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	font-family: var(--techbbq-font-family-body);
	font-size: 11px;
	font-weight: 500;
	line-height: 1;
	color: var(--techbbq-content-secondary);
}

/* Scoped to the parent on purpose. Elementor ships `.elementor img { height:
 * auto }` at specificity (0,1,1), one class plus a type selector, which beats
 * a lone (0,1,0) class no matter what order the stylesheets load in. That is
 * why width applied and height did not: the Elementor rule only sets height,
 * so a 683x1024 portrait rendered 24x36, clipped by overflow: hidden and
 * cropped from the top rather than centred. Adding the parent class makes
 * this (0,2,0) and wins without !important.
 *
 * agenda-calendar.css has the same lone-class shape and the same latent
 * weakness; it goes unnoticed there because those avatars are square. */
.techbbq-event-programme__speaker-avatar .techbbq-event-programme__speaker-avatar-image {
	position: relative;
	z-index: 1;
	display: block;
	width: var(--techbbq-ep-avatar-size);
	height: var(--techbbq-ep-avatar-size);
	object-fit: cover;
}

.techbbq-event-programme__speaker-overflow {
	margin-left: 6px;
	font-family: var(--techbbq-font-family-body);
	font-size: var(--techbbq-text-paragraph-xs-size);
	font-weight: 400;
	line-height: 1;
	color: var(--techbbq-content-secondary);
}

/* Named speaker list — avatar, name, job line, one person per row.
 *
 * Sits inside the expanded panel, where there is room to read, while the 24px
 * overlapping stack stays on the collapsed row as the teaser. A static row has
 * no panel to expand, so the list stands in for the stack there instead of
 * printing the same people twice.
 *
 * --techbbq-ep-avatar-size is declared on the stack, so the list has to declare
 * its own or the shared avatar rules resolve to an invalid width and height. */
.techbbq-event-programme__speaker-list {
	--techbbq-ep-avatar-size: 32px;

	display: flex;
	flex-direction: column;
	gap: var(--techbbq-space-1);
	margin: var(--techbbq-space-3) 0 0;
	padding: 0;
	list-style: none;
}

.techbbq-event-programme__speaker-entry {
	display: flex;
	align-items: center;
	gap: var(--techbbq-space-1);
}

/* The stack overlaps adjacent avatars by -4px. Each list avatar is alone in its
 * own item, so that rule cannot reach these, but the size bump does need saying. */
.techbbq-event-programme__speaker-avatar--large .techbbq-event-programme__speaker-avatar-initial {
	font-size: 13px;
}

.techbbq-event-programme__speaker-text {
	font-family: var(--techbbq-font-family-body);
	font-size: var(--techbbq-text-paragraph-s-size, 15px);
	line-height: 1.4;
	overflow-wrap: break-word;
	word-wrap: break-word;
}

.techbbq-event-programme__speaker-name {
	font-weight: 500;
	color: var(--techbbq-content-primary);
}

.techbbq-event-programme__speaker-role {
	font-weight: 400;
	color: var(--techbbq-content-secondary);
}
