/* ============================================================
   Journey Alerts — Real Time Map styles
   Brand palette: purple #8472C4 · yellow #FFB800 · dark #1A1A1A
   ============================================================ */

:root {
    --ja-purple:      #8472C4;
    --ja-purple-dark: #6B5CAB;
    --ja-purple-light:#F3F0FB;
    --ja-yellow:      #FFB800;
    --ja-dark:        #1A1A1A;
    --ja-white:       #FFFFFF;
    --ja-border:      #E4E0F0;
    --header-h:       64px;
    --footer-h:       44px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Nunito', sans-serif;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--ja-dark);
}

/* ════════════════════════════════════════
   HEADER
   ════════════════════════════════════════ */
#app-header {
    height: var(--header-h);
    background: var(--ja-white);
    border-bottom: 2px solid var(--ja-border);
    box-shadow: 0 2px 12px rgba(132, 114, 196, 0.10);
    flex-shrink: 0;
    z-index: 100;
}

.header-inner {
    height: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-logo-link {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.header-logo {
    height: 44px;
    width: auto;
    display: block;
    filter: drop-shadow(0 1px 2px rgba(45, 27, 105, 0.12));
}

.header-divider {
    width: 1.5px;
    height: 32px;
    background: var(--ja-border);
    flex-shrink: 0;
}

.header-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--ja-purple);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.header-region-label {
    font-size: 11px;
    font-weight: 800;
    color: var(--ja-purple-dark);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.header-region-select {
    font-family: 'Nunito', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--ja-dark);
    background: var(--ja-white);
    border: 2px solid var(--ja-border);
    border-radius: 20px;
    padding: 6px 28px 6px 12px;
    cursor: pointer;
    max-width: min(240px, 38vw);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B5CAB' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.header-region-select:hover,
.header-region-select:focus {
    border-color: var(--ja-purple);
    outline: none;
}

.header-reset-btn {
    font-family: 'Nunito', sans-serif;
    font-size: 12px;
    font-weight: 800;
    color: var(--ja-dark);
    background: var(--ja-white);
    border: 2px solid var(--ja-border);
    border-radius: 20px;
    padding: 6px 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.18s, border-color 0.18s, color 0.18s;
}

.header-reset-btn:hover {
    background: var(--ja-purple-light);
    border-color: var(--ja-purple);
    color: var(--ja-purple-dark);
}

.header-back-link {
    font-size: 13px;
    font-weight: 700;
    color: var(--ja-purple);
    text-decoration: none;
    padding: 6px 14px;
    border: 2px solid var(--ja-border);
    border-radius: 20px;
    white-space: nowrap;
    transition: background 0.18s, border-color 0.18s, color 0.18s;
}

.header-back-link:hover {
    background: var(--ja-purple-light);
    border-color: var(--ja-purple);
}

/* ════════════════════════════════════════
   MAP AREA
   ════════════════════════════════════════ */
#map-wrapper {
    flex: 1;
    position: relative;
    overflow: hidden;
}

#container {
    position: absolute;
    inset: 0;
}

#container > * {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* ════════════════════════════════════════
   CONTROLS OVERLAY (top-right)
   ════════════════════════════════════════ */
#controls-panel {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 196px;
}

/* Show / hide completed journeys */
.completed-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1.5px solid var(--ja-border);
    border-radius: 12px;
    box-shadow: 0 3px 16px rgba(0, 0, 0, 0.13);
    cursor: pointer;
    user-select: none;
    font-family: 'Nunito', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--ja-dark);
}

.completed-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.completed-toggle-ui {
    position: relative;
    flex-shrink: 0;
    width: 36px;
    height: 20px;
    border-radius: 10px;
    background: #C8C4D4;
    transition: background 0.18s;
}

.completed-toggle-ui::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.18s;
}

.completed-toggle input:checked + .completed-toggle-ui {
    background: var(--ja-purple);
}

.completed-toggle input:checked + .completed-toggle-ui::after {
    transform: translateX(16px);
}

.completed-toggle input:focus-visible + .completed-toggle-ui {
    outline: 2px solid var(--ja-purple);
    outline-offset: 2px;
}

.completed-toggle-label {
    line-height: 1.25;
}

/* Legend card */
.legend-section {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: 0 3px 16px rgba(0, 0, 0, 0.13);
    border: 1.5px solid var(--ja-border);
}

.legend-title {
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    color: var(--ja-purple);
    margin-bottom: 9px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ja-dark);
    margin-bottom: 6px;
    line-height: 1.3;
}

.legend-item:last-child { margin-bottom: 0; }

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.20);
}

/* ════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════ */
#app-footer {
    height: var(--footer-h);
    background: var(--ja-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
    z-index: 100;
}

.footer-inner {
    height: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 0;
}

