/*
 * Screen 06 "Програма" (page 51) — core blocks + hopetv/schedule.
 * Extends style.css section 20 for the markup the block prints.
 *
 *   .hc-section.hc-schedule      Group: h1.hc-page-title, hopetv/schedule
 *     div.hc-schedule-block
 *       nav.hc-days > a[.is-active]
 *       div.hc-slots[.hc-slots--other-day]
 *         a|div.hc-slot[.is-now|.is-past][.has-episode][data-start][data-end][hidden]
 *       button.hc-schedule__more
 *       p.hc-schedule__empty
 */

.wp-block-group.hc-schedule { padding-top: 0; }
.wp-block-group.hc-section.hc-schedule > * + * { margin-top: 20px; }

.hc-schedule-block { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.hc-schedule-block a { text-decoration: none; }

/* Day switcher: as many equal columns as there are days. */
.hc-schedule-block .hc-days {
	grid-template-columns: repeat(var(--hc-days, 2), minmax(0, 1fr));
	max-width: none;
	box-sizing: border-box;
}
.hc-schedule-block .hc-days a { min-width: 0; }
.hc-schedule-block .hc-days a.is-active:hover { background: var(--hc-blue); color: #fff; }
.hc-schedule-block .hc-days a:hover { color: var(--hc-ink); }
@media (max-width: 519px) {
	.hc-schedule-block .hc-days__dow { font-size: 10px; }
	.hc-schedule-block .hc-days[style*="--hc-days:5"] .hc-days__date,
	.hc-schedule-block .hc-days[style*="--hc-days:6"] .hc-days__date,
	.hc-schedule-block .hc-days[style*="--hc-days:7"] .hc-days__date { font-size: 11px; }
}

/* Rows */
.hc-schedule-block .hc-slots { max-width: none; }
.hc-schedule-block .hc-slot { box-sizing: border-box; }
.hc-schedule-block .hc-slot[hidden] { display: none; }
.hc-schedule-block div.hc-slot:hover { filter: none; }
.hc-schedule-block .hc-slot__time { font-variant-numeric: tabular-nums; }
.hc-schedule-block .hc-slot__thumb { width: 100%; }
.hc-schedule-block .hc-slot__thumb img { border-radius: 0; }
.hc-schedule-block .hc-slot__prog { font-variant-numeric: tabular-nums; }
.hc-schedule-block .hc-slot__prog > span:last-child { flex: none; }

/* A day other than today: nothing is dimmed. */
.hc-slots--other-day .hc-slot.is-past { opacity: 1; }

/* State markers are printed in every row; the state decides which one shows. */
.hc-schedule-block .hc-slot__now,
.hc-schedule-block .hc-slot__aired,
.hc-schedule-block .hc-slot__prog,
.hc-schedule-block .hc-slot__cta { display: none; }
.hc-schedule-block .hc-slot.is-now .hc-slot__now { display: inline-flex; }
.hc-schedule-block .hc-slot.is-past .hc-slot__aired { display: inline-block; }
.hc-schedule-block .hc-slot.is-now .hc-slot__prog { display: flex; }
.hc-schedule-block .hc-slot.is-now .hc-slot__aired { display: none; }
.hc-schedule-block .hc-slot.is-now .hc-slot__aired,
.hc-schedule-block .hc-slot.is-now .hc-slot__now { color: #fff; }
.hc-schedule-block .hc-slot__chev { grid-column: 4; }

@media (min-width: 960px) {
	.hc-schedule-block .hc-slot__cta { grid-column: 4; }
	.hc-schedule-block .hc-slot.is-now .hc-slot__cta--now { display: inline-flex; }
	.hc-schedule-block .hc-slot:not(.is-now) .hc-slot__cta--episode { display: inline-flex; }
	.hc-schedule-block .hc-slot__chev { display: none; }
}

/* "Виж още" */
.hc-schedule__more {
	align-self: center;
	height: 48px;
	padding: 0 24px;
	border-radius: 999px;
	border: 2px solid var(--hc-line2);
	background: transparent;
	color: var(--hc-ink);
	font-weight: 800;
	font-size: 14px;
	cursor: pointer;
	transition: border-color .15s;
}
.hc-schedule__more:hover { border-color: var(--hc-ink); }
.hc-schedule__more[hidden] { display: none; }

/* Empty day */
.hc-schedule__empty {
	margin: 0;
	padding: clamp(36px, 5vw, 48px) 24px;
	border-radius: 20px;
	background: var(--hc-card);
	color: var(--hc-ink2);
	font-size: 15px;
	line-height: 1.5;
	text-align: center;
}

/* Shown when the playout has not answered for a while: the list is then a plan, not a fact. */
.hc-schedule__note { margin: 0 0 12px; font-size: 13px; font-weight: 700; color: var(--hc-ink3); }
