/* Týdenní rozvrh lekcí – vše omezeno na .pulse-rozvrh. Responzivita podle šířky kontejneru. */

.pulse-rozvrh {
	--pulse-accent: #e20b00;
	--pulse-ink: #000;
	--pulse-muted: #525252;
	--pulse-line: #f2f2f2;
	--pulse-border: #d4d4d4;
	--pulse-footer: #b1b1b1;

	container-type: inline-size;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	margin: 0;
	font-family: "Marble", sans-serif;
	font-weight: 500;
	font-size: 0.875rem;
	line-height: 1.4;
	color: var(--pulse-ink);
}

.pulse-rozvrh *,
.pulse-rozvrh *::before,
.pulse-rozvrh *::after {
	box-sizing: border-box;
}

.pulse-rozvrh [hidden] {
	display: none;
}

/* Filtry */
.pulse-rozvrh .pulse-rozvrh__filters {
	display: flex;
	flex-wrap: wrap;
	margin: 0 0 1.25rem;
	padding: 0;
}

.pulse-rozvrh .pulse-rozvrh__filters[hidden] {
	display: none;
}

.pulse-rozvrh .pulse-rozvrh__filter {
	appearance: none;
	margin: 0 -1px -1px 0;
	padding: 0.75rem 1rem;
	min-height: 2.75rem;
	background: #fff;
	color: var(--pulse-ink);
	border: 1px solid var(--pulse-border);
	border-radius: 0;
	box-shadow: none;
	font-family: inherit;
	font-size: 0.8125rem;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	transition: none;
}

.pulse-rozvrh .pulse-rozvrh__filter:hover {
	background: #f2f2f2;
	color: var(--pulse-ink);
	border-color: var(--pulse-border);
}

.pulse-rozvrh .pulse-rozvrh__filter:focus {
	outline: none;
}

.pulse-rozvrh .pulse-rozvrh__filter:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 0;
	box-shadow: 0 0 0 6px var(--pulse-accent);
	position: relative;
	z-index: 1;
}

/* Aktivní: červená + tučné + podtržení, aby nebyl rozpoznatelný jen barvou. */
.pulse-rozvrh .pulse-rozvrh__filter[aria-pressed="true"],
.pulse-rozvrh .pulse-rozvrh__filter[aria-pressed="true"]:hover {
	background: var(--pulse-accent);
	color: #fff;
	border-color: var(--pulse-accent);
	font-weight: 700;
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.3em;
}

/* Tabulka */
.pulse-rozvrh .pulse-rozvrh__table {
	display: table;
	width: 100%;
	margin: 0;
	table-layout: fixed;
	border-collapse: collapse;
	border: 1px solid var(--pulse-border);
	background: #fff;
	color: var(--pulse-ink);
	font-size: inherit;
}

.pulse-rozvrh .pulse-rozvrh__table th,
.pulse-rozvrh .pulse-rozvrh__table td {
	padding: 0.875rem 1rem;
	border: 0;
	border-bottom: 1px solid var(--pulse-line);
	background: transparent;
	text-align: left;
	vertical-align: middle;
	font-family: inherit;
	line-height: 1.35;
	overflow-wrap: anywhere;
}

.pulse-rozvrh .pulse-rozvrh__table thead th {
	padding-top: 1rem;
	padding-bottom: 1rem;
	background: #000;
	color: #fff;
	border-bottom: 0;
	font-size: 0.6875rem;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.pulse-rozvrh .pulse-rozvrh__table thead th:nth-child(1) { width: 17%; }
.pulse-rozvrh .pulse-rozvrh__table thead th:nth-child(2) { width: 16%; }
.pulse-rozvrh .pulse-rozvrh__table thead th:nth-child(3) { width: 31%; }
.pulse-rozvrh .pulse-rozvrh__table thead th:nth-child(4) { width: 20%; }
.pulse-rozvrh .pulse-rozvrh__table thead th:nth-child(5) { width: 16%; }

.pulse-rozvrh .pulse-rozvrh__table tbody tr:last-child td {
	border-bottom: 0;
}

.pulse-rozvrh .pulse-rozvrh__cell--cas {
	color: var(--pulse-accent);
	font-weight: 700;
	white-space: nowrap;
}

.pulse-rozvrh .pulse-rozvrh__cell--lekce {
	font-weight: 700;
}

.pulse-rozvrh .pulse-rozvrh__cell--trener {
	color: var(--pulse-muted);
	font-weight: 300;
}

.pulse-rozvrh .pulse-rozvrh__cell--reg {
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--pulse-muted);
}

.pulse-rozvrh .pulse-rozvrh__empty td {
	padding: 1.5rem 1rem;
	color: var(--pulse-muted);
	font-weight: 500;
}

