/**
 * Festival Schedule — styles for the /festival-schedule/ page.
 *
 * Relies on the color variables defined on .ghff-films-page in
 * ghff-films.css (this page reuses that same wrapper/title/subtitle
 * markup for consistent chrome), so this file only adds its own
 * grid/card variables + rules.
 *
 * Layout: a real CSS grid (theatre columns x showtime rows) on wider
 * screens, matching the printed program's grid. Below 760px it collapses
 * to a single column — cards stack in the same row-major (i.e. roughly
 * chronological) order they're written in the markup, and each card grows
 * its own venue tag (hidden on desktop, where the column header already
 * says it) so no information is lost when the columns disappear.
 */

.ghff-films-page {
	--ghff-sched-feature-bg: #fbf3c9;
	--ghff-sched-feature-border: #e4d381;
	--ghff-sched-shorts-bg: var(--ghff-mint);
	--ghff-sched-shorts-border: #b7d9b4;
	--ghff-sched-vip-bg: #d9ecf9;
	--ghff-sched-vip-border: #aed2e9;
	--ghff-sched-rail-red: #b3261e;
	--ghff-sched-rail-width: 34px;
}

.ghff-sched-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 22px;
	margin: 0 0 36px;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--ghff-secondary);
}

.ghff-sched-legend-item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.ghff-sched-swatch {
	width: 14px;
	height: 14px;
	border-radius: 3px;
	display: inline-block;
	border: 1px solid rgba(0, 0, 0, 0.15);
}

.ghff-sched-swatch-feature {
	background: var(--ghff-sched-feature-bg);
	border-color: var(--ghff-sched-feature-border);
}

.ghff-sched-swatch-shorts {
	background: var(--ghff-sched-shorts-bg);
	border-color: var(--ghff-sched-shorts-border);
}

.ghff-sched-swatch-vip {
	background: var(--ghff-sched-vip-bg);
	border-color: var(--ghff-sched-vip-border);
}

.ghff-sched-day {
	margin-bottom: 52px;
	/* Each day section carries its day_id as an anchor id (see
	   includes/schedule-data.php) for jump-to-day links. Same offset as
	   .ghff-event-card in ghff-events.css — clears the sticky .ghff-subnav
	   bar (assets/css/ghff-subnav.css) instead of landing underneath it. */
	scroll-margin-top: 82px;
}

.ghff-sched-day:last-of-type {
	margin-bottom: 40px;
}

.ghff-sched-day-heading {
	font-family: "Montserrat", sans-serif;
	font-weight: 700;
	text-transform: uppercase;
	font-size: 20px;
	line-height: 1.2;
	letter-spacing: 0.03em;
	color: var(--ghff-black);
	margin: 0 0 20px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--ghff-gold);
	scroll-margin-top: 20px;
}

.ghff-sched-section {
	margin-bottom: 28px;
}

.ghff-sched-section:last-child {
	margin-bottom: 0;
}

.ghff-sched-section-heading {
	font-family: "Montserrat", sans-serif;
	font-weight: 700;
	text-transform: uppercase;
	font-size: 14px;
	line-height: 1.2;
	letter-spacing: 0.06em;
	color: var(--ghff-gold-dark);
	margin: 0 0 12px;
}

/* ---- Grid ---- */

.ghff-sched-grid {
	display: grid;
	grid-template-columns: repeat(var(--ghff-sched-cols, 1), minmax(0, 1fr));
	gap: 10px;
	border: 1px solid var(--ghff-border);
	background: #f7f7f5;
	padding: 12px;
}

/* Desktop-only rail column — the PDF's red vertical time-block label running
   down the left edge of the grid. Only sections with row labels get this
   extra column (see $has_rail in templates/festival-schedule.php); it's
   dropped entirely on mobile (see the media query below), where each
   card's own bold time header already does that job. */
.ghff-sched-grid-has-rail {
	grid-template-columns: var(--ghff-sched-rail-width) repeat(var(--ghff-sched-cols, 1), minmax(0, 1fr));
}

.ghff-sched-rail-spacer {
	background: transparent;
}

.ghff-sched-rail {
	display: flex;
	align-items: center;
	justify-content: center;
	border-right: 2px solid var(--ghff-sched-rail-red);
}

.ghff-sched-rail span {
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	color: var(--ghff-sched-rail-red);
	font-family: "Montserrat", sans-serif;
	font-weight: 700;
	font-size: 12px;
	line-height: 1;
	letter-spacing: 0.03em;
	white-space: nowrap;
}

.ghff-sched-venue-head {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 2px;
	padding: 4px 6px 10px;
}

.ghff-sched-venue-name {
	font-family: "Montserrat", sans-serif;
	font-weight: 700;
	text-transform: uppercase;
	font-size: 13px;
	line-height: 1.3;
	letter-spacing: 0.02em;
	color: var(--ghff-black);
}

.ghff-sched-venue-cap {
	font-weight: 500;
	text-transform: none;
	color: var(--ghff-muted);
	font-size: 11px;
	line-height: 1.3;
}

/* line-height: explicit on purpose (not just here — see the rest of this
   file too) — without it this inherits the host theme's own body/paragraph
   line-height, which is taller on the real site than in a bare test
   environment with no theme loaded, throwing off this line's spacing
   (and wrapping) relative to what's designed here. */
