/* site.css — Bausteine nur dieser Site (lädt nach gestaltung.css). Nur Farbvariablen.
 * Flusskarte (partials/_fluss.php): der Fluss als Achse, die Fahrten als Strecken darunter.
 * Breit waagerecht (Norden links), unter 700 px senkrecht (Norden oben). */

.tc-fluss { background: var(--c-muted); color: var(--c-ink); border-top: 1px solid var(--c-border); border-bottom: 1px solid var(--c-border); }
.tc-fluss .mst-section__title { color: var(--c-ink); }
.tc-fluss .mst-section__sub { color: var(--c-ink-soft); max-width: 62ch; }

.tc-fluss__karte { margin-top: var(--s-5); position: relative; }
/* Hilfslinien von jedem Ort durch die Strecken, damit man Anleger und Orte zusammen liest */
.tc-fluss__raster { position: absolute; left: 0; right: 0; top: 60px; bottom: 0; pointer-events: none; }
.tc-fluss__raster i { position: absolute; top: 0; bottom: 0; left: calc(var(--p) * 1%); border-left: 1px dashed rgb(var(--c-primary-rgb) / .2); }
.tc-fluss__linien, .tc-fluss__achse { position: relative; z-index: 1; }

/* Achse: Wasser als Band, Orte darüber und darunter im Wechsel */
.tc-fluss__achse { position: relative; height: 120px; }
.tc-fluss__wasser {
    position: absolute; left: 0; right: 0; top: 50%; height: 22px; transform: translateY(-50%);
    border-radius: 11px;
    background:
        repeating-linear-gradient(100deg, transparent 0 46px, rgba(255,255,255,.16) 46px 48px, transparent 48px 96px),
        linear-gradient(90deg, rgb(var(--c-primary-rgb) / .7), var(--c-primary) 50%, rgb(var(--c-primary-rgb) / .7));
}
.tc-fluss__orte { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; }
.tc-fluss__ort {
    position: absolute; left: calc(var(--p) * 1%); top: 0; height: 50%;
    display: flex; flex-direction: column; justify-content: flex-start; align-items: center;
    transform: translateX(-50%);
}
.tc-fluss__ort::after { content: ""; width: 1px; flex: 1; background: rgb(var(--c-primary-rgb) / .45); margin-top: 6px; }
.tc-fluss__ort span { font-size: .82rem; line-height: 1.2; white-space: nowrap; color: var(--c-ink); }
.tc-fluss__ort--unten { top: 50%; flex-direction: column-reverse; }
.tc-fluss__ort--unten::after { margin-top: 0; margin-bottom: 6px; }

