/* Map container fills available space */
#map-container {
    position: relative;
    height: calc(100vh - 56px);
}

#map {
    width: 100%;
    height: 100%;
}

/* Map overlays */
.map-overlay {
    position: absolute;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

#map-legend {
    bottom: 20px;
    right: 10px;
    min-width: 160px;
}

#map-legend h6 {
    margin: 0 0 6px 0;
    font-size: 13px;
}

#map-legend hr {
    margin: 6px 0;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 3px 0;
    font-size: 12px;
}

.legend-color {
    width: 18px;
    height: 14px;
    border-radius: 3px;
    flex-shrink: 0;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-line {
    width: 18px;
    height: 3px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* Filter panel */
.map-filters-panel {
    top: 10px;
    left: 10px;
    width: 180px;
    z-index: 1001;
}

.map-filters-panel h6 {
    margin: 0 0 8px 0;
    font-size: 13px;
}

/* Info panel */
.map-info-panel {
    bottom: 20px;
    left: 200px;
    width: 280px;
    z-index: 1001;
}

.map-info-panel h6 {
    margin: 0 0 8px 0;
}

.map-info-panel .stat-row {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
    font-size: 12px;
}

.map-info-panel .stat-row .label {
    color: #666;
}

.map-info-panel .stat-row .value {
    font-weight: 600;
}

/* Leaflet popup */
.station-popup h6 {
    margin: 0 0 6px 0;
    font-size: 14px;
}

.station-popup .popup-stat {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    padding: 1px 0;
}

.station-popup .popup-stat .label {
    color: #666;
}

.station-popup .popup-stat .value {
    font-weight: 600;
}

.station-popup .direction-bar {
    height: 6px;
    border-radius: 3px;
    margin-top: 6px;
    display: flex;
    overflow: hidden;
}

.station-popup .direction-bar .in {
    background: #4CAF50;
}

.station-popup .direction-bar .out {
    background: #F44336;
}

.station-popup .direction-bar .int {
    background: #FF9800;
}

/* Stats page cards */
.card {
    border-radius: 8px;
}

.card-header {
    background: transparent;
    border-bottom: 1px solid #eee;
}

/* Capacity tooltip */
.capacity-tooltip {
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: #fff;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 3px;
}

/* Loading spinner */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
