/* AIS Track Map Styles */

/* Reset and base styles */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
}

/* Map container */
#map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
}

/* Title styling (if needed in future) */
h2 {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: rgba(255, 255, 255, 0.8);
    padding: 6px 18px;
    border-radius: 8px;
    margin: 0;
    font-size: 1.5em;
}

/* Loading overlay */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.3s ease-out;
}

#loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Loading spinner */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e3f2fd;
    border-top: 4px solid #2196f3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Loading text */
.loading-text {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
    text-align: center;
}

.loading-progress {
    font-size: 14px;
    color: #666;
    text-align: center;
    min-height: 20px;
}

/* Time slider container */
#time-slider-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 16px 24px;
    z-index: 1000;
    min-width: 320px;
    max-width: 600px;
    width: auto;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.slider-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.slider-dates {
    font-size: 12px;
    color: #666;
    display: flex;
    gap: 8px;
    align-items: center;
}

.slider-wrapper {
    position: relative;
}

/* Custom range slider */
#time-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e3f2fd;
    outline: none;
    -webkit-appearance: none;
    margin-bottom: 12px;
    cursor: pointer;
}

#time-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #2196f3;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(33, 150, 243, 0.3);
    transition: all 0.2s ease;
}

#time-slider::-webkit-slider-thumb:hover {
    background: #1976d2;
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(33, 150, 243, 0.4);
}

#time-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #2196f3;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(33, 150, 243, 0.3);
    transition: all 0.2s ease;
}

#time-slider::-moz-range-thumb:hover {
    background: #1976d2;
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(33, 150, 243, 0.4);
}

.slider-track-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #666;
}

#visible-tracks-count {
    font-weight: 500;
}

.reset-btn {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 4px 12px;
    font-size: 11px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reset-btn:hover {
    background: #e3f2fd;
    border-color: #2196f3;
    color: #2196f3;
}

/* Responsive design for smaller screens */
@media (max-width: 480px) {
    #time-slider-container {
        bottom: 10px;
        left: 10px;
        right: 10px;
        transform: none;
        min-width: auto;
        max-width: none;
        width: auto;
    }
    
    .slider-header {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
}