/* Leaflet driver popup — dark card, links for profile / VTC */

.leaflet-popup-content-wrapper {
    background: rgba(15, 23, 42, 0.97);
    color: #e2e8f0;
    border-radius: 14px;
    border: 1px solid rgba(45, 212, 191, 0.22);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
    padding: 0;
    overflow: hidden;
    max-height: min(72vh, calc(100vh - 120px));
}

.leaflet-popup-content {
    margin: 0;
    min-width: 210px;
    max-width: min(280px, calc(100vw - 48px));
    max-height: min(72vh, calc(100vh - 120px));
    overflow-y: auto;
    overscroll-behavior: contain;
}

.leaflet-popup-tip {
    background: rgba(15, 23, 42, 0.97);
    box-shadow: 0 1px 0 rgba(45, 212, 191, 0.15);
}

.leaflet-container a.leaflet-popup-close-button {
    color: #94a3b8;
    font-size: 22px;
    font-weight: 600;
    width: 28px;
    height: 28px;
    padding: 4px 6px 0 0;
    line-height: 1;
}

.leaflet-container a.leaflet-popup-close-button:hover {
    color: #fbbf24;
}

.live-popup {
    font-size: 13px;
    line-height: 1.45;
    padding: 12px 14px 14px;
    max-height: inherit;
}

.live-popup-header {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.live-popup-name-text,
.live-popup-link.live-popup-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fbbf24;
    text-decoration: none;
    display: inline-block;
}

.live-popup-link.live-popup-name:hover {
    color: #fcd34d;
    text-decoration: underline;
}

.live-popup-row {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.5rem;
}

.live-popup-row:first-of-type {
    margin-top: 0;
}

.live-popup-k {
    color: #94a3b8;
    font-size: 12px;
    flex: 0 0 auto;
}

.live-popup-v {
    color: #e2e8f0;
    font-size: 13px;
}

.live-popup-link.live-popup-company {
    color: #5eead4;
    font-weight: 600;
    text-decoration: none;
}

.live-popup-link.live-popup-company:hover {
    color: #99f6e4;
    text-decoration: underline;
}

.live-popup-badge {
    display: inline-block;
    margin-top: 8px;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #67e8f9;
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(34, 211, 238, 0.25);
}

.live-popup-muted {
    margin-top: 4px;
}

.live-popup-city {
    color: #94a3b8;
    font-size: 12px;
}

.live-popup-speed {
    margin-top: 8px;
}

.live-popup-speed-val {
    color: #fbbf24;
    font-weight: 700;
}

.live-popup-route .live-popup-v {
    font-size: 12px;
    color: #cbd5e1;
}

/* Fixed side driver panel (alternative to map popup) */
.map-driver-panel {
    position: fixed;
    left: 20px;
    top: 72px;
    width: min(340px, calc(100vw - 28px));
    max-height: calc(100vh - 128px);
    z-index: 1305;
    border-radius: 12px;
    border: 1px solid rgba(45, 212, 191, 0.24);
    background: rgba(15, 23, 42, 0.94);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    overflow: hidden;
}
.map-driver-panel.is-hidden {
    display: none;
}
.map-driver-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.map-driver-panel-toggle {
    width: 26px;
    height: 26px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 7px;
    background: rgba(30, 41, 59, 0.7);
    color: #cbd5e1;
    cursor: pointer;
}
.map-driver-panel-body {
    max-height: calc(100vh - 190px);
    overflow-y: auto;
}
.map-driver-panel.is-collapsed {
    width: 44px;
    height: 44px;
    top: 92px;
}
.map-driver-panel.is-collapsed .map-driver-panel-header {
    border-bottom: none;
    padding: 8px;
    justify-content: center;
}
.map-driver-panel.is-collapsed .map-driver-panel-title {
    display: none;
}
.map-driver-panel.is-collapsed .map-driver-panel-body {
    display: none;
}