.footer-status {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
    margin-right: 20px;
}

.status-text {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
}

.footer-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.stat {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.65);
    white-space: nowrap;
}

.stat strong {
    color: var(--ja-yellow);
}

.stat-sep {
    color: rgba(255, 255, 255, 0.2);
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
    flex-shrink: 0;
}

.footer-time {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.75);
    font-variant-numeric: tabular-nums;
}

.footer-copy {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.25);
}

/* ════════════════════════════════════════
   CLICK TOOLTIP
   ════════════════════════════════════════ */
#custom-tooltip {
    display: none; /* toggled to flex by JS */
    position: fixed;
    z-index: 9999;
    width: 432px;
    max-height: 72vh;
    flex-direction: column;
    min-height: 0;
    background: #ffffff;
    border: 1.5px solid var(--ja-border);
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(132, 114, 196, 0.15);
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    color: var(--ja-dark);
    overflow: hidden;
    transition: opacity 0.15s ease;
    /* Screen-fixed panel — not anchored to the map marker */
}

#custom-tooltip.is-dragging {
    transition: none;
    user-select: none;
}

.tt-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 12px 12px 14px;
    flex-shrink: 0;
    cursor: grab;
    touch-action: none;
    /* background + border: inline style matches map column RGB (see tooltip.js) */
}

#custom-tooltip.is-dragging .tt-header-row {
    cursor: grabbing;
}

.tt-header-row .tt-header-actions,
.tt-header-row .tt-icon-btn {
    cursor: pointer;
    touch-action: auto;
}

/* Header title: time on the left, origin/destination stacked immediately to its right */
.tt-header-title-cluster {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 12px 14px;
}

.tt-header-time {
    font-weight: 900;
    font-size: 30px;
    line-height: 1;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    -webkit-font-smoothing: antialiased;
}

/* Fills space between time and header actions; copy is left-aligned in this band */
.tt-header-od {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1px;
    text-align: left;
}

.tt-header-origin-line,
.tt-header-dest-line {
    font-weight: 900;
    font-size: 15px;
    line-height: 1.2;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
    -webkit-font-smoothing: antialiased;
}

.tt-header-dest-line {
    font-size: 16px;
}

/* Dark header bar (e.g. yellow): near-black copy */
.tt-header-row--dark .tt-header-time,
.tt-header-row--dark .tt-header-origin-line,
.tt-header-row--dark .tt-header-dest-line {
    color: #0a0a0a;
    text-shadow: none;
}

/* Dark green / orange / grey column tint: white copy */
.tt-header-row--light .tt-header-time,
.tt-header-row--light .tt-header-origin-line,
.tt-header-row--light .tt-header-dest-line {
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.tt-header-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.tt-icon-btn {
    box-sizing: border-box;
    width: 32px;
    height: 32px;
    padding: 0;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, opacity 0.15s;
}

.tt-header-row--dark .tt-icon-btn {
    color: rgba(0, 0, 0, 0.52);
}
.tt-header-row--dark .tt-icon-btn:hover {
    color: rgba(0, 0, 0, 0.9);
    background: rgba(0, 0, 0, 0.06);
}

.tt-header-row--light .tt-icon-btn {
    color: rgba(255, 255, 255, 0.88);
}
.tt-header-row--light .tt-icon-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
}

.tt-centre-svg {
    display: block;
    flex-shrink: 0;
}

.tt-close {
    font-size: 18px;
    line-height: 1;
    font-weight: 600;
}

/* Fills space below header; only .tt-stop-list-scroll scrolls inside. */
.tt-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    padding: 12px 14px 14px;
}

.tt-trip-block {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.tt-stop-list-scroll {
    position: relative; /* offsetParent for row offsetTop calculations */
    flex: 1;
    min-height: 80px;
    max-height: min(38vh, 320px);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--ja-border) transparent;
    margin-right: -4px;
    padding-right: 4px;
}
.tt-stop-list-scroll::-webkit-scrollbar       { width: 5px; }
.tt-stop-list-scroll::-webkit-scrollbar-track { background: transparent; }
.tt-stop-list-scroll::-webkit-scrollbar-thumb { background: var(--ja-border); border-radius: 3px; }

.tt-stop-list {
    min-width: 0;
}

.tt-live-block {
    background: #f7f5fc;
    border: 1px solid var(--ja-border);
    border-radius: 8px;
    padding: 10px 12px 12px;
}

.tt-live-running {
    font-size: 15px;
    font-weight: 900;
    /* color: inline from getColour (same as header / column) */
    line-height: 1.35;
    margin-bottom: 8px;
}

.tt-live-status {
    font-size: 14px;
    font-weight: 800;
    color: var(--ja-dark);
    line-height: 1.4;
    margin-bottom: 8px;
}