/* Odkaz na online registraci */
.pulse-rozvrh .pulse-rozvrh__link,
.pulse-rozvrh .pulse-rozvrh__link:visited {
	color: var(--pulse-accent);
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 0.2em;
	box-shadow: none;
}

.pulse-rozvrh .pulse-rozvrh__link:hover {
	color: var(--pulse-ink);
	text-decoration: underline;
}

.pulse-rozvrh .pulse-rozvrh__link:focus-visible {
	outline: 2px solid var(--pulse-accent);
	outline-offset: 2px;
}

/* Štítky dnů */
.pulse-rozvrh .pulse-rozvrh__badge {
	display: inline-block;
	min-width: 5.25rem;
	padding: 0.4rem 0.75rem;
	font-size: 0.6875rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.04em;
	text-align: center;
	text-transform: uppercase;
}

.pulse-rozvrh .pulse-rozvrh__badge--1 { background: #ffe2e2; color: #9f0712; }
.pulse-rozvrh .pulse-rozvrh__badge--2 { background: #ffedd4; color: #9f2d00; }
.pulse-rozvrh .pulse-rozvrh__badge--3 { background: #fef3c6; color: #973c00; }
.pulse-rozvrh .pulse-rozvrh__badge--4 { background: #d0fae5; color: #006045; }
.pulse-rozvrh .pulse-rozvrh__badge--5 { background: #cefafe; color: #005f78; }
.pulse-rozvrh .pulse-rozvrh__badge--6 { background: #dbeafe; color: #193cb8; }
.pulse-rozvrh .pulse-rozvrh__badge--7 { background: #ede9fe; color: #5d0ec0; }

/* Patička */
.pulse-rozvrh .pulse-rozvrh__footer {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.25rem 1rem;
	margin: 0.75rem 0 0;
}

.pulse-rozvrh .pulse-rozvrh__count,
.pulse-rozvrh .pulse-rozvrh__note {
	margin: 0;
	padding: 0;
	color: var(--pulse-footer);
	font-size: 0.75rem;
	font-weight: 300;
}

.pulse-rozvrh .pulse-rozvrh__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* Úzký kontejner: řádky jako karty (významy sloupců zůstávají, záhlaví je jen pro čtečky). */
@container (max-width: 40rem) {
	.pulse-rozvrh .pulse-rozvrh__filters {
		display: grid;
		grid-template-columns: repeat(4, 1fr);
		padding: 0 1px 1px 0;
	}

	.pulse-rozvrh .pulse-rozvrh__filter {
		min-width: 0;
		padding-left: 0.25rem;
		padding-right: 0.25rem;
		font-size: 0.75rem;
	}

	.pulse-rozvrh .pulse-rozvrh__table,
	.pulse-rozvrh .pulse-rozvrh__table tbody {
		display: block;
		width: 100%;
	}

	.pulse-rozvrh .pulse-rozvrh__table thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
	}

	.pulse-rozvrh .pulse-rozvrh__row,
	.pulse-rozvrh .pulse-rozvrh__empty {
		display: grid;
		grid-template-columns: auto 1fr;
		gap: 0.375rem 0.75rem;
		align-items: center;
		padding: 0.875rem 1rem;
		border-bottom: 1px solid var(--pulse-line);
	}

	.pulse-rozvrh .pulse-rozvrh__table tbody tr:last-child {
		border-bottom: 0;
	}

	.pulse-rozvrh .pulse-rozvrh__empty {
		display: block;
	}

	.pulse-rozvrh .pulse-rozvrh__table td {
		display: block;
		padding: 0;
		border: 0;
		min-width: 0;
	}

	.pulse-rozvrh .pulse-rozvrh__empty td {
		padding: 0.5rem 0;
	}

	.pulse-rozvrh .pulse-rozvrh__cell--lekce {
		grid-column: 1 / -1;
		font-size: 1rem;
	}

	.pulse-rozvrh .pulse-rozvrh__cell--trener,
	.pulse-rozvrh .pulse-rozvrh__cell--reg {
		grid-column: 1 / -1;
	}

	.pulse-rozvrh .pulse-rozvrh__cell--trener::before,
	.pulse-rozvrh .pulse-rozvrh__cell--reg::before {
		content: attr(data-label) ": ";
		font-weight: 500;
		color: var(--pulse-ink);
	}

	.pulse-rozvrh .pulse-rozvrh__cell--trener:empty {
		display: none;
	}
}

/* Atribut hidden musí vyhrát nad display tabulky i karet (úzký kontejner). */
.pulse-rozvrh .pulse-rozvrh__table [hidden],
.pulse-rozvrh .pulse-rozvrh__filters[hidden] {
	display: none;
}
