/**
 * Ride Results Shortcode Styles
 *
 * Used by [ccm-ride-results] shortcode via views/ride-results.php.
 *
 * @package Cycling_Club_Manager
 */

/* ── Year filter form ──────────────────────────────────────── */
#ccm-club-rides .ccm-year-label {
	font-size: 1rem;
}

#ccm-club-rides .ccm-year-select {
	height: 2.1875rem;
}

/* ── Links ──────────────────────────────────────────────────── */
#ccm-club-rides a {
	color: var(--color-link);
	text-decoration: none;
}

#ccm-club-rides a:hover {
	color: var(--color-link-hover);
}

/* ── Container ─────────────────────────────────────────────── */
#ccm-club-rides .table-responsive {
	height: 70vh;
}

/* ── Sticky event thead ─────────────────────────────────────── */
#ccm-club-rides thead.sticky-top {
	background-color: #fff;
	/* box-shadow replaces border-bottom so the line stays visible while sticky.
	   Uses Bootstrap gray-500 (#adb5bd) for a slightly stronger separator. */
	box-shadow: 0 1px 0 #adb5bd;
}

#ccm-club-rides thead h3 {
	margin: 0.5em 0 0.1em;
}

#ccm-club-rides thead .ccm-event-subtitle {
	font-size: 0.85em;
	padding-bottom: 0.25em;
}

/* ── Sort headers ───────────────────────────────────────────── */
#ccm-club-rides .ccm-sort-col {
	cursor: pointer;
	user-select: none;
	white-space: nowrap;
}

#ccm-club-rides .ccm-sort-col:hover {
	color: var(--color-link-hover);
}

#ccm-club-rides .ccm-sort-col.ccm-sort-active {
	color: var(--color-link, inherit);
}

#ccm-club-rides .ccm-sort-indicator {
	font-size: 0.75em;
	opacity: 0.6;
}

#ccm-club-rides .ccm-sort-col.ccm-sort-active .ccm-sort-indicator {
	opacity: 1;
}

/* ── Column-header row ──────────────────────────────────────── */
#ccm-club-rides .ccm-border-bottom {
	/* Intentionally left empty — border provided by thead box-shadow above. */
}

/* ── Sticky team-header rows ────────────────────────────────── */
#ccm-club-rides .ccm-team-header {
	position: sticky;
	top: var(--ccm-event-thead-height, 4.5em);
	z-index: 1;
	background: #adb5bd;
	/* Bootstrap gray-500 */
}

#ccm-club-rides .ccm-team-header td {
	padding: 0.3em 0.5em;
	/* Neutralize table-striped's --bs-table-bg-type override on odd rows so the
	   team-header background is always consistent regardless of row parity. */
	--bs-table-bg-type: transparent;
}

#ccm-club-rides .ccm-team-subtitle {
	font-size: 0.85em;
}

/* ── Per-event tables ───────────────────────────────────────── */
#ccm-club-rides .ccm-event-table {
	width: auto;
	/* Hidden until JS has equalised table and column widths. The JS sets
	   visibility:visible inline on each table once syncColumnWidths() completes. */
	visibility: hidden;
}