.tt-live-sub {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    font-variant-numeric: tabular-nums;
    line-height: 1.35;
}

/* Purple hexagon beside the stop number — marks the stop the processor map-matched the ping to */
.tt-seq-gps-hex {
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-left: 3px;
    vertical-align: -1px;
    background: var(--ja-purple);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    flex-shrink: 0;
}

/* Map key under the live block */
.tt-map-key {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    margin-top: 6px;
    font-size: 10.5px;
    font-weight: 700;
    color: #666;
}

.tt-map-key-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.tt-key-swatch {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-sizing: border-box;
}

/* Purple hexagon = the vehicle's GPS-ping column on the map; shown inline on the ping row */
.tt-key-swatch--gps {
    width: 11px;
    height: 11px;
    margin-right: 5px;
    vertical-align: -1px;
    border-radius: 0;
    background: var(--ja-purple);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.tt-key-swatch--est {
    background: #fff;
    border: 2.5px solid var(--ja-purple);
    box-shadow: inset 0 0 0 1.5px #fff, inset 0 0 0 10px var(--ja-purple);
}

.tt-key-swatch--next {
    background: #ffb800;
    border: 1.5px solid #1a1a1a;
}

.tt-key-swatch--passed {
    background: #4b5563;
    border: 1.5px solid #1f2937;
}

.tt-key-swatch--future {
    background: #fff;
    border: 1.5px solid #6B5CAB;
}

.tt-key-swatch--sel {
    background: #ec4899;
    border: 1.5px solid #fff;
    box-shadow: 0 0 0 1px #ec4899;
}

/* Per-hop geometry pill after the stop name in the Predictions table */
.tt-geom-pill {
    display: inline-block;
    vertical-align: middle;
    margin-left: 4px;
    padding: 0 5px;
    border-radius: 7px;
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.5;
    border: 1px solid transparent;
}

.tt-geom-pill--shape  { background: #e0e7ff; color: #3730a3; border-color: #c7d2fe; }
.tt-geom-pill--google { background: #e0f2fe; color: #075985; border-color: #bae6fd; }
.tt-geom-pill--chord  { background: #f3f4f6; color: #4b5563; border-color: #d1d5db; }

/* Raw GTFS-RT JSON block shown for bus / vehicle-only regions */
.tt-raw-json {
    font-family: 'Fira Mono', 'Consolas', 'Menlo', monospace;
    font-size: 11px;
    line-height: 1.6;
    color: #2a1f60;
    background: transparent;
    margin: 0;
    padding: 0;
    white-space: pre-wrap;
    word-break: break-all;
    overflow: visible;
}

.tt-section-label {
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    color: #8472C4;
    margin-bottom: 6px;
}

.tt-divider {
    border-top: 1px solid var(--ja-border);
    margin: 10px 0;
}

.tt-no-data {
    font-size: 13px;
    color: #666;
    font-style: italic;
}

.tt-loading {
    padding: 6px 0;
}

/* Stop list: seq | name | arr | dep | status — name column takes most spare width; times stay narrow */
.tt-stops-header,
.tt-stop {
    display: grid;
    grid-template-columns:
        26px
        minmax(0, 3fr)
        minmax(42px, 0.7fr)
        minmax(42px, 0.7fr)
        minmax(72px, 0.95fr);
    gap: 5px;
    align-items: start;
    font-size: 12px;
}

.tt-stops-header {
    color: #6B5CAB;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 0;
    border-bottom: 1px solid var(--ja-border);
    margin-bottom: 2px;
}

.tt-stop {
    color: #1a1a1a;
    padding: 3px 0;
    border-radius: 4px;
}

.tt-stop--passed {
    opacity: 0.42;
    color: #777;
}

.tt-stop--current {
    color: var(--ja-dark);
    font-weight: 700;
    background: rgba(255, 184, 0, 0.22);
    padding: 3px 5px;
    margin: 1px -5px;
    opacity: 1;
}

.tt-stop-seq   { color: #888; font-size: 11px; font-variant-numeric: tabular-nums; min-width: 0; }
.tt-stop-id {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}
.tt-stop-time {
    min-width: 0;
    padding-top: 1px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-size: 11px;
    color: #444;
}

/* Stacked scheduled (struck) above actual — block + explicit decoration for reliable paint */
.tt-time-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    line-height: 1.15;
}

.tt-time-plain {
    display: block;
}

.tt-time-sched,
.tt-time-unknown {
    display: block;
    font-size: 10px;
    color: #666;
    opacity: 0.85;
    text-decoration: line-through;
    text-decoration-thickness: 1px;
    -webkit-text-decoration-line: line-through;
    -webkit-text-decoration-color: currentColor;
}

.tt-time-unknown {
    font-size: 11px;
    font-weight: 700;
}

.tt-time-act {
    display: block;
    font-weight: 800;
    font-size: 11px;
    color: #1a1a1a;
    line-height: 1.15;
}
.tt-stops-header span:nth-child(3),
.tt-stops-header span:nth-child(4),
.tt-stops-header span:nth-child(5) {
    text-align: right;
}
.tt-stop-summary {
    min-width: 0;
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-size: 11px;
    font-weight: 700;
    color: #333;
    line-height: 1.25;
}

/* ════════════════════════════════════════
   TOOLTIP TABS & PREDICTION / TRAFFIC PANEL
   ════════════════════════════════════════ */
#custom-tooltip.custom-tooltip--wide {
    width: min(780px, calc(100vw - 24px));
    max-height: calc(100vh - 20px);
}

#custom-tooltip.custom-tooltip--wide .tt-body {
    padding: 8px 12px 10px;
}

#custom-tooltip.custom-tooltip--wide .tt-live-block {
    padding: 6px 10px 8px;
}

#custom-tooltip.custom-tooltip--wide .tt-live-status,
#custom-tooltip.custom-tooltip--wide .tt-live-running {
    margin-bottom: 3px;
    font-size: 13px;
}

