/*
 * FFE Events Entegy: agenda stream layout.
 *
 * The agenda loop outputs one .stream-wrap per schedule row inside a two-column grid
 * (.agenda__content). Standalone sessions span the full width; each stream's session group
 * takes one column. The plugin adds data-ff-stream-count and data-ff-stream-index to the
 * session group rows, which this file uses for three-stream time slots.
 *
 * Two-stream-only events are left exactly as they were.
 */

/* An event with a three-stream slot: six tracks, so 3 streams take 2 each and 2 streams take 3 each. */
.agenda__content:has(> .stream-wrap[data-ff-stream-count="3"]) {
	grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
}

.agenda__content > .stream-wrap[data-ff-stream-count="3"] {
	grid-column: span 2;
}

.agenda__content:has(> .stream-wrap[data-ff-stream-count="3"]) > .stream-wrap[data-ff-stream-count="2"] {
	grid-column: span 3;
}

/* Narrower header padding so long stream titles wrap less and the three columns line up. */
.stream-wrap[data-ff-stream-count="3"] .dual-stream__header-wrapper {
	padding-left: var(--space-m) !important;
	padding-right: var(--space-m) !important;
}

/*
 * Tablet and down: three columns are too narrow, so each stream gets the full width.
 * Screen only, so the printed agenda (PDF) keeps the three streams side by side.
 */
@media screen and (max-width: 991px) {
	.agenda__content > .stream-wrap[data-ff-stream-count="3"] {
		grid-column: 1 / -1 !important;
	}
}

/*
 * Stream 3 colours, on the page and in the printed agenda (.print-dual-stream).
 * Streams 1 and 2 keep their existing colours from agenda.css. The doubled class names are on
 * purpose: they outrank agenda.css's "stream after a stream" rules (five classes, some !important),
 * which would otherwise colour Stream 3 like Stream 2.
 */
.agenda__content.agenda__content > .stream-wrap.stream-wrap[data-ff-stream-index="3"] .dual-stream {
	background: var(--accent-ultra-light) !important;
}

.agenda__content.agenda__content > .stream-wrap.stream-wrap[data-ff-stream-index="3"] .dual-stream__header-wrapper,
.agenda__content.agenda__content > .stream-wrap.stream-wrap[data-ff-stream-index="3"] .agenda__time-column--dual-stream {
	background: var(--accent) !important;
}

.agenda__content.agenda__content > .stream-wrap.stream-wrap[data-ff-stream-index="3"] .dual-stream__title,
.agenda__content.agenda__content > .stream-wrap.stream-wrap[data-ff-stream-index="3"] .agenda__time-vertical-text--dual-stream {
	color: var(--base) !important;
}
