/* ── Line color badges ───────────────────────────────────────── */
.line-badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 12px;
    font-size: var(--fs-xs);
    font-weight: 600;
    white-space: nowrap;
    margin: 2px 3px 2px 0;
    letter-spacing: 0.2px;
}

.line-badge-lg {
    padding: 4px 14px;
    font-size: var(--fs-sm);
    border-radius: 16px;
}

/* ── Station header ──────────────────────────────────────────── */
#station-header {
    margin-bottom: 10px;
}

.station-title-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 6px;
}

.station-title {
    font-size: var(--fs-lg);
    font-weight: 700;
    margin: 0;
    color: var(--c-text);
}

.map-link {
    font-size: var(--fs-xs);
    color: var(--c-primary-dk);
    text-decoration: none;
}

.map-link:hover { text-decoration: underline; }

.station-lines {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

/* ── Line group header rows inside liveboard table ───────────── */
tr.line-group-header td {
    background-color: var(--c-primary-lt);
    padding: 6px 14px;
    border-top: 2px solid var(--c-primary);
}

tr.line-group-header.first-group td {
    border-top: none;
}

/* ── Table cells ─────────────────────────────────────────────── */
.dest-cell {
    font-weight: 500;
}

.status-cell {
    text-align: center;
}

.status-dash {
    color: var(--c-muted);
}

.at-platform-badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 10px;
    background: var(--c-primary);
    color: #fff;
    font-size: var(--fs-2xs);
    font-weight: 600;
    white-space: nowrap;
    animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.6; }
}

.time-cell {
    font-variant-numeric: tabular-nums;
    color: var(--c-muted);
    font-size: var(--fs-sm);
}

.time-passed {
    text-decoration: line-through;
    opacity: 0.45;
}

/* ── Page nav ────────────────────────────────────────────────── */
#page-nav {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 8px;
}

#back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border: 1.5px solid var(--c-border);
    border-radius: 20px;
    color: var(--c-muted);
    text-decoration: none;
    font-size: var(--fs-xs);
    font-weight: 500;
    transition: border-color 0.15s, color 0.15s;
}

#back-link:hover {
    border-color: var(--c-primary);
    color: var(--c-primary);
}

/* ── Footer (station page) ───────────────────────────────────── */
#footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--c-surface);
    border-top: 1px solid var(--c-border);
    padding: 8px 14px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
}

body:has(#footer) {
    padding-bottom: 68px;
}

.footerbtn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    padding: 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--c-bg);
    color: var(--c-text);
    border: 1.5px solid var(--c-border);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.footerbtn:hover {
    background: var(--c-primary-lt);
    border-color: var(--c-primary);
    color: var(--c-primary-dk);
}

/* ── Recent search chips (search page) ───────────────────────── */
#recent-searches {
    display: none;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.recent-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px 4px 12px;
    border: 1.5px solid var(--c-border);
    border-radius: 20px;
    background: var(--c-surface);
    font-size: var(--fs-sm);
    color: var(--c-text);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    white-space: nowrap;
}

.recent-chip:hover {
    border-color: var(--c-primary);
    background: var(--c-primary-lt);
}

.chip-del {
    background: none;
    border: none;
    padding: 0 2px;
    margin: 0;
    color: var(--c-muted);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    font-weight: 400;
    transform: none;
    transition: color 0.15s;
}

.chip-del:hover { color: #ef4444; }