#custom-tooltip.custom-tooltip--wide .tt-divider {
    margin: 6px 0;
}

#custom-tooltip.custom-tooltip--wide .tt-stop-list-scroll {
    min-height: 120px;
    max-height: none; /* takes whatever height remains inside the (viewport-capped) panel */
}

.tt-tabs-bar {
    display: flex;
    gap: 6px;
    background: #f3f0fb;
    padding: 4px;
    border-radius: 8px;
    margin-bottom: 10px;
    flex-shrink: 0;
    border: 1px solid var(--ja-border);
}

.tt-tab-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 10px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #5b4d94;
    font-family: 'Nunito', sans-serif;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.tt-tab-btn:hover {
    color: var(--ja-purple-dark);
    background: rgba(132, 114, 196, 0.10);
}

.tt-tab-btn.is-active {
    background: #ffffff;
    color: var(--ja-dark);
    box-shadow: 0 1px 4px rgba(45, 27, 105, 0.12);
}

.tt-pred-block {
    gap: 6px;
}

/*
 * Everything under the scrubber row is a flex column that can shrink: the chart/header are
 * fixed, the stop list takes the remaining height and scrolls, and if the viewport is too
 * short even for the list's minimum the whole content block scrolls instead — so the last
 * rows are always reachable.
 */
.tt-pred-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    gap: 6px;
}

/* Scrubber + the two KPI cards share one row to leave more height for the chart and table. */
.tt-pred-toprow {
    display: grid;
    /* Scrubber gets a fixed minimum so its label + five transport buttons always fit. */
    grid-template-columns: minmax(370px, 2.6fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px;
    flex-shrink: 0;
}

.tt-pred-toprow .tt-pred-kpi-grid {
    display: contents;
}

/* Snapshot timeline scrubber */
.tt-pred-scrubber {
    background: #f8f7fc;
    border: 1px solid var(--ja-border);
    border-radius: 8px;
    padding: 5px 9px;
    flex-shrink: 0;
    /* Fixed height (matches the KPI cards): header row (22px) + range (5px) so the slider is
       fully visible even before the label text / web font has loaded. */
    box-sizing: border-box;
    height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.tt-pred-scrubber--single {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.tt-pred-scrubber-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    height: 22px;
    flex-shrink: 0;
}

.tt-pred-scrubber-label {
    font-size: 11px;
    font-weight: 700;
    color: #333;
    font-variant-numeric: tabular-nums;
    line-height: 22px;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.tt-pred-scrubber-actions {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
}

.tt-pred-scrubber--single .tt-pred-scrubber-top {
    flex: 1 1 auto;
    min-width: 0;
}

/* Slider row: the range takes the free width, the chart display controls sit to its right.
   18px tall so header (22px) + this row exactly fill the scrubber's fixed 50px box. */
.tt-pred-scrubber-bottom {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 18px;
    flex-shrink: 0;
    min-width: 0;
}
.tt-pred-scrubber-bottom .tt-pred-range {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
}
.tt-pred-chart-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Fade-rate control for the chart's earlier forecasts. */
.tt-pred-fade {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    cursor: default;
}
.tt-pred-fade-label {
    font-family: 'Nunito', sans-serif;
    font-size: 9.5px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #5b21b6;
}
.tt-pred-fade-input {
    width: 42px;
    height: 18px;
    padding: 0 2px 0 5px;
    border: 1px solid var(--ja-border);
    border-radius: 5px;
    background: #ffffff;
    color: var(--ja-purple-dark);
    font-family: 'Nunito', sans-serif;
    font-size: 11px;
    font-weight: 800;
    box-sizing: border-box;
}
.tt-pred-fade-input:focus { outline: 2px solid #c4b5fd; outline-offset: 0; }

/* Chart rounding switch ("1 min"): as-published whole minutes vs per-second model output. */
.tt-pred-round {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}
.tt-pred-round-input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}
.tt-pred-switch {
    position: relative;
    display: inline-block;
    width: 24px;
    height: 14px;
    border-radius: 7px;
    background: #cbd5e1;
    transition: background 0.15s;
    flex-shrink: 0;
}
.tt-pred-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    transition: transform 0.15s;
}
.tt-pred-round-input:checked + .tt-pred-switch { background: var(--ja-purple-dark); }
.tt-pred-round-input:checked + .tt-pred-switch::after { transform: translateX(10px); }
.tt-pred-round-input:focus-visible + .tt-pred-switch { outline: 2px solid #c4b5fd; outline-offset: 1px; }

/* Chip beside the chart title naming the plotted units (as published vs per-second model). */
.tt-chart-mode {
    display: inline-flex;
    align-items: center;
    height: 14px;
    padding: 0 6px;
    border-radius: 7px;
    border: 1px solid var(--ja-border);
    background: #f8f7fc;
    color: #64748b;
    font-family: 'Nunito', sans-serif;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
}
.tt-chart-mode--pub {
    background: #ede9fe;
    border-color: #c4b5fd;
    color: #5b21b6;
}

/* Scrubber transport controls: ‹ ▶/❚❚ › » */
.tt-pred-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 22px;
    padding: 0;
    border: 1px solid var(--ja-border);
    border-radius: 5px;
    background: #ffffff;
    color: var(--ja-purple-dark);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.tt-pred-icon-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    display: block;
}

#tt-pred-play-btn {
    width: 28px;
    background: var(--ja-purple);
    border-color: var(--ja-purple);
    color: #ffffff;
}

.tt-pred-icon-btn:hover:not(:disabled) {
    background: var(--ja-purple-light);
    border-color: var(--ja-purple);
}

#tt-pred-play-btn:hover:not(:disabled) {
    background: var(--ja-purple-dark);
    border-color: var(--ja-purple-dark);
}

