/* Tabulka termínů – front-end. Barvy dědí ze šablony, písmo a velikost níže. */

.st-terminy {
	--st-font: "Barlow", sans-serif;
	--st-size: 20px;

	width: 100%;
	border-collapse: collapse;
	margin: 0 0 1.5em;
	font-family: var( --st-font );
	font-size: var( --st-size );
	line-height: 1.4;
	text-align: center;
}

.st-terminy th,
.st-terminy td {
	padding: 0.5em 0.75em;
	border: 1px solid currentColor;
	border-color: rgba( 0, 0, 0, 0.15 );
	font-family: inherit;
	font-size: inherit;
	text-align: center;
	vertical-align: middle;
}

.st-terminy thead th {
	font-weight: 700;
	background: rgba( 0, 0, 0, 0.04 );
}

.st-terminy .st-day {
	font-weight: 400;
	white-space: nowrap;
}

.st-terminy .st-label {
	font-weight: 700;
}

.st-terminy .st-custom {
	display: inline-block;
}

.st-terminy .st-slot {
	white-space: nowrap;
}

.st-terminy .st-slot--full {
	opacity: 0.65;
}

.st-terminy .st-row--full .st-day {
	opacity: 0.65;
}

.st-terminy .st-row--past {
	opacity: 0.5;
}

/* Sbalené proběhlé termíny – čistě CSS, bez JavaScriptu */
.st-terminy-wrap {
	position: relative;
}

.st-past-toggle {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	opacity: 0;
}

.st-terminy .st-past-bar td {
	text-align: center;
	background: rgba( 0, 0, 0, 0.03 );
}

.st-terminy .st-past-bar label {
	display: inline-block;
	padding: 0.15em 0.4em;
	cursor: pointer;
	text-decoration: underline;
	font-size: 0.85em;
}

.st-past-toggle:focus-visible ~ .st-terminy .st-past-bar label {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.st-past-toggle:not( :checked ) ~ .st-terminy .st-row--past,
.st-past-toggle:not( :checked ) ~ .st-terminy .st-past-less,
.st-past-toggle:checked ~ .st-terminy .st-past-more {
	display: none;
}

.st-terminy-empty,
.st-terminy-error {
	margin: 0 0 1.5em;
}

/* Mobil: řádky na sebe, popisek buňky z data-label */
@media screen and (max-width: 640px) {
	.st-terminy,
	.st-terminy tbody,
	.st-terminy tr,
	.st-terminy th,
	.st-terminy td {
		display: block;
		width: auto;
	}

	.st-terminy thead {
		display: none;
	}

	.st-terminy tr {
		margin-bottom: 0.75em;
		border: 1px solid rgba( 0, 0, 0, 0.15 );
	}

	.st-terminy th,
	.st-terminy td {
		border: 0;
		border-bottom: 1px solid rgba( 0, 0, 0, 0.08 );
	}

	.st-terminy tr > :last-child {
		border-bottom: 0;
	}

	.st-terminy .st-day {
		font-weight: 700;
		background: rgba( 0, 0, 0, 0.04 );
		white-space: normal;
		text-align: center;
	}

	.st-terminy .st-cell:empty {
		display: none;
	}

	.st-terminy .st-cell::before {
		content: attr( data-label ) ": ";
		font-weight: 600;
		opacity: 0.7;
	}
}
