/**
 * GPS Tracker Leaflet - Styles
 */

.gps-tracker-container {
    position: relative;
    width: 100%;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.gps-tracker-map {
    width: 100%;
    height: 500px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1;
    background: #f0f0f0;
}

/* Custom markers styling */
.gps-tracker-waiting-marker,
.gps-tracker-no-data-marker {
    background: transparent !important;
    border: none !important;
}

.gps-tracker-waiting-marker div,
.gps-tracker-no-data-marker div {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Stats Panel */
.gps-tracker-stats {
    display: flex;
    justify-content: space-around;
    background: #fff;
    padding: 15px;
    margin-top: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-value {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* Controls */
.gps-tracker-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding: 10px 0;
}

.follow-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #2ecc71;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s ease;
}

.follow-btn:hover {
    background: #27ae60;
}

.follow-btn.inactive {
    background: #95a5a6;
}

.follow-btn.inactive:hover {
    background: #7f8c8d;
}

/* Leaflet Control Button */
.gps-tracker-follow-control {
    transition: background 0.2s ease;
}

.gps-tracker-follow-control:hover {
    opacity: 0.9;
}

.last-update {
    font-size: 12px;
    color: #666;
    font-style: italic;
}

/* Leaflet Popup Customization */
.gps-tracker-popup .leaflet-popup-content-wrapper {
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
}

.gps-tracker-popup .leaflet-popup-content {
    margin: 0;
    padding: 12px;
}

.popup-content h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.popup-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 13px;
}

.popup-label {
    color: #666;
}

.popup-value {
    font-weight: 500;
    color: #333;
}

/* Responsive */
@media (max-width: 600px) {
    .gps-tracker-map {
        height: 350px;
    }
    
    .gps-tracker-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .stat-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .stat-label {
        margin-bottom: 0;
    }
}