.tt-pred-icon-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.tt-pred-mini-btn {
    font-family: 'Nunito', sans-serif;
    font-size: 10px;
    font-weight: 800;
    color: var(--ja-purple-dark);
    background: #ffffff;
    border: 1px solid var(--ja-border);
    border-radius: 5px;
    padding: 2px 7px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.tt-pred-mini-btn:hover {
    background: var(--ja-purple-light);
    border-color: var(--ja-purple);
}

.tt-pred-live-pill,
.tt-pred-hist-pill {
    display: inline-block;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.04em;
    margin-left: 4px;
    vertical-align: middle;
}

.tt-pred-live-pill {
    background: #dcfce7;
    color: #15803d;
}

.tt-pred-hist-pill {
    background: #fef3c7;
    color: #b45309;
}

.tt-pred-range {
    width: 100%;
    height: 5px;
    accent-color: var(--ja-purple);
    cursor: pointer;
    touch-action: none; /* let a horizontal drag scrub without the page/panel scrolling */
}

.tt-pred-range:active {
    cursor: grabbing;
}

/* Summary KPI cards */
.tt-pred-kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    flex-shrink: 0;
}

.tt-pred-kpi-card {
    background: #f9f8fd;
    border: 1px solid var(--ja-border);
    border-radius: 7px;
    padding: 5px 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
    min-width: 0;
    box-sizing: border-box;
    height: 50px;
}

