/* Agenda — pre-conference workshop grid (Wednesday super-block).

   M/A rows are column-aligned by workshop_index; FD and BL get full-height
   columns on the right. `grid-template-columns` is set inline per day (it
   depends on the highest index and whether FD/BL exist). align-items:stretch
   makes every cell — including invisible placeholders — take the row height. */
.workshop-grid {
	display: grid;
	gap: 10rem;
	margin: 0 0 22rem;
	align-items: stretch;
}
/* Below 1025px the strict workshop_index matrix can't hold: 4–6 minmax(0,1fr)
   columns get unreadably narrow. So we DROP the index alignment here and let the
   cells reflow into rows at a readable min-width (flex-wrap). flex ignores the
   inline grid-template-columns AND the per-cell grid-column/grid-row, so the
   placement just falls away — no !important needed against the inline styles.
   M2-over-A2 alignment is lost in this range (acceptable on tablet; it's gone in
   the single-column stack anyway). Above 1025px the exact grid is untouched. */
@media (max-width: 1025px) {
	.workshop-grid {
		display: flex;
		flex-wrap: wrap;
	}
}

/* Wrap band only (NOT the ≤600 stack): each footprint starts at ~220rem WIDTH
   and grows to fill its row — matches the standalone workshops row
   (agenda.grid.css, minmax(220rem,1fr)). This must stay out of the ≤600 stack:
   there flex-direction is column, so flex-basis would set HEIGHT (220rem) and
   blow up the card heights. */
@media (min-width: 601px) and (max-width: 1025px) {
	.workshop-grid__cell,
	.workshop-grid__col {
		flex: 1 1 220rem;
	}
}

/* Flex line-break helper — sits before each full-day (FD) / bilateral (BL)
   block. In the flex wrap range it spans the full row (flex-basis:100%, zero
   height) so the following block starts on its own line below the wrapped M/A
   cells. In the grid layout (>1025px) it's display:none and consumes no column. */
.workshop-grid__break {
	display: none;
}
@media (max-width: 1025px) {
	.workshop-grid__break {
		display: block;
		flex-basis: 100%;
		height: 0;
		margin: 0;
	}
}

/* Single-column stack — same 600px breakpoint as the main session grid
   (agenda.grid.css), so the whole agenda collapses to one column together. */
@media (max-width: 600px) {
	/* Collapse the workshop super-block to a single column; flex ignores the
       inline grid-column/grid-row placement, so cards just stack in DOM order. */
	.workshop-grid {
		flex-direction: column;
		flex-wrap: nowrap;
	}
}

/* M/A footprint cell = the grid item. position:relative so the card inside can
   go position:absolute on hover (offset parent) without losing its place; the
   hover JS freezes this element's height. min-width:0 lets the cell shrink below
   its content width (grid items default to min-width:auto) so the no-floor
   minmax(0,1fr) tracks can actually narrow instead of overflowing. */
.workshop-grid__cell {
	display: flex;
	position: relative;
	min-width: 0;
}

.workshop-grid__cell > .programme-item {
	flex: 1;
}

/* FD / BL full-height columns — stack their per-card .programme-cell footprints
   and fill the spanned rows. */
.workshop-grid__col {
	display: flex;
	flex-direction: column;
	gap: 10rem;
	min-width: 0;
}
.workshop-grid__col > .programme-cell {
	flex: 1;
}

/* Match the compact workshops padding inside the grid. */
.workshop-grid .programme-item {
    padding: 20px;
}

/* Invisible, session-sized placeholder: keeps its grid cell (so A2 lines up
   under M2) but is non-interactive and hidden from assistive tech. */
.programme-item--placeholder {
	visibility: hidden;
	pointer-events: none;
	background: transparent;
	border-left-color: transparent;
	box-shadow: none;
	cursor: default;
}
@media (max-width: 1025px) {
	/* Placeholders only exist to hold their grid column. Once we switch to
       flex (stack or wrap) the placement is gone, so we drop them — and we must
       hide the WRAPPING cell too: it keeps its `flex: 1 1 220rem` basis and
       would otherwise leave an empty 220rem slot (a visible gap in wrap mode). */
	.workshop-grid__cell:has(.programme-item--placeholder),
	.programme-item--placeholder {
		display: none;
	}
}
