/**
 * ScooterCam Timelapse Player Styles
 * Mobile-first responsive design with optimized loading
 */

.scootercam-timelapse-container {
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.scootercam-controls {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px 8px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.scootercam-control-group {
    flex: 1;
    min-width: 150px;
    display: flex;
    flex-direction: column;
}

.scootercam-control-group label {
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.scootercam-select {
    padding: 10px;
    font-size: 15px;
    border: 2px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.scootercam-select:hover {
    border-color: #0073aa;
}

.scootercam-select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.scootercam-video-wrapper {
    background: #000;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
    position: relative;
    min-height: 300px;
}

.scootercam-video {
    display: block;
    max-width: 100%;
    height: auto;
}

.scootercam-video-info {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 15px;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#scootercam-status {
    font-weight: 600;
}

#scootercam-status.active::before {
    content: "● ";
    color: #ff4444;
    animation: pulse 2s infinite;
}

#scootercam-timestamp {
    color: #aaa;
    font-size: 12px;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.scootercam-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
}

.scootercam-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
}

/* Loading overlay */
.scootercam-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.scootercam-loading-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.scootercam-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.scootercam-loading-text {
    color: white;
    font-size: 16px;
    font-weight: 500;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .scootercam-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .scootercam-control-group {
        width: 100%;
        min-width: auto;
    }
    
    .scootercam-video-info {
        flex-direction: column;
        gap: 5px;
        align-items: flex-start;
    }
    
    .scootercam-video-wrapper {
        min-height: 200px;
    }
}

@media (max-width: 480px) {
    .scootercam-controls {
        padding: 10px;
    }
    
    .scootercam-select {
        font-size: 14px;
        padding: 8px;
    }
    
    .scootercam-control-group label {
        font-size: 12px;
    }
    
    .scootercam-spinner {
        width: 40px;
        height: 40px;
        border-width: 3px;
    }
    
    .scootercam-loading-text {
        font-size: 14px;
    }
}