/* Fixe Takvimi-Leiste am unteren Bildschirmrand. */
.tk-bar {
	position: fixed;
	left: 0; right: 0; bottom: 0;
	z-index: 9999;
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 18px;
	padding: 10px clamp(12px, 3vw, 28px);
	padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
	background: rgba(8, 12, 18, 0.92);
	color: #fff;
	text-decoration: none;
	font-family: "Inter", "Poppins", -apple-system, system-ui, sans-serif;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	font-variant-numeric: tabular-nums;
}

.tk-bar-clock {
	font-size: 1.05rem;
	font-weight: 600;
	letter-spacing: 0.5px;
	color: #ffd482;
	min-width: 56px;
}

.tk-bar-list {
	display: flex;
	flex-wrap: nowrap;
	gap: 14px;
	overflow-x: auto;
	scrollbar-width: none;
}
.tk-bar-list::-webkit-scrollbar { display: none; }

.tk-bar-item {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	min-width: 56px;
	padding: 4px 10px;
	border-radius: 10px;
	border: 1px solid transparent;
	transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.tk-bar-name {
	font-size: 0.62rem;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.55);
	font-weight: 600;
}
.tk-bar-time {
	font-size: 1rem;
	font-weight: 500;
	margin-top: 2px;
}

.tk-bar-start {
	font-size: 0.68rem;
	color: rgba(255, 255, 255, 0.45);
	font-weight: 400;
	margin-top: 1px;
	font-variant-numeric: tabular-nums;
}
.tk-bar-start[hidden] { display: none; }
.tk-bar-item.is-current .tk-bar-start { color: rgba(255, 212, 130, 0.75); }

.tk-bar-item.is-current {
	background: rgba(255, 212, 130, 0.15);
	border-color: rgba(255, 212, 130, 0.4);
}
.tk-bar-item.is-current .tk-bar-name,
.tk-bar-item.is-current .tk-bar-time {
	color: #ffd482;
}
.tk-bar-item.is-next {
	border-color: rgba(255, 212, 130, 0.25);
}

.tk-bar-countdown {
	font-size: 0.85rem;
	color: #ffd482;
	font-weight: 500;
	min-width: 64px;
	text-align: right;
}

.tk-bar-loading .tk-bar-time,
.tk-bar-loading .tk-bar-clock { opacity: 0.45; }

/* Platz unten lassen, damit Footer/Inhalt nicht verdeckt wird */
body { padding-bottom: 84px; }
@supports (padding: max(0px)) {
	body { padding-bottom: max(84px, calc(72px + env(safe-area-inset-bottom, 0px))); }
}

@media (max-width: 720px) {
	.tk-bar {
		grid-template-columns: 1fr;
		gap: 6px;
		padding: 8px 10px;
		padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
	}
	.tk-bar-clock { display: none; }
	.tk-bar-countdown {
		text-align: center;
		font-size: 0.72rem;
		min-width: 0;
	}
	.tk-bar-list { justify-content: space-between; gap: 4px; }
	.tk-bar-item { min-width: 0; flex: 1; padding: 2px 4px; }
	.tk-bar-name { font-size: 0.55rem; letter-spacing: 0.8px; }
	.tk-bar-time { font-size: 0.85rem; }
	.tk-bar-start { font-size: 0.6rem; }
	body { padding-bottom: 76px; }
	@supports (padding: max(0px)) {
		body { padding-bottom: max(76px, calc(64px + env(safe-area-inset-bottom, 0px))); }
	}
}