.tt-pred-kpi-label {
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6B5CAB;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tt-pred-kpi-main {
    font-size: 14px;
    font-weight: 900;
    color: var(--ja-dark);
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Calibration pack chip beside the model version (v2.3+) */
.tt-kpi-cal {
    display: inline-block;
    vertical-align: 2px;
    margin-left: 2px;
    padding: 0 5px;
    border-radius: 7px;
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1.5;
    background: #ede9fe;
    color: #5b21b6;
    border: 1px solid #c4b5fd;
    white-space: nowrap;
}

.tt-pred-kpi-sub {
    font-size: 10px;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-variant-numeric: tabular-nums;
}

/* Map-matching detail, expandable under the GPS-anchored stop row */
.tt-pred-row-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 2px;
    padding: 0;
    border: 1px solid var(--ja-border);
    border-radius: 4px;
    background: #ffffff;
    color: var(--ja-purple-dark);
    font-size: 9px;
    line-height: 1;
    cursor: pointer;
    vertical-align: middle;
    transition: transform 0.15s ease, background 0.15s;
    transform: rotate(-90deg);
}

.tt-pred-row-toggle:hover {
    background: var(--ja-purple-light);
}

.tt-pred-row-toggle.is-open {
    transform: rotate(0deg);
}

.tt-pred-hop-detail {
    display: none;
    border-bottom: 1px solid #f1eff8;
}

.tt-pred-hop-detail.is-open {
    display: block;
}

.tt-pred-hop-detail-inner {
    margin: 3px 0 5px 29px; /* indent past the sequence-number column */
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    padding: 6px 9px;
}

.tt-pred-seg-top {
    display: flex;
    flex-direction: column;
    gap: 1px;
    font-size: 10.5px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 5px;
    font-variant-numeric: tabular-nums;
}

.tt-pred-seg-headline {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tt-pred-seg-facts {
    font-size: 10px;
    font-weight: 600;
    color: #64748b;
}

.tt-pred-seg-top code {
    font-family: 'Fira Mono', 'Consolas', monospace;
    font-size: 10px;
    background: #eef2ff;
    color: #4338ca;
    padding: 1px 4px;
    border-radius: 3px;
}

.tt-pred-seg-track {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.tt-pred-seg-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ja-purple) 0%, #ffb800 100%);
    border-radius: 3px;
    transition: width 0.25s ease;
}

/* SVG Delay Trajectory Chart */
.tt-pred-chart-card {
    background: #ffffff;
    border: 1px solid var(--ja-border);
    border-radius: 8px;
    padding: 7px 9px 5px;
    flex-shrink: 0;
}

/* Title row + legend row, both fixed height, so the SVG below never shifts between snapshots. */
.tt-pred-chart-head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    height: 32px;
    margin-bottom: 2px;
    overflow: hidden;
}

.tt-pred-chart-title {
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ja-purple-dark);
}

/* Title row: chart title + copyable trip-ID chip, fixed 14px tall. */
.tt-pred-chart-titlerow {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 14px;
    width: 100%;
    min-width: 0;
}

.tt-trip-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    height: 14px;
    padding: 0 2px 0 6px;
    border: 1px solid var(--ja-border);
    border-radius: 7px;
    background: #f8f7fc;
    min-width: 0;
}

.tt-trip-chip-id {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
    font-weight: 700;
    color: #3b3470;
    line-height: 12px;
    user-select: all;
    -webkit-user-select: all;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 260px;
}

