/* GPX Track Viewer — Custom Styles */

/* Leaflet dark map tiles override */
.leaflet-tile {
    filter: brightness(0.85) saturate(0.9);
}

.leaflet-container {
    background: #0F111A;
}

/* Popup dark theme */
.leaflet-popup-content-wrapper {
    background: #1E2030;
    color: #e5e7eb;
    border: 1px solid #2E3250;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
}

.leaflet-popup-tip {
    background: #1E2030;
}

.leaflet-popup-close-button {
    color: #9ca3af !important;
}

.leaflet-popup-close-button:hover {
    color: #f3f4f6 !important;
}

/* Waypoint marker */
.wpt-marker {
    width: 26px;
    height: 26px;
    background: #7C3AED;
    border: 2px solid rgba(124, 58, 237, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 0 8px rgba(124, 58, 237, 0.6);
    transition: transform 0.2s;
    cursor: pointer;
}

.wpt-marker:hover {
    transform: scale(1.2);
}

/* Start/End markers */
.start-marker,
.end-marker {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.5);
}

.start-marker {
    background: #10B981;
}

.end-marker {
    background: #EF4444;
}

/* Stat card hover */
.stat-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Drop zone drag-over state */
.drag-over {
    border-color: #3B82F6 !important;
    background: rgba(59, 130, 246, 0.05) !important;
}

/* Toast animation */
#toast {
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive tables */
@media (max-width: 640px) {

    #map,
    #map-section>div:first-child {
        min-height: 320px !important;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #0F111A;
}

::-webkit-scrollbar-thumb {
    background: #2E3250;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3B4270;
}

/* Chart.js canvas */
canvas {
    display: block;
    width: 100% !important;
}