/*
 * /assets/css/abfahrt.css
 * Gemeinsame Tabellen-Optik der Abfahrtsseiten (Niederlande + Europa).
 */

.ab-meldung { padding: 14px 16px; border-radius: 12px; font-size: 13px; }
.ab-meldung.fehler { background: rgba(220,38,38,.12); border: 1px solid rgba(220,38,38,.4); color: #fca5a5; }
.ab-meldung.warnung { background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.4); color: #fcd34d; }

/* ───────── Tabelle ───────── */
.ab-tabelle { width: 100%; border-collapse: collapse; font-size: 13px; }
.ab-tabelle th { padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,.1); text-align: left; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .6; white-space: nowrap; }
.ab-tabelle td { padding: 10px; border-bottom: 1px solid rgba(255,255,255,.06); vertical-align: top; text-align: left; }
.ab-tabelle tr:last-child td { border-bottom: 0; }
.ab-tabelle tbody tr:hover td { background: rgba(99,102,241,.12); }
.ab-tabelle tr.ab-reihe { cursor: pointer; }
.ab-tabelle tr.ab-zeile-aus td { background: rgba(220,38,38,.1); }
.ab-tabelle tr.ab-zeile-aus:hover td { background: rgba(220,38,38,.18); }

/* Zeit- und Gleisspalte: so schmal wie nötig */
.ab-tabelle td.ab-zeit-zelle, .ab-tabelle td.ab-gleis-zelle { white-space: nowrap; width: 1%; }
.ab-tabelle td.ab-fahrt-zelle { min-width: 150px; }

/* Zielspalte nimmt den Rest ein. Inhalt (z. B. lange Fahrzeugreihen) scrollt INNERHALB der Zelle,
   statt die Fahrt-Spalte aus dem Bild zu drücken. */
.ab-tabelle td.ab-ziel-zelle { width: 100%; max-width: 0; }

.ab-mitte { text-align: center !important; opacity: .6; padding: 30px 10px !important; }

/* ───────── Badges ───────── */
.ab-badge { display: inline-block; border-radius: 6px; padding: 2px 8px; font-size: 11px; font-weight: 700; color: #fff; line-height: 1.5; }
.ab-badge.ok { background: #16a34a; } .ab-badge.warn { background: #d97706; } .ab-badge.spaet { background: #e53e3e; }
.ab-badge.blau { background: #4f46e5; } .ab-badge.grau { background: #64748b; }
.ab-badge.klein { font-size: 9px; margin-top: 2px; }
.ab-badge.durch { text-decoration: line-through; opacity: .8; }

/* ───────── Texte ───────── */
.ab-ziel { font-weight: 700; }
.ab-ziel-link { color: inherit; text-decoration: none; }
.ab-ziel-link:hover { text-decoration: underline; }
.ab-fahrt-link { color: inherit; text-decoration: none; font-weight: 700; }
.ab-via { display: none; font-size: 11px; opacity: .6; margin-top: 2px; }
.ab-leise { opacity: .6; }
.ab-rot { color: #f87171; } .ab-gelb { color: #fbbf24; } .ab-gruen { color: #4ade80; } .ab-fett { font-weight: 700; }
.ab-durch { text-decoration: line-through; opacity: .5; }
.ab-modus { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; opacity: .6; }
.ab-betreiber { font-size: 11px; opacity: .6; margin-top: 2px; }

/* ───────── Hinweise (Gleisänderung, Zugteilung …) ───────── */
.ab-hinweis { margin-top: 6px; padding: 4px 10px; border-radius: 8px; font-size: 11px; font-weight: 700; }
.ab-hinweis.gelb { background: rgba(245,158,11,.15); border: 1px solid rgba(245,158,11,.4); color: #fcd34d; }
.ab-hinweis.rot { background: rgba(220,38,38,.15); border: 1px solid rgba(220,38,38,.4); color: #fca5a5; }

/* ───────── Fahrzeuge (nur Niederlande) ───────── */
.ab-fz-scroll { max-width: 100%; overflow-x: auto; overflow-y: visible; white-space: nowrap; padding-bottom: 4px; scrollbar-width: thin; }
.ab-fz-reihe { display: inline-flex; align-items: flex-end; }
.ab-fz { display: inline-flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.ab-fz-nr { font-size: 10px; font-weight: 700; background: rgba(255,255,255,.1); border-radius: 4px; padding: 1px 6px; margin-top: 2px; white-space: nowrap; }
.ab-abstand { margin-top: 4px; font-size: 13px; opacity: .85; }

/* ───────── Schaltflächen ───────── */
.ab-btn { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 8px; border: 0; background: linear-gradient(135deg, #15803d, #16a34a); color: #fff; font: inherit; font-size: 11px; font-weight: 750; cursor: pointer; white-space: nowrap; }
.ab-btn:hover { filter: brightness(1.1); }
.ab-btn.gesperrt, .ab-btn.gesperrt:disabled { background: #dc2626 !important; opacity: 1; cursor: not-allowed; filter: none; }
.ab-checkin { margin-top: 6px; }

@media (max-width: 767px) {
    .ab-tabelle { min-width: 560px; }
}