/*
 * Screens "Предавания" (page 55), show (category archive), topic (tag archive)
 * and the blocks hopetv/shows-grid + hopetv/show-header wherever they render.
 * Loaded by inc/screens/shows.php. Builds on style.css sections 4, 4b, 17, 18.
 *
 * Markup contract
 *   .hc-showsgrid[.hc-shows]            block wrapper (.hc-shows when the filter is on)
 *     .hc-shows__count                  "12 от 61"
 *     nav.hc-chips.hc-shows__topics     a.hc-chip[data-topic]
 *     .hc-grid.hc-grid--shows | .hc-rail.hc-rail--shows
 *       a.hc-showcard[data-topics][hidden]
 *   .hc-shows-page                      section of page 55 (Heading + block)
 *   .hc-show-page                       hero section of category.html
 *     nav.wp-block-breadcrumbs.hc-crumbs
 *     .hc-show__hero > .hc-show__text + figure.hc-show__media
 *   .hc-eplist__head                    Heading + Term Count + rule + p.hc-sort
 *   ul.hc-list.hc-eplist > li > .hc-row
 */

/* ---------- Block hopetv/shows-grid ---------- */
.hc-showsgrid { display: flex; flex-direction: column; gap: 22px; min-width: 0; padding-top: 0; }
.hc-showsgrid > * { margin: 0; min-width: 0; }
.hc-showsgrid .hc-showcard[hidden] { display: none; }
.hc-showsgrid .hc-showcard .hc-thumb { width: 100%; }
.hc-showsgrid__none { margin: 0; font-size: 14px; color: var(--hc-ink3); }
.hc-shows__topics { margin: 0; }
.hc-shows__count { align-self: flex-end; white-space: nowrap; }

/* Page "Предавания": the counter sits on the title's baseline, right-aligned. */
.wp-block-group.hc-shows-page { position: relative; }
.wp-block-group.hc-shows-page > * + * { margin-top: 22px; }
/* style.css zeroes the margins of .hc-page-title; inside a constrained band it must stay centred. */
.wp-block-group.hc-section > :is(h1, h2).hc-page-title { margin-left: auto; margin-right: auto; box-sizing: border-box; }
.hc-shows-page > h1.hc-page-title { padding-right: 96px; }
.hc-shows-page .hc-shows__count {
	position: absolute;
	right: max(var(--hc-gutter, 16px), calc((100% - var(--hc-maxw, 1280px)) / 2));
	top: 0;
	height: calc(clamp(30px, 5vw, 56px) * .95);
	display: flex;
	align-items: flex-end;
}

/* ---------- Breadcrumbs (core block) ---------- */
.wp-block-breadcrumbs.hc-crumbs { display: block; margin: 0; }
.wp-block-breadcrumbs.hc-crumbs ol { gap: 4px 0; }
.wp-block-breadcrumbs.hc-crumbs li:not(:last-child)::after { margin: 0 8px; opacity: 1; }

/* ---------- Show page (category archive) ---------- */
.wp-block-group.hc-show-page > * + * { margin-top: 28px; }
.wp-block-group.hc-show__hero { display: flex; flex-wrap: wrap-reverse; gap: 28px; align-items: center; }
.hc-show__hero > *,
.hc-show__text > * { margin-block: 0; }
.wp-block-group.hc-show__text { flex: 1 1 360px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
figure.hc-show__media { position: relative; margin: 0; flex: 1.3 1 420px; min-width: 0; }
.hc-show__media img { height: 100%; }
.hc-show__desc > p { margin: 0; }
.hc-show__desc > p + p { margin-top: 10px; }
.hc-show__topics a.hc-chip--tag { cursor: pointer; }
.hc-show__actions .hc-btn { font-family: inherit; }
.hc-show__play { padding-left: 18px; }
.hc-show__play::before {
	content: "";
	width: 0;
	height: 0;
	border-left: 11px solid currentColor;
	border-top: 7px solid transparent;
	border-bottom: 7px solid transparent;
}
.hc-show__placeholder { padding: 16px; border-radius: 14px; background: var(--hc-card); color: var(--hc-ink3); font-size: 13px; }

/* Episode list head: "Епизоди 12" + rule + sort switch. */
.wp-block-group.hc-eplist__head { flex-wrap: wrap; gap: 14px; }
.hc-eplist__head > .hc-eplist__count {
	margin-left: -6px;
	font-family: var(--hc-font-display);
	font-weight: 700;
	font-size: clamp(15px, 1.6vw, 18px);
	line-height: 1.2;
	color: var(--hc-ink3);
	flex: none;
}
p.hc-sort { margin: 0; flex: none; gap: 0; }
p.hc-sort a { display: inline-block; white-space: nowrap; }
p.hc-sort a:hover { color: var(--hc-ink); }
p.hc-sort a.is-active,
p.hc-sort a.is-active:hover { color: var(--hc-inv-ink); }

/* Episode rows. */
.wp-block-post-template.hc-eplist { gap: 6px; }
.hc-eplist .hc-row .hc-thumb { width: 100%; }
.hc-row__meta { margin: 0; }
.hc-row__desc .wp-block-post-excerpt__excerpt {
	margin: 0;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}
.hc-row__desc .wp-block-post-excerpt__more-text { display: none; }

/* Empty state built from core blocks (Query No Results). */
.wp-block-group.hc-empty > * { margin-block: 0; }
.wp-block-group.hc-empty > h3.hc-empty__title { color: inherit; }

/* ---------- Topic page (tag archive) ---------- */
.wp-block-group.hc-topic-page > * + * { margin-top: 22px; }
