/*
 * HTS Rail widgets
 * Zentraler Zusatz zu UniPulse / Bootstrap.
 *
 * Nur Regeln, die Bootstrap/UniPulse nicht sinnvoll abdecken.
 * Keine API-, Helper- oder PHP-Logik.
 */

/* Shared */
.rail-board,
.rail-route-card {
  --rail-primary: var(--accent-color, #075fbd);
  --rail-deep: #123b66;
  --rail-yellow: #ffd200;
  --rail-line: rgba(20, 48, 76, .10);
  border-radius: 20px;
}

/* Departures */
.rail-board-head {
  padding: 14px 20px;
  background: linear-gradient(100deg, var(--rail-deep), #0b4e86);
  color: #fff;
}

.rail-board-subtitle {
  margin-top: 2px;
  font-size: .78rem;
  color: rgba(255, 255, 255, .72);
}

.rail-board-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 210, 0, .14);
  color: var(--rail-yellow);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.rail-board-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(255, 210, 0, .10);
}

.rail-board-list {
  padding: 0 18px;
}

.rail-board-row {
  display: grid;
  grid-template-columns: 76px minmax(180px, 1fr) 140px 145px;
  gap: 16px;
  align-items: center;
  min-height: 72px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--rail-line);
}

.rail-board-row:last-child {
  border-bottom: 0;
}

.rail-board-row:hover {
  background: rgba(7, 95, 189, .035);
}

.rail-board-time {
  color: var(--rail-primary);
  font-size: 1.22rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.rail-board-operator {
  margin-top: 3px;
  font-size: .81rem;
}

.rail-board-status-pill {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e9f3fd;
  color: #2269a8;
  font-size: .76rem;
  font-weight: 700;
  white-space: nowrap;
}

.rail-board-status-pill.delayed {
  background: #fff3d9;
  color: #9a6500;
}

.rail-board-status-pill.cancelled {
  background: #fdebed;
  color: #b53a48;
}

.rail-board-status-pill.early {
  background: #e8f7ef;
  color: #188151;
}

.rail-board-meta {
  font-size: .78rem !important;
}

/* Route overview */
.rail-route-top {
  padding: 24px 26px;
  background: linear-gradient(135deg, #173b5f, #235f91);
  color: #fff;
}

.rail-route-kicker {
  font-size: .76rem;
  letter-spacing: .12em;
  opacity: .72;
}

.rail-route-title {
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  line-height: 1.15;
}

.rail-route-arrow {
  opacity: .72;
}

.rail-route-stations {
  font-size: .95rem;
  opacity: .92;
}

.rail-route-crs {
  background: rgba(255, 255, 255, .14);
  color: #fff;
}

.rail-route-fact {
  padding: 18px 20px;
  border-right: 1px solid var(--rail-line);
}

.rail-route-fact:last-child {
  border-right: 0;
}

.rail-route-fact strong {
  display: block;
  margin-top: 3px;
  color: #173b5f;
  font-size: .98rem;
}

.rail-route-note {
  background: var(--bs-tertiary-bg, #f5f7f9);
}

/* Mobile */
@media (max-width: 767.98px) {
  .rail-board-head {
    padding: 13px 15px;
  }

  .rail-board-list {
    padding: 0 12px;
  }

  .rail-board-row {
    grid-template-columns: 62px 1fr;
    gap: 7px 11px;
    min-height: 0;
    padding: 13px 3px;
  }

  .rail-board-status,
  .rail-board-platform {
    grid-column: 2;
  }

  .rail-board-meta {
    text-align: center !important;
  }

  .rail-route-top {
    padding: 20px;
  }

  .rail-route-fact {
    border-right: 0;
    border-bottom: 1px solid var(--rail-line);
  }

  .rail-route-fact:last-child {
    border-bottom: 0;
  }
}


.rail-board-time {
    color: var(--bs-body-color);
    font-size: 1.22rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}