.ghff-sched-venue-sponsor {
	display: block;
	font-size: 10.5px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--ghff-sched-rail-red);
}

.ghff-sched-cell {
	background: #fff;
	border: 1px solid var(--ghff-border);
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.ghff-sched-cell-empty {
	background: transparent;
	border: none;
}

.ghff-sched-venue-tag {
	display: none;
}

.ghff-sched-cell-time {
	background: var(--ghff-black);
	color: #fff;
	font-family: "Montserrat", sans-serif;
	font-weight: 700;
	font-size: 13px;
	line-height: 1;
	padding: 6px 10px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.ghff-sched-cell-time-text {
	line-height: 1;
	white-space: nowrap;
}

/* The "View Details" button — only rendered when
   ghff_schedule_cell_link() resolves the cell to an actual film or
   film-block page (see templates/festival-schedule.php); parties,
   workshops, the awards ceremony, etc. have nothing to link to and get
   no button, so .ghff-sched-cell-time just shows the time on its own.
   line-height: 1 is deliberate (not just here — see the rest of this
   file too): left unset, this small badge-style button inherits the host
   theme's own line-height instead of sizing tightly to its own text,
   which pads it out taller than designed on the real site. */
.ghff-sched-view-details {
	display: inline-block;
	flex-shrink: 0;
	background: var(--ghff-gold);
	color: var(--ghff-black);
	font-family: "Montserrat", sans-serif;
	font-weight: 700;
	font-size: 10px;
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	white-space: nowrap;
	text-decoration: none;
	padding: 4px 8px;
	border-radius: 3px;
}

.ghff-sched-view-details:hover,
.ghff-sched-view-details:focus {
	background: var(--ghff-gold-dark);
}

.ghff-sched-cell-body {
	padding: 10px 12px 12px;
	flex: 1;
}

.ghff-sched-cell-title {
	font-weight: 700;
	font-size: 14px;
	line-height: 1.3;
	color: var(--ghff-black);
	margin-bottom: 3px;
}

.ghff-sched-cell-meta {
	font-style: italic;
	font-size: 12px;
	line-height: 1.3;
	color: var(--ghff-secondary);
	margin-bottom: 4px;
}

.ghff-sched-cell-note {
	font-size: 11px;
	line-height: 1.4;
	color: var(--ghff-secondary);
}

/* Block screenings with several films in one slot (e.g. "Sky Bergman
   Presents") — each film gets its own row below the block title/meta,
   with the title bolded, matching the printed program's layout. */
.ghff-sched-cell-films {
	list-style: none;
	margin: 4px 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.ghff-sched-cell-films li {
	font-size: 12px;
	line-height: 1.4;
	color: var(--ghff-black);
}

.ghff-sched-cell-films-title {
	font-weight: 700;
}

.ghff-sched-cell-films-runtime {
	color: var(--ghff-secondary);
	margin-left: 3px;
}

.ghff-sched-cell-feature {
	background: var(--ghff-sched-feature-bg);
}

.ghff-sched-cell-feature .ghff-sched-cell-body {
	background: var(--ghff-sched-feature-bg);
}

.ghff-sched-cell-shorts .ghff-sched-cell-body {
	background: var(--ghff-sched-shorts-bg);
}

.ghff-sched-cell-vip .ghff-sched-cell-body {
	background: var(--ghff-sched-vip-bg);
}

.ghff-sched-cell-plain .ghff-sched-cell-body {
	background: #fff;
}

.ghff-sched-footnote {
	color: var(--ghff-secondary);
	font-size: 13px;
	line-height: 1.5;
	margin-top: 8px;
}

.ghff-sched-footnote a {
	color: var(--ghff-gold-dark);
	font-weight: 600;
}

/* ---- Mobile: collapse the grid to a single stacked column ---- */

@media (max-width: 760px) {
	.ghff-sched-grid {
		grid-template-columns: 1fr !important;
		gap: 12px;
		padding: 10px;
	}

	.ghff-sched-venue-head {
		display: none;
	}

	.ghff-sched-rail-spacer,
	.ghff-sched-rail {
		display: none;
	}

	.ghff-sched-cell-empty {
		display: none;
	}

	.ghff-sched-venue-tag {
		display: block;
		align-self: flex-start;
		margin: 8px 0 0 10px;
		font-size: 10.5px;
		font-weight: 700;
		line-height: 1.3;
		text-transform: uppercase;
		letter-spacing: 0.04em;
		color: var(--ghff-gold-dark);
	}

	/* Carries the venue's "Sponsored by:" line onto mobile — on desktop
	   it's already shown once in .ghff-sched-venue-head above the whole
	   column, but that column header is hidden on mobile (see
	   .ghff-sched-venue-head above), so each card repeats it here instead
	   of losing it. */
	.ghff-sched-venue-tag-sponsor {
		display: block;
		text-transform: none;
		letter-spacing: normal;
		font-weight: 700;
		line-height: 1.3;
		color: var(--ghff-sched-rail-red);
		margin-top: 1px;
	}

	.ghff-sched-cell-time {
		font-size: 14px;
	}

	.ghff-sched-cell-title {
		font-size: 15px;
	}
}
