/*
 * Training Info Desk – Website
 *
 * Idee: ein Trainings-Fahrplan. Uhrzeiten sind das Wichtigste und stehen groß in Tabellenziffern links,
 * jede Sportart hat ihre Farbe wie eine Linie im Netzplan. Alles andere bleibt ruhig:
 * Schrift vom Theme, Vereinsblau für Zeiten und Links, Orange nur für Hinweise.
 */

.tid {
	--tid-accent: #004d81;
	--tid-accent-2: #dd8f1a;
	--tid-radius: 12px;
	--tid-color: var(--tid-accent);
	--tid-on: #fff;
	--tid-color-ink: var(--tid-accent);
	--tid-color-soft: color-mix(in srgb, var(--tid-color) 10%, #fff);
	--tid-ink: #15232f;
	--tid-muted: #5b6875;
	--tid-line: #dde4ea;
	--tid-tint: #f3f6f9;
	--tid-rainbow: none;
	color: var(--tid-ink);
	margin: 0 0 2.5em;
	line-height: 1.55;
	font-variant-numeric: tabular-nums;
}
.tid *, .tid *::before, .tid *::after { box-sizing: border-box; }
.tid .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tid .tid-empty { color: var(--tid-muted); }
.tid .tid-muted { color: var(--tid-muted); }
.tid-icon, .tid-ui-icon { flex: none; }

.tid .tid-h {
	margin: 2.4em 0 .9em; font-size: 1.45em; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; color: var(--tid-ink);
}
.tid > .tid-h:first-child { margin-top: 0; }

/* Hinweis-Etikett („Neue Uhrzeit!“) */
.tid .tid-tag {
	display: inline-flex; align-items: center; flex: none; padding: .25em .7em;
	font-size: .78rem; font-weight: 600; line-height: 1.3; border-radius: 999px;
	color: var(--tid-muted); background: var(--tid-tint);
}
.tid .tid-tag--new { color: #fff; background: var(--tid-accent-2); }

/* Sport-Symbol: weiß auf der Farbe des Trainings */
.tid-sport {
	display: inline-flex; align-items: center; justify-content: center; flex: none;
	width: 44px; height: 44px; border-radius: 11px; background: var(--tid-color); color: var(--tid-on);
}
.tid-sport .tid-icon { width: 26px; height: 26px; stroke-width: 1.9; }
.tid-sport--img { background: #fff; box-shadow: inset 0 0 0 1px var(--tid-line); }
.tid-sport--img img { width: 36px; height: 36px; object-fit: contain; }

/* =========================================================================
 * Übersicht (Fahrplan)
 * ========================================================================= */
.tid-day { margin: 0 0 2.2em; }
.tid-day-head {
	display: flex; align-items: baseline; gap: .75em; padding: 0 0 .5em;
	border-bottom: 2px solid var(--tid-ink);
}
.tid .tid-day-name { margin: 0; font-size: 1.5em; font-weight: 700; line-height: 1.2; letter-spacing: -.015em; color: var(--tid-ink); }
.tid-today { padding: .15em .6em; border-radius: 999px; background: var(--tid-accent-2); color: #fff; font-size: .78rem; font-weight: 600; }
.tid-day-count { margin-left: auto; font-size: .9em; color: var(--tid-muted); }

.tid-rows { list-style: none; margin: 0; padding: 0; }
.tid-rows > li { margin: 0; padding: 0; border-bottom: 1px solid var(--tid-line); }
.tid .tid-row {
	display: grid; grid-template-columns: 5.6em 44px minmax(0, 1fr) auto 20px; align-items: center; gap: 0 1.1em;
	padding: 14px 10px 14px 4px; color: inherit; text-decoration: none;
	border-radius: 10px; transition: background-color .15s ease;
}
.tid div.tid-row { grid-template-columns: 5.6em 44px minmax(0, 1fr) auto; }
.tid a.tid-row:hover { background: var(--tid-tint); }
.tid a.tid-row:focus-visible { outline: 2px solid var(--tid-accent); outline-offset: 2px; }
.tid-row-time { display: flex; flex-direction: column; line-height: 1.15; }
.tid-row-start { font-size: 1.55em; font-weight: 700; letter-spacing: -.02em; color: var(--tid-accent); }
.tid-row-end { font-size: .82em; color: var(--tid-muted); white-space: nowrap; }
.tid-row-main { display: flex; flex-direction: column; min-width: 0; }
.tid-row-title { font-size: 1.08em; font-weight: 600; line-height: 1.3; }
.tid a.tid-row:hover .tid-row-title { color: var(--tid-accent); }
.tid-row-meta { font-size: .9em; color: var(--tid-muted); line-height: 1.4; }
.tid-row-go { grid-column: 5; color: var(--tid-muted); transition: transform .15s ease; }
.tid-row > .tid-tag { grid-column: 4; }
.tid a.tid-row:hover .tid-row-go { transform: translateX(3px); color: var(--tid-accent); }

/* Variante: Kacheln nebeneinander */
.tid-overview--tiles .tid-rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; padding-top: 14px; }
.tid-overview--tiles .tid-rows > li { border: 0; }
.tid-overview--tiles .tid .tid-row,
.tid.tid-overview--tiles .tid-row {
	height: 100%; grid-template-columns: 44px minmax(0, 1fr); grid-template-areas: "sport time" "main main" "tag tag";
	align-items: start; gap: 12px; padding: 16px; border: 1px solid var(--tid-line); border-radius: var(--tid-radius);
}
.tid-overview--tiles .tid-row-time { grid-area: time; align-self: center; }
.tid-overview--tiles .tid-sport { grid-area: sport; }
.tid-overview--tiles .tid-row-main { grid-area: main; }
.tid-overview--tiles .tid-tag { grid-area: tag; justify-self: start; }
.tid-overview--tiles .tid-row-go { display: none; }

/* =========================================================================
 * Seite eines Sportangebots
 * ========================================================================= */

/* Kopfbereich in der Farbe der Sportart (abgedunkelt, damit weiße Schrift gut lesbar ist) */
.tid-hero {
	position: relative; overflow: hidden; isolation: isolate;
	display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2em;
	margin: 0 0 2.4em; padding: clamp(24px, 4vw, 44px) clamp(22px, 4vw, 48px);
	border-radius: calc(var(--tid-radius) + 8px);
	background:
		radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--tid-color) 72%, #fff) 0%, transparent 60%),
		var(--tid-color);
	color: var(--tid-on);
}
.tid-hero::after {
	content: ""; position: absolute; inset: auto -10% -60% auto; width: 60%; aspect-ratio: 1; z-index: -1;
	border-radius: 50%; border: 2px solid color-mix(in srgb, currentColor 12%, transparent);
	box-shadow: 0 0 0 40px color-mix(in srgb, currentColor 4%, transparent), 0 0 0 80px color-mix(in srgb, currentColor 3%, transparent);
}
.tid-hero-main { min-width: 0; }
.tid .tid-hero p { margin: 0; }
.tid-hero-kicker { display: flex; align-items: center; gap: .6em; font-size: .95em; font-weight: 600; color: color-mix(in srgb, currentColor 82%, transparent); }
.tid-hero-rel { padding: .15em .65em; border-radius: 999px; background: var(--tid-on); color: var(--tid-color); font-size: .82em; }
.tid .tid-hero-date { margin-top: .3em; font-size: clamp(1.6em, 3.4vw, 2.5em); font-weight: 700; line-height: 1.12; letter-spacing: -.02em; }
.tid-hero-date time { display: block; }
.tid-hero-time { display: block; color: color-mix(in srgb, currentColor 88%, transparent); font-weight: 600; font-size: .72em; margin-top: .15em; }
.tid .tid-hero-where { margin-top: .5em; font-size: 1.02em; color: color-mix(in srgb, currentColor 85%, transparent); }

.tid .tid-hero-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 1.6em 0 0; padding: 0; }
.tid-hero-chips li {
	margin: 0; padding: .45em .9em; border-radius: 999px;
	background: color-mix(in srgb, currentColor 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 20%, transparent);
	font-size: .92em; line-height: 1.3; white-space: nowrap;
}
.tid-hero-chips strong { font-weight: 700; margin-right: .25em; }
.tid-hero-chip-note { opacity: .75; margin-left: .3em; }

.tid .tid-hero-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 1.3em 0 0; padding: 1.1em 0 0; border-top: 1px solid color-mix(in srgb, currentColor 22%, transparent); }
.tid .tid-hero-facts dt { margin: 0; font-size: .82em; font-weight: 400; color: color-mix(in srgb, currentColor 72%, transparent); }
.tid .tid-hero-facts dd { margin: 0; font-weight: 600; }
.tid .tid-hero-facts--plain { margin: 0 0 2em; padding: 16px 20px; border: 0; border-radius: var(--tid-radius); background: var(--tid-tint); }
.tid .tid-hero-facts--plain dt { color: var(--tid-muted); }

