/*
 * Single Musician — rail pagination (hybrid Load more + View all)
 *
 * Scoped to .tec-single-musician. Provides the per-rail action row
 * (Load more <button> + View all link) and the per-card overflow
 * container. Card markup itself is the canonical card pattern; this
 * stylesheet does not restyle cards.
 *
 * Holt 2026-05-08.
 */

/* Per-card wrapper inside each rail's grid. The grid layout is owned by
 * the existing card-grid CSS (.tec-recording-card-grid, .tec-video-card-grid,
 * .tec-post-card-grid, .tec-events-archive-grid). The wrapper itself uses
 * display:contents so the card's outer div becomes the direct child of the
 * grid container — that way the canonical flex/grid layout (3-up for videos/
 * recordings/press, single-column flex for events) treats each card as a
 * grid/flex item exactly as it does on the canonical archive surfaces.
 * Without this, .tec-rail-item would become the grid item, leaving the card
 * to render at intrinsic width (visible regression: "lost canonical card
 * view" on single-musician — Holt 2026-05-08). */
[data-tec-rail] .tec-rail-item {
	display: contents;
}
[data-tec-rail] .tec-rail-item[hidden] {
	display: none !important;
}

/* Action row beneath each rail: Load more (left) + View all (right) on
 * desktop; stacks centred on mobile. */
[data-tec-rail] .tec-rail-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: var(--wp--preset--spacing--40, 1rem) var(--wp--preset--spacing--50, 2rem);
	margin-top: var(--wp--preset--spacing--50, 2rem);
}

[data-tec-rail] .tec-rail-loadmore {
	margin: 0;
}

[data-tec-rail] .tec-rail-loadmore__btn {
	cursor: pointer;
}

/* View-all anchor: small text link, no underline at rest, hover underlines. */
[data-tec-rail] .tec-rail-view-all {
	font-size: 0.95rem;
	color: var(--wp--preset--color--navy, #052f67);
	text-decoration: none;
	font-weight: 600;
}

[data-tec-rail] .tec-rail-view-all:hover,
[data-tec-rail] .tec-rail-view-all:focus {
	text-decoration: underline;
}

/* Press band (white background) and Videos band (white background): keep
 * navy tone for the View all link. Recordings + Concerts (light-blue
 * background): same — navy reads correctly on both light surfaces. */

/* When the Load more button has been hidden by JS (no more overflow),
 * keep the View all link centred on its own row. */
[data-tec-rail] .tec-rail-actions:has(.tec-rail-loadmore[hidden]) {
	justify-content: center;
}