.tt-trip-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 12px;
    padding: 0;
    border: none;
    border-radius: 3px;
    background: transparent;
    color: #6B5CAB;
    cursor: pointer;
}
.tt-trip-copy svg { width: 11px; height: 11px; fill: currentColor; }
.tt-trip-copy:hover { background: #ebe8f7; color: var(--ja-purple-dark); }
.tt-trip-copy.is-copied { color: #15803d; }
.tt-trip-copy.is-failed { color: #b91c1c; }

.tt-pred-chart-legend {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 16px;
    font-size: 10px;
    font-weight: 700;
    color: #475569;
    white-space: nowrap;
    flex-shrink: 0;
}

.tt-pred-chart-title {
    height: 14px;
    line-height: 14px;
    white-space: nowrap;
}

.tt-leg-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* "v2 by traffic:" group — swatches coloured with the same palette as the map route overlay */
.tt-leg-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding-left: 7px;
    border-left: 1px solid var(--ja-border);
}

.tt-leg-group-label {
    color: #6B5CAB;
    font-weight: 900;
}

.tt-leg-swatch {
    display: inline-block;
    width: 12px;
    height: 2.5px;
    border-radius: 1px;
}
.tt-leg-swatch--obs { background: #111827; }
.tt-leg-swatch--v1  { background: #94a3b8; border-top: 1px dashed #64748b; }
.tt-leg-swatch--v2  { background: #6B5CAB; height: 3px; }

/* Point-style legend items (observed = filled, estimated = hollow purple) and the range bar. */
.tt-leg-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    box-sizing: border-box;
}
.tt-leg-dot--obs { background: #111827; }
.tt-leg-dot--est { background: #fff; border: 1.6px solid #6d28d9; }
.tt-leg-range {
    display: inline-block;
    width: 7px;
    height: 10px;
    background:
        linear-gradient(#a78bfa, #a78bfa) 50% 0 / 7px 1.4px no-repeat,
        linear-gradient(#a78bfa, #a78bfa) 50% 100% / 7px 1.4px no-repeat,
        linear-gradient(#a78bfa, #a78bfa) 50% 50% / 1.6px 100% no-repeat;
}

/* Legend swatch for the faint "earlier forecasts" ghost trajectories. */
.tt-leg-ghost {
    display: inline-block;
    width: 14px;
    height: 8px;
    background:
        linear-gradient(#6d28d9, #6d28d9) 0 1px / 14px 1px no-repeat,
        linear-gradient(#6d28d9, #6d28d9) 0 4px / 14px 1px no-repeat,
        linear-gradient(#6d28d9, #6d28d9) 0 7px / 14px 1px no-repeat;
    opacity: 0.35;
}

/* Aspect ratio comes from the viewBox (640×170); width drives height so text is never stretched. */
.tt-pred-chart-svg {
    display: block;
    width: 100%;
    height: auto;
    max-height: 190px;
}

/* Clickable stop ticks / range bars on the chart. */
.tt-chart-stop-hit { cursor: pointer; }
.tt-chart-stop-hit:hover line { stroke-opacity: 1; }
.tt-chart-stop-hit.is-focused line { stroke: #7c3aed; stroke-opacity: 1; }

/* Per-stop forecast-history panel that pops up under the chart. */
.tt-chart-focus {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed #ddd6fe;
}
.tt-chart-focus-head {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    padding: 0 2px 2px;
}
.tt-chart-focus-title {
    font-family: 'Nunito', sans-serif;
    font-size: 11px;
    font-weight: 900;
    color: #5b21b6;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
}
.tt-chart-focus-name {
    text-transform: none;
    letter-spacing: 0;
    color: #1f2937;
}
.tt-chart-focus-stats {
    font-family: 'Nunito', sans-serif;
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    flex: 1 1 auto;
    min-width: 0;
}
.tt-chart-focus-close {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: #6b7280;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    padding: 2px 4px;
    cursor: pointer;
    border-radius: 4px;
}
.tt-chart-focus-close:hover { background: #ede9fe; color: #5b21b6; }
.tt-chart-focus-svg { max-height: 130px; }

.tt-chart-axis-text {
    font-family: 'Nunito', sans-serif;
    font-size: 11px;
    font-weight: 700;
    fill: #64748b;
}

.tt-chart-axis-text--zero {
    fill: #334155;
    font-weight: 900;
}

.tt-chart-axis-sub {
    font-family: 'Nunito', sans-serif;
    font-size: 8.5px;
    font-weight: 700;
    font-style: italic;
    fill: #64748b;
}

.tt-chart-cur-label {
    font-family: 'Nunito', sans-serif;
    font-size: 11px;
    font-weight: 900;
    fill: #92400e;
}

.tt-chart-gps-label {
    font-family: 'Nunito', sans-serif;
    font-size: 9.5px;
    font-weight: 900;
    fill: #5b21b6;
}

/* Per-hop table */
.tt-pred-header,
.tt-pred-row {
    display: grid;
    grid-template-columns:
        30px
        minmax(120px, 1.8fr)
        minmax(70px, 0.9fr)
        minmax(100px, 1.3fr)
        minmax(62px, 0.8fr)
        minmax(62px, 0.8fr)
        minmax(78px, 1fr)
        minmax(66px, 0.85fr);
    gap: 6px;
    align-items: center;
    font-size: 11px;
}
.tt-pred-row .tt-stop-seq { white-space: nowrap; }

/* Sched / Pred column: scheduled clock time with predicted/actual beneath (left-aligned). */
.tt-pred-time-col {
    min-width: 0;
    font-variant-numeric: tabular-nums;
}
.tt-pred-time-col .tt-time-stack { align-items: flex-start; gap: 0; }
.tt-pred-time-col .tt-time-plain,
.tt-pred-time-col .tt-time-unknown { font-size: 10.5px; font-weight: 700; }
.tt-pred-time-col .tt-time-unknown { color: #64748b; text-decoration: none; }
.tt-pred-time-col .tt-time-sched { font-size: 9px; }
.tt-pred-time-col .tt-time-act { font-size: 10.5px; }

.tt-pred-header {
    color: #6B5CAB;
    font-size: 9.5px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 4px 0;
    border-bottom: 1.5px solid var(--ja-border);
    flex-shrink: 0;
}
.tt-pred-header span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tt-pred-header span:nth-child(5),
.tt-pred-header span:nth-child(6),
.tt-pred-header span:nth-child(7),
.tt-pred-header span:nth-child(8) {
    text-align: right;
}

/* Flow column: Live / Free / Hist on one line each, same face; only Live is tone-coloured. */
.tt-flow-line {
    display: block;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.25;
    color: #334155;
    white-space: nowrap;
}

/*
 * Row colouring. The background is decided purely by state — selected (pink) beats current
 * (gold) beats normal — and hover only changes opacity, so a click reads as "selected"
 * immediately rather than lingering in a hover tint. Every row shares the same padding/
 * margin so toggling a state class never shifts the layout.
 */
.tt-pred-row {
    padding: 4px 5px;
    margin: 0 -5px;
    border-radius: 5px;
    border-bottom: 1px solid #f1eff8;
    color: var(--ja-dark);
    background: transparent;
}

.tt-pred-row--passed {
    opacity: 0.56;
}

.tt-pred-row--selectable {
    cursor: pointer;
    transition: opacity 0.12s ease;
}

.tt-pred-row--selectable:hover {
    opacity: 0.8;
}

.tt-pred-row--passed.tt-pred-row--selectable:hover {
    opacity: 0.85;
}

.tt-pred-row--selectable:focus-visible {
    outline: 2px solid var(--ja-purple);
    outline-offset: -2px;
}

.tt-pred-row--current {
    background: rgba(255, 184, 0, 0.22);
    opacity: 1;
}

/* Stop highlighted on the map (matches the magenta marker in selected-trip-stops) */
.tt-pred-row--selected,
.tt-pred-row--selected.tt-pred-row--current {
    background: rgba(236, 72, 153, 0.18);
    box-shadow: inset 3px 0 0 #ec4899;
    opacity: 1;
}

.tt-pred-row--current.tt-pred-row--selectable:hover,
.tt-pred-row--selected.tt-pred-row--selectable:hover {
    opacity: 0.85;
}

.tt-pred-stop-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.tt-pred-stop-name {
    font-weight: 700;
    font-size: 11.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tt-pred-stop-code {
    font-size: 9px;
    font-weight: 700;
    color: #94a3b8;
    font-family: 'Fira Mono', 'Consolas', monospace;
    white-space: nowrap;
}

.tt-pred-stop-code .tt-geom-pill {
    font-family: 'Nunito', 'Segoe UI', sans-serif;
    vertical-align: baseline;
}

.tt-pred-src-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
}

.tt-hop-id-sub {
    font-size: 9px;
    font-weight: 600;
    color: #64748b;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.tt-pred-num-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.tt-pred-cell-main {
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
}

.tt-pred-cell-sub {
    font-size: 9px;
    font-weight: 600;
    color: #64748b;
    line-height: 1.15;
}

/* Delay-cell markers: v2.4 schedule hold (early bus waits for its timetabled departure) and
   the monotonic guard (arrival pushed after the previous departure). */
.tt-pred-hold {
    color: #b45309;
    font-weight: 800;
}
.tt-pred-mono {
    color: #6d28d9;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 8px;
}

/* Source badges */
.tt-src-badge {
    display: inline-block;
    padding: 1.5px 6px;
    border-radius: 4px;
    font-size: 9.5px;
    font-weight: 800;
    line-height: 1.25;
    white-space: nowrap;
}

.tt-src-badge--rmi-live {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.tt-src-badge--rmi-blend {
    background: #ccfbf1;
    color: #115e59;
    border: 1px solid #5eead4;
}

.tt-src-badge--rmi-decay,
.tt-src-badge--rmi-hist {
    background: #e0f2fe;
    color: #075985;
    border: 1px solid #7dd3fc;
}

.tt-src-badge--otp {
    background: #ede9fe;
    color: #5b21b6;
    border: 1px solid #c4b5fd;
}

.tt-src-badge--google {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.tt-src-badge--sched {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.tt-src-badge--stopped {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

/* Model estimate for a passed stop that had no GPS observation */
.tt-src-badge--estimated {
    background: #f5f3ff;
    color: #6d28d9;
    border: 1px dashed #c4b5fd;
}

.tt-src-badge--observed {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

/* Delay value colour tones */
.tt-pred-val--ontime    { color: #15803d; }
.tt-pred-val--early     { color: #0369a1; }
.tt-pred-val--late-med  { color: #b45309; }
.tt-pred-val--late-high { color: #b91c1c; }
.tt-pred-val--muted     { color: #64748b; }

/* Empty / Loading / Error states */
.tt-pred-empty {
    background: #f8f7fc;
    border: 1px dashed var(--ja-border);
    border-radius: 8px;
    padding: 18px 14px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #475569;
    font-size: 12px;
}

.tt-pred-empty-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--ja-dark);
}

.tt-pred-empty-sub {
    font-size: 11.5px;
    color: #64748b;
    max-width: 440px;
    line-height: 1.4;
}

.tt-pred-retry-btn {
    margin-top: 4px;
    padding: 6px 12px;
    background: var(--ja-purple);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-family: 'Nunito', sans-serif;
    font-size: 11.5px;
    font-weight: 800;
    cursor: pointer;
}

.tt-pred-retry-btn:hover {
    background: var(--ja-purple-dark);
}

.tt-pred-spinner {
    width: 20px;
    height: 20px;
    border: 2.5px solid var(--ja-border);
    border-top-color: var(--ja-purple);
    border-radius: 50%;
    animation: ttPredSpin 0.75s linear infinite;
}

@keyframes ttPredSpin {
    to { transform: rotate(360deg); }
}