.tid-hero-art { color: var(--tid-art, currentColor); opacity: .9; line-height: 0; transform: rotate(-8deg); }
.tid-hero-art .tid-icon { width: clamp(120px, 16vw, 210px); height: auto; stroke-width: 1.15; }

/* Beschreibung und Hinweis */
.tid-about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 340px); gap: 2.5em; align-items: start; margin: 0 0 1em; }
.tid-about-text { font-size: 1.1em; line-height: 1.7; }
.tid-about-text > :first-child { margin-top: 0; }
.tid-about-text > :last-child { margin-bottom: 0; }
.tid-about > :only-child { grid-column: 1 / -1; }
.tid .tid-hint {
	display: flex; gap: .8em; align-items: flex-start; margin: 0; padding: 16px 18px; border-radius: var(--tid-radius);
	background: color-mix(in srgb, var(--tid-accent-2) 12%, #fff); color: var(--tid-ink); font-weight: 500;
}
.tid-hint .tid-ui-icon { flex: none; width: 22px; height: 22px; color: var(--tid-accent-2); margin-top: .1em; }
.tid-hint p { margin: 0; }
.tid-hint p + p { margin-top: .5em; }

/* Trainingsgruppen als Karten */
.tid-groups { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.tid-groups.is-multi { grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); }
.tid-group {
	display: flex; flex-direction: column; overflow: hidden;
	border-radius: calc(var(--tid-radius) + 4px); background: #fff;
	box-shadow: 0 0 0 1px var(--tid-line), 0 12px 32px -18px rgba(15, 35, 55, .28);
}
.tid-group-head { padding: 22px 24px 18px; background: var(--tid-color-soft); border-bottom: 3px solid var(--tid-color); }
.tid-group-top { display: flex; align-items: center; gap: .6em; flex-wrap: wrap; }
.tid .tid-group-name { margin: 0; font-size: 1.5em; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; color: var(--tid-color-ink); }
.tid .tid-group-when { margin: .35em 0 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: .1em .6em; }
.tid-group-day { font-size: 1.05em; font-weight: 600; color: var(--tid-ink); }
.tid-group-time { font-size: 2em; font-weight: 700; line-height: 1.1; letter-spacing: -.025em; color: var(--tid-ink); white-space: nowrap; }
.tid-group-dash { margin: 0 .06em; font-weight: 400; color: var(--tid-muted); }
.tid .tid-group-rhythm { margin: .2em 0 0; font-size: .92em; color: var(--tid-muted); }

.tid-group-extra { padding: 18px 24px 4px; display: flex; flex-direction: column; gap: 12px; }
.tid .tid-group-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.tid-group-facts > div { display: flex; align-items: baseline; gap: .4em; padding: .35em .8em; border-radius: 999px; background: var(--tid-color-soft); line-height: 1.3; }
.tid .tid-group-facts dt { margin: 0; font-size: .85em; font-weight: 400; color: var(--tid-muted); }
.tid .tid-group-facts dd { margin: 0; font-size: .92em; font-weight: 600; color: var(--tid-ink); }
.tid-group-hint { display: flex; gap: .6em; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: color-mix(in srgb, var(--tid-accent-2) 12%, #fff); font-weight: 500; }
.tid-group-hint .tid-ui-icon { flex: none; width: 20px; height: 20px; color: var(--tid-accent-2); margin-top: .1em; }
.tid-group-hint p { margin: 0; }
.tid-group-hint p + p { margin-top: .4em; }
.tid .tid-facts-list { list-style: none; margin: 0; padding: 8px 24px 6px; flex: 1 1 auto; }
.tid-facts-list li { display: flex; gap: 14px; margin: 0; padding: 14px 0; border-top: 1px solid var(--tid-line); }
.tid-facts-list li:first-child { border-top: 0; }
.tid-fi {
	display: inline-flex; align-items: center; justify-content: center; flex: none; width: 36px; height: 36px; border-radius: 10px;
	background: var(--tid-color-soft); color: var(--tid-color-ink);
}
.tid-fi .tid-ui-icon { width: 19px; height: 19px; }
.tid-facts-list li > div { min-width: 0; padding-top: 1px; }
.tid-fl { display: block; font-size: .82em; color: var(--tid-muted); margin-bottom: .1em; }
.tid-facts-list p { margin: 0; }
.tid-facts-list p + p { margin-top: .35em; }
.tid-facts-list strong { font-weight: 600; }
.tid-fnote { display: block; margin-top: .35em; font-size: .9em; color: var(--tid-muted); }
.tid .tid-facts-list a, .tid .tid-map-links a { color: var(--tid-accent); }

.tid-group-map { padding: 0 24px 22px; }
.tid-group-map .tid-map { margin: 4px 0 0; }

/* Karte */
.tid-map { margin: 1.1em 0 0; height: 200px; overflow: hidden; border-radius: var(--tid-radius); background: var(--tid-tint); }
.tid-map iframe { display: block; width: 100%; height: 100%; border: 0; }
.tid-map-placeholder { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6em; padding: 1em; text-align: center; color: var(--tid-muted);
	background-image: radial-gradient(color-mix(in srgb, var(--tid-accent) 14%, transparent) 1px, transparent 1.3px); background-size: 14px 14px; }
.tid-map-placeholder .tid-ui-icon { width: 24px; height: 24px; }
.tid-map-placeholder small { max-width: 30em; font-size: .78em; line-height: 1.4; }
.tid .tid-map-load { cursor: pointer; padding: .6em 1.2em; border: 0; border-radius: 999px; background: var(--tid-accent); color: #fff; font: inherit; font-size: .92em; font-weight: 600; line-height: 1.2; }
.tid .tid-map-load:hover { background: color-mix(in srgb, var(--tid-accent) 85%, #000); }
.tid .tid-map-load:focus-visible { outline: 2px solid var(--tid-accent); outline-offset: 3px; }
.tid .tid-map-links { margin: .6em 0 0; font-size: .88em; display: flex; align-items: center; gap: .4em; flex-wrap: wrap; color: var(--tid-muted); }

/* =========================================================================
 * Nächste Trainings: Datums-Kacheln
 * ========================================================================= */
.tid-dates { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.tid .tid-date { margin: 0; padding: 0; }
.tid .tid-date-in {
	display: flex; flex-direction: column; gap: .15em; height: 100%;
	padding: 12px 14px 13px; border: 1px solid var(--tid-line); border-top: 3px solid var(--tid-color); border-radius: 10px;
	color: inherit; text-decoration: none; background: #fff;
}
.tid a.tid-date-in:hover { background: var(--tid-tint); }
.tid a.tid-date-in:focus-visible { outline: 2px solid var(--tid-accent); outline-offset: 2px; }
.tid-date-when { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "wd wd" "day mon"; align-items: baseline; column-gap: .35em; }
.tid-date-wd { grid-area: wd; font-size: .85em; font-weight: 600; color: var(--tid-muted); }
.tid-date-day { grid-area: day; font-size: 1.9em; font-weight: 700; line-height: 1.05; letter-spacing: -.02em; }
.tid-date-mon { grid-area: mon; font-size: .9em; color: var(--tid-muted); }
.tid-date-time { font-size: .9em; }
.tid-date-title { font-size: .85em; font-weight: 600; color: var(--tid-color-ink); line-height: 1.3; }
.tid-date-venue { font-size: .8em; color: var(--tid-muted); line-height: 1.3; }
.tid-date-skip { font-size: .8em; font-weight: 600; color: #b42318; line-height: 1.3; }
.tid .tid-date.is-skipped .tid-date-in { border-style: dashed; border-top-width: 1px; border-top-color: var(--tid-line); background: var(--tid-tint); }
.tid-date.is-skipped .tid-date-day, .tid-date.is-skipped .tid-date-time { text-decoration: line-through; color: var(--tid-muted); }

/* Waagerechte Leiste auf der Seite eines Sportangebots */
.tid-next--strip .tid-dates {
	display: flex; gap: 10px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
	padding: 2px 2px 12px; scrollbar-width: thin;
}
.tid-next--strip .tid-date { flex: 0 0 132px; scroll-snap-align: start; }
.tid-date-rel { align-self: flex-start; margin-bottom: .2em; padding: .05em .55em; border-radius: 999px; background: var(--tid-accent-2); color: #fff; font-size: .75em; font-weight: 600; }

.tid-missing { padding: .5em .8em; border: 1px dashed #b42318; color: #b42318; }

/* =========================================================================
 * Schmale Bildschirme
 * ========================================================================= */
@media (max-width: 720px) {
	.tid .tid-row { grid-template-columns: 4.9em 38px minmax(0, 1fr) 16px; gap: .3em .7em; padding: 12px 4px 12px 0; }
	.tid div.tid-row { grid-template-columns: 4.9em 38px minmax(0, 1fr); }
	.tid-row-end { font-size: .72em; }
	.tid-row .tid-tag { grid-column: 3; grid-row: 2; justify-self: start; }
	.tid-row-go { grid-column: 4; grid-row: 1; }
	.tid-row-start { font-size: 1.3em; }
	.tid-sport { width: 38px; height: 38px; border-radius: 10px; }
	.tid-sport .tid-icon { width: 22px; height: 22px; }
	.tid.tid-overview--tiles .tid-row { grid-template-columns: 38px minmax(0, 1fr); }
	.tid-hero { grid-template-columns: minmax(0, 1fr); }
	.tid-hero-art { position: absolute; right: -18px; top: 14px; opacity: .22; }
	.tid-hero-art .tid-icon { width: 140px; }
	.tid-about { grid-template-columns: 1fr; gap: 1.4em; }
	.tid-group-head { padding: 18px 18px 14px; }
	.tid .tid-facts-list { padding: 4px 18px; }
	.tid-group-extra { padding: 16px 18px 2px; }
	.tid-group-map { padding: 0 18px 18px; }
	.tid-group-time { font-size: 1.7em; }
	.tid .tid-group-name { font-size: 1.3em; }
	.tid-map { height: 180px; }
}

@media (prefers-reduced-motion: reduce) {
	.tid .tid-row, .tid-row-go { transition: none; }
	.tid a.tid-row:hover .tid-row-go { transform: none; }
}
