/* Vehicle Dashboard Styles */
.vehicle-dashboard {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 380px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    border: 2px solid #3498db;
    overflow: hidden;
    display: none;
    max-height: 500px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.dashboard-header {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #2980b9;
}

.dashboard-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.vehicle-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.dashboard-content {
    padding: 0;
}

.vehicle-card {
    padding: 15px 20px;
    border-bottom: 1px solid #ecf0f1;
    background: white;
}

.vehicle-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.vehicle-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.vehicle-type {
    background: #3498db;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.vehicle-status {
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 8px;
}

.status-available { color: #27ae60; }
.status-in-transit { color: #f39c12; }
.status-maintenance { color: #e74c3c; }

.vehicle-progress {
    margin: 8px 0;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #ecf0f1;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2980b9);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #7f8c8d;
    margin-top: 4px;
}

.vehicle-details {
    margin-top: 12px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
}

.detail-label {
    color: #7f8c8d;
    font-weight: 500;
}

.detail-value {
    color: #2c3e50;
    font-weight: 600;
}

.stop-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 12px;
}

.stop-btn:hover {
    background: #c0392b;
}

.dashboard-controls {
    display: flex;
    justify-content: space-between;
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #ecf0f1;
}

.nav-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-right: 8px;
}

.nav-btn:hover:not(:disabled) {
    background: #2980b9;
    transform: translateY(-1px);
}

.nav-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.close-dashboard {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.close-dashboard:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

.no-vehicles {
    padding: 40px 20px;
    text-align: center;
    color: #7f8c8d;
}

.no-vehicles i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.vehicle-route {
    font-size: 11px;
    color: #3498db;
    margin-top: 4px;
    font-weight: 500;
}

.alternative-route-badge {
    background: #e74c3c;
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 10px;
    margin-left: 8px;
}

/* Animation for dashboard */
@keyframes slideInUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.vehicle-dashboard[style*="display: block"] {
    animation: slideInUp 0.3s ease-out;
}

.dashboard-toggle {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: #3498db;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    z-index: 999;
    transition: all 0.3s ease;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dashboard-toggle:hover {
    background: #2980b9;
    transform: scale(1.1);
}

/* Route Popup Styles */
.route-popup-content {
    min-width: 250px;
    max-width: 350px;
}

.route-popup-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 15px;
    margin: -15px -15px 15px -15px;
    border-radius: 5px 5px 0 0;
}

.route-popup-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.route-popup-body {
    padding: 5px 0;
}

.route-popup-section {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.route-popup-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.route-popup-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    padding: 3px 0;
}

.route-popup-label {
    font-weight: 500;
    color: #555;
    font-size: 13px;
}

.route-popup-value {
    font-weight: 600;
    color: #333;
    font-size: 13px;
    text-align: right;
}

.route-popup-waypoints {
    background: #f8f9fa;
    padding: 8px;
    border-radius: 4px;
    margin-top: 5px;
}

.route-popup-waypoint {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 0;
    font-size: 12px;
}

.route-popup-waypoint-bullet {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.route-popup-waypoint-start .route-popup-waypoint-bullet {
    background: #28a745;
}

.route-popup-waypoint-intermediate .route-popup-waypoint-bullet {
    background: #ffc107;
}

.route-popup-waypoint-end .route-popup-waypoint-bullet {
    background: #dc3545;
}

.route-popup-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 8px;
}

.route-popup-stat {
    text-align: center;
    padding: 6px;
    background: #f8f9fa;
    border-radius: 4px;
}

.route-popup-stat-value {
    font-weight: 700;
    font-size: 14px;
    color: #495057;
}

.route-popup-stat-label {
    font-size: 11px;
    color: #6c757d;
    margin-top: 2px;
}

.route-popup-alternative-badge {
    background: #ffc107;
    color: #212529;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
}

.route-popup-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
}

.route-popup-action-btn {
    flex: 1;
    padding: 6px 8px;
    border: none;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.route-popup-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.route-popup-action-assign {
    background: #007bff;
    color: white;
}

.route-popup-action-remove {
    background: #dc3545;
    color: white;
}

.route-popup-action-alternative {
    background: #17a2b8;
    color: white;
}