/* Strecken */
.tc-fluss__linien { list-style: none; margin: var(--s-3) 0 0; padding: 0; display: grid; gap: var(--s-3); }
.tc-fluss__linie { position: relative; }
.tc-fluss__strecke {
    position: relative; display: block; height: 40px;
    margin-left: calc(var(--von) * 1%); width: calc((var(--bis) - var(--von)) * 1%);
    border-radius: 20px; background: #fff; border: 1px solid rgb(var(--c-primary-rgb) / .5);
    color: var(--c-ink); text-decoration: none;
}
.tc-fluss__strecke:hover, .tc-fluss__strecke:focus-visible { background: var(--c-primary-soft); border-color: var(--c-primary); }
.tc-fluss__strecke:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 3px; }
.tc-fluss__name {
    position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
    font-weight: 700; font-size: .95rem; white-space: nowrap;
}
/* Punkte relativ zur Strecke: (p - von) / (bis - von) */
.tc-fluss__halt, .tc-fluss__schnelle, .tc-fluss__ziel {
    position: absolute; top: 50%;
    left: calc((var(--p) - var(--von)) / (var(--bis) - var(--von)) * 100%);
    transform: translate(-50%, -50%);
}
.tc-fluss__halt { width: 12px; height: 12px; border-radius: 50%; background: var(--c-primary); box-shadow: 0 0 0 3px #fff; }
.tc-fluss__ziel { width: 12px; height: 12px; background: var(--c-primary); box-shadow: 0 0 0 3px #fff; }
.tc-fluss__schnelle {
    width: 22px; height: 12px;
    background: repeating-linear-gradient(135deg, var(--c-primary) 0 3px, transparent 3px 6px);
}
.tc-fluss__notiz {
    margin: 6px 0 0 calc(var(--von) * 1%); padding-left: 18px; max-width: 60ch;
    font-size: .85rem; color: var(--c-ink-soft);
}
.tc-fluss__linie--pause .tc-fluss__strecke { border-style: dashed; background: transparent; }
.tc-fluss__legende { display: none; }
.tc-fluss__hinweis { margin: var(--s-4) 0 0; font-size: .8rem; color: var(--c-ink-soft); }

/* Nur Anleger bekannt: Punkt mit Namen statt Strecke */
.tc-fluss__linie--punkt .tc-fluss__strecke {
    width: auto; display: inline-flex; align-items: center; gap: 10px;
    margin-left: calc(var(--von) * 1% - 6px); padding: 0 18px 0 0; border-style: dashed;
}
.tc-fluss__linie--punkt .tc-fluss__strecke::before {
    content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--c-primary); box-shadow: 0 0 0 3px #fff;
}
.tc-fluss__linie--punkt .tc-fluss__name { position: static; transform: none; }
.tc-fluss__linie--punkt .tc-fluss__notiz { margin-left: calc(var(--von) * 1%); }
@media (min-width: 700px) {
    .tc-fluss__linie--punkt .tc-fluss__strecke { transform: translateX(-100%); margin-left: calc(var(--von) * 1% + 6px); flex-direction: row-reverse; padding: 0 0 0 18px; }
    .tc-fluss__linie--punkt .tc-fluss__notiz { margin-left: 0; text-align: right; max-width: calc(var(--von) * 1%); }
}

/* Mittlere Breite: Ortsnamen kleiner */
@media (max-width: 1100px) {
    .tc-fluss__ort span { font-size: .74rem; }
}

/* Schmal: Fluss senkrecht, Strecken als Spalten, Erklärung als Liste darunter */
@media (max-width: 699px) {
    .tc-fluss__karte { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-3); }
    .tc-fluss__achse { height: 640px; }
    .tc-fluss__wasser { left: 6px; right: auto; top: 0; bottom: 0; width: 16px; height: auto; transform: none; border-radius: 8px;
        background:
            repeating-linear-gradient(10deg, transparent 0 46px, rgba(255,255,255,.16) 46px 48px, transparent 48px 96px),
            linear-gradient(180deg, rgb(var(--c-primary-rgb) / .7), var(--c-primary) 50%, rgb(var(--c-primary-rgb) / .7)); }
    .tc-fluss__raster { display: none; }
    .tc-fluss__ort, .tc-fluss__ort--unten {
        top: calc(var(--p) * 1%); left: 0; height: auto; width: 100%;
        flex-direction: row; align-items: center; transform: translateY(-50%);
    }
    .tc-fluss__ort::after, .tc-fluss__ort--unten::after { display: none; }
    .tc-fluss__ort span, .tc-fluss__ort--unten span { order: 2; padding-left: 30px; white-space: nowrap; font-size: .78rem; }
    .tc-fluss__ort::before { content: ""; position: absolute; left: 8px; width: 18px; height: 1px; background: rgb(var(--c-primary-rgb) / .6); }
    .tc-fluss__linien { margin: 0; display: flex; gap: 4px; height: 640px; }
    .tc-fluss__linie { height: 100%; width: 25px; }
    .tc-fluss__strecke {
        position: absolute; left: 0; width: 25px; margin: 0;
        top: calc(var(--von) * 1%); height: calc((var(--bis) - var(--von)) * 1%);
    }
    .tc-fluss__name {
        left: 50%; top: 16px; transform: translateX(-50%); writing-mode: vertical-rl; font-size: .72rem;
    }
    .tc-fluss__halt, .tc-fluss__schnelle, .tc-fluss__ziel {
        left: 50%; top: calc((var(--p) - var(--von)) / (var(--bis) - var(--von)) * 100%);
    }
    .tc-fluss__schnelle { width: 12px; height: 22px; }
    .tc-fluss__linie--punkt .tc-fluss__strecke { height: 25px; width: 25px; padding: 0; justify-content: center; margin: 0; top: calc(var(--von) * 1% - 12px); border-radius: 50%; }
    .tc-fluss__linie--punkt .tc-fluss__strecke::before { box-shadow: none; }
    .tc-fluss__linie--punkt .tc-fluss__name { display: none; }
    .tc-fluss__notiz { display: none; }
    .tc-fluss__legende { display: block; margin: var(--s-4) 0 0; }
    .tc-fluss__legende dt { font-weight: 700; margin-top: var(--s-3); }
    .tc-fluss__legende dt a { color: var(--c-primary-dark); }
    .tc-fluss__legende dd { margin: 2px 0 0; font-size: .9rem; color: var(--c-ink-soft); }
}

@media (prefers-reduced-motion: no-preference) {
    .tc-fluss__strecke { transition: background-color .15s ease, border-color .15s ease; }
}

/* Startseite: „Vorher prüfen“ als eigener Abschnitt */
.tc-vorab .mst-klagen { margin-bottom: 0; }
@media (min-width: 900px) {
    .tc-vorab .mst-klagen__liste { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 56px; }
    .tc-vorab .mst-klagen__liste li { max-width: 62ch; }
}
.mst-product__body .mst-chip:empty { display: none; }
