.radarx-tooltip {
    position: absolute;
    display: none;              /* default hidden */
   /* opacity: 1;                  niet doorzichtig */
    background: rgba(255, 255, 255, 0.76);
    border: 2px solid rgba(0,0,0,0.12);
    border-radius: 12px;
    padding: 10px 12px;
    font-family: Segoe UI, sans-serif;
    font-size: 12px;
    color: #222;
    pointer-events: none;
    white-space: nowrap;        /* voorkomt wrapping */
    min-width: 170px;           /* voorkomt te smal */
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
    transform: translate(-50%, -115%);
    z-index: 9999;
}

.radarx-tooltip-inner {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.radarx-tooltip-row {
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.2;
}

.radarx-tooltip-row i.bi {
    font-size: 14px;
    width: 16px;               /* icons netjes uitlijnen */
    text-align: center;
    flex: 0 0 16px;
    opacity: 0.9;
}

.radarx-tooltip-sim {
    font-weight: 700;
}

.radarx-tooltip-loco {
    opacity: 0.75;
}

.radarx-tooltip-speed {
    font-size: 16px;
    font-weight: 400;
}

.tooltip-hint {
    font-size: 10px;
    color: #888;
    margin-top: 2px;
}

.radarx-bubble {
    background: rgba(30,30,30,0.9);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.radarx-bubble:after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: rgba(30,30,30,0.9) transparent transparent transparent;
}

#radarx-message-bar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    pointer-events: auto;
}

.radarx-message {
    min-width: 180px;
    max-width: 700px;
    padding: 6px 12px;
    border-radius: 14px;
    color: #fff;
    font: 12px "Segoe UI", sans-serif;
    box-shadow: 0 3px 10px rgba(0,0,0,0.35);
    animation: radarx-rise 0.25s ease-out;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
	pointer-events: auto;
}

.radarx-message-followed {
    background: rgba(255,106,0,0.82);
}

.radarx-message-tsw {
    background: rgba(254,32,95,0.82);
}

.radarx-message-tsc {
    background: rgba(244,228,40,0.82);
    color: #222;
}
.radarx-message-default {
    background: rgba(30,30,30,0.82);
}

.radarx-message-system {
    background: rgba(60,60,60,0.72);
    color: #eee;
}

.radarx-message-enter {
	background: rgba(50,160,90,0.82);
}

.radarx-message-leave {
	background: rgba(200,70,70,0.82);
}

.radarx-sim-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 4px;
    line-height: 1;
}

@keyframes radarx-rise {
    from {
        transform: translateY(10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.routex-popup {
    position: absolute;
    display: none;
    min-width: 200px;
    max-width: 260px;
    max-height: 180px;
    overflow-y: auto;
    z-index: 10000;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-left: 3px solid #356FAE;
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    color: #333;
    font-family: "Segoe UI", sans-serif;
    font-size: 12px;
    padding: 6px;
    padding-left: 6px;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    cursor: move;
    user-select: none;
}

.routex-popup-title {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
    color: #333;
    white-space: normal;
    word-break: break-word;
}

.routex-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 4px;
    cursor: move;
}

.routex-popup-toggle {
    flex: 0 0 auto;
    color: #356FAE;
    cursor: pointer;
    font-size: 11px;
    line-height: 1;
}

.routex-popup-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.routex-popup-close {
    color: #356FAE;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    opacity: 0.7;
}

.routex-popup-close:hover {
    opacity: 1;
}

.routex-popup.collapsed .routex-popup-body {
    display: none;
}

.routex-popup-loading,
.routex-popup-empty {
    font-size: 12px;
    color: #52616f;
    padding: 3px 5px;
}

.routex-popup-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.routex-popup-route {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    line-height: 1.2;
    padding: 3px 5px;
    text-align: left;
}

.routex-popup .route-item {
    cursor: pointer;
}

.routex-popup-route:hover {
    background: rgba(53, 111, 174, 0.08);
}

.routex-popup .route-item:hover {
    background: rgba(53, 111, 174, 0.08);
}

.routex-popup-route-name {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    line-height: 1.2;
    white-space: normal;
    word-break: break-word;
}

.routex-popup-route-count {
    flex: 0 0 auto;
    color: #52616f;
    font-size: 11px;
    white-space: nowrap;
}

.routex-station-panel {
    background: white;
    border-left: 3px solid #ff6a00;
    padding: 4px 6px;
    font-size: 11px;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
}

.routex-station-panel .station-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.routex-station-panel .station-name {
    font-weight: 600;
}

.routex-station-panel .station-distance {
    font-size: 11px;
}

.routex-station-panel .segment-distance {
    opacity: 0.7;
}

.routex-station-panel .time-main {
    font-weight: 600;
    font-size: 12px;
}

.routex-station-panel .station-times {
    font-weight: 600;
    font-size: 11px;
    margin-top: 1px;
}

.routex-station-panel .segment-avg {
    color: #f0ad4e;
    opacity: 0.8;
    margin-left: 4px;
}

.routex-station-panel .time-segment {
    font-size: 10px;
    opacity: 0.7;
    margin-top: 1px;
}

.routex-station-panel .distance {
    font-size: 10px;
    opacity: 0.75;
    margin-top: 2px;
}

.routex-info-panel {
    position: absolute;
    top: 0.5em;
    left: 0.5em;
    z-index: 10000;
    min-width: 220px;
    max-width: 300px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
    border-left: 3px solid #356FAE;
    padding: 8px 10px;
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    color: #333;
    font-family: "Segoe UI", sans-serif;
    font-size: 12px;
    line-height: 1.3;
}

.routex-info-panel.app {
    min-width: 0;
    max-width: 200px;
    padding: 6px 8px;
    font-size: 12px;
    line-height: 1.2;
}

.routex-info-panel .header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-weight: 600;
    margin-bottom: 6px;
}

.routex-info-panel.app .header {
    justify-content: space-between;
    margin-bottom: 2px;
}

.routex-info-panel .title {
    min-width: 0;
    margin-bottom: 4px;
    font-size: 13px;
    line-height: 1.25;
    word-break: break-word;
}

.routex-info-panel.app .section {
    margin-top: 3px;
}

.routex-info-panel.app .row {
    margin-bottom: 1px;
}

.routex-info-panel .close-btn {
    flex: 0 0 auto;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    opacity: 0.8;
}

.routex-info-panel .close-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    opacity: 1;
}

.routex-info-panel .section {
    margin-top: 6px;
}

.routex-info-panel .row {
    margin-bottom: 2px;
    font-size: 12px;
}

.routex-info-panel .label {
    font-size: 10px;
    opacity: 0.6;
}

.routex-info-panel .value {
    font-weight: 600;
}

.routex-drive-btn {
    width: 100%;
    margin-top: 4px;
    padding: 6px 0;
    background-color: #F8F9FB;
    color: #0078D4;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border-width: 1px;
    border-color: #0078D4;
    border-style: solid;
}

.min {
    color: #d9534f;
}

.avg {
    color: #f0ad4e;
    font-weight: 600;
}

.max {
    color: #5cb85c;
}
