/* ===== MAP PAGE LAYOUT ===== */
.map-layout {
    overflow: hidden;
    min-height: 0;
}

.map-body {
    overflow: hidden;
    min-height: 0;
}

.map-sidebar {
    width: 300px;
    min-width: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    transition: width 0.2s ease, min-width 0.2s ease;
}

.map-sidebar.collapsed {
    width: 0;
    min-width: 0;
    overflow: hidden;
}

.map-sidebar-toggle {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 1000;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 1px 5px rgba(0,0,0,0.3);
    cursor: pointer;
    font-size: 16px;
    line-height: 32px;
    text-align: center;
    padding: 0;
    transition: left 0.2s ease;
}

.map-sidebar-toggle.shifted {
    left: 308px;
}

.map-sidebar-header {
    background-color: #e9ecef;
}

/* ===== BOTTOM BAR ===== */
.map-bottom-bar {
    flex-shrink: 0;
    overflow: hidden;
    transition: height 0.25s ease;
}

.map-bottom-bar.collapsed {
    height: 36px !important;
}

.bottom-bar-header {
    height: 36px;
    min-height: 36px;
    cursor: pointer;
    user-select: none;
}

.bottom-bar-body {
    height: 220px;
    overflow: hidden;
}

.datalog-wrap {
    overflow-y: auto;
    max-height: 200px;
}

.datalog-table {
    font-size: 0.78rem;
}

.datalog-table th,
.datalog-table td {
    padding: 0.2rem 0.4rem;
    white-space: nowrap;
}

.datalog-table tr.active-row {
    background-color: rgba(13, 110, 253, 0.12);
}

.speed-graph {
    height: 190px;
    position: relative;
}

.speed-graph canvas {
    width: 100% !important;
    height: 100% !important;
}

/* ===== WIDGETS (right overlay) ===== */
.map-widgets {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 999;
    width: 280px;
    max-height: calc(100% - 16px);
    overflow-y: auto;
    pointer-events: none;
}

.widget-card {
    pointer-events: auto;
    font-size: 0.8rem;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(4px);
}

.widget-card .card-header {
    padding: 0.35rem 0.6rem;
    font-weight: 600;
    font-size: 0.78rem;
}

.widget-card .card-body {
    padding: 0.4rem 0.6rem;
}

.widget-card table td {
    padding: 0.15rem 0.3rem;
    border: none;
    font-size: 0.78rem;
}

.widget-card table td:first-child {
    color: #6c757d;
    white-space: nowrap;
    width: 90px;
}

.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}

.status-dot.moving { background: #28a745; }
.status-dot.stopped { background: #ffc107; }
.status-dot.offline { background: #dc3545; }

/* ===== VEHICLE MARKER ===== */
.vehicle-div-icon {
    background: transparent !important;
    border: none !important;
}

.vehicle-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    color: #dc3545;
    filter: drop-shadow(0 0 2px rgba(0,0,0,0.5));
    line-height: 24px;
    text-align: center;
    transition: transform 0.3s ease;
}

.vehicle-icon svg {
    width: 24px;
    height: 24px;
    display: block;
}

/* ===== FOCUS BUTTON ===== */
.focus-btn {
    font-size: 14px;
    line-height: 1;
    text-decoration: none !important;
    opacity: 0.4;
    transition: opacity 0.15s;
}

.focus-btn:hover {
    opacity: 0.8;
}

.focus-btn.focused {
    opacity: 1;
}

/* ===== LIVE INDICATOR ===== */
.live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #dc3545;
    animation: pulse 1.5s infinite;
    margin-right: 4px;
    vertical-align: middle;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}
