/**
 * Timeline Component Styles
 * 
 * Styles for the high-performance timeline component including:
 * - Timeline container and layout
 * - Segment visualization
 * - Cursor and arrow indicators
 * - Ruler with time labels and tick marks
 * - Responsive design
 * 
 * @author Your Name
 * @version 1.0.0
 */

/* ============================================================================
   TIMELINE CONTAINER
   ============================================================================ */

.timeline-section {
    background: #2a2a2a;
    border-radius: 8px;
    padding: 20px;
    margin: 0; /* Remove margin to align to bottom */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    flex-shrink: 0; /* Prevent timeline from shrinking */
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    color: #fff;
}

.timeline-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.timeline-duration {
    font-size: 14px;
    color: #ccc;
    font-family: 'Courier New', monospace;
}

/* ============================================================================
   TIMELINE SCROLL CONTAINER
   ============================================================================ */

.timeline-scroll {
    position: relative;
    overflow-x: auto !important;
    overflow-y: hidden;
    background: #1a1a1a;
    border-radius: 6px;
    border: 1px solid #444;
    height: 120px;
    scrollbar-width: thin;
    scrollbar-color: #666 #1a1a1a;
    white-space: nowrap;
    max-width: 100%;
    min-width: 0;
}

/* Custom scrollbar styles */
.timeline-scroll::-webkit-scrollbar {
    height: 8px;
}

.timeline-scroll::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 4px;
}

.timeline-scroll::-webkit-scrollbar-thumb {
    background: #666;
    border-radius: 4px;
}

.timeline-scroll::-webkit-scrollbar-thumb:hover {
    background: #888;
}

/* Focus states for accessibility */
.timeline-scroll:focus {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}

/* ============================================================================
   TIMELINE CONTENT
   ============================================================================ */

.timeline-container {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    min-width: 100%;
    flex-shrink: 0;
}

/* ============================================================================
   TIMELINE SEGMENTS
   ============================================================================ */

.timeline-segment {
    height: 80px;
    margin: 0 1px;
    border-radius: 3px;
    position: relative;
    flex-shrink: 0;
}

/* ============================================================================
   CURSOR AND ARROW INDICATORS
   ============================================================================ */

.timeline-cursor {
    position: absolute;
    top: 0;
    width: 4px;
    height: 100%;
    background: #ff4444;
    border-radius: 2px;
    box-shadow: 0 0 12px rgba(255, 68, 68, 0.8);
    z-index: 100;
    pointer-events: none;
    transition: left 0.1s ease;
}

.timeline-cursor::before {
    content: '';
    position: absolute;
    top: -6px;
    left: -3px;
    width: 10px;
    height: 10px;
    background: #ff4444;
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(255, 68, 68, 0.9);
}

.timeline-cursor::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: -3px;
    width: 10px;
    height: 10px;
    background: #ff4444;
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(255, 68, 68, 0.9);
}

.timeline-arrow {
    position: absolute;
    top: 0;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #ff4444;
    transform: translateX(-50%);
    z-index: 10;
    pointer-events: none;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

/* ============================================================================
   TIMELINE RULER AND LABELS
   ============================================================================ */

.timeline-labels {
    position: relative;
    height: 40px;
    margin-top: 12px;
    overflow: hidden;
    background: #1a1a1a;
    border-radius: 4px;
    border: 1px solid #444;
}

.timeline-labels-container {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Ruler line */
.timeline-ruler-line {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #4CAF50;
    z-index: 1;
}

/* Tick marks */
.timeline-tick {
    position: absolute;
    bottom: 0;
    width: 1px;
    background: #666;
    z-index: 2;
}

.timeline-tick.hour-tick {
    height: 16px;
    background: #4CAF50;
    width: 2px;
}

.timeline-tick.minute-tick {
    height: 12px;
    background: #666;
}

.timeline-tick.five-min-tick {
    height: 10px;
    background: #888;
    width: 1px;
}

.timeline-tick.one-min-tick {
    height: 6px;
    background: #555;
    width: 1px;
}

/* Labels */
.timeline-label {
    position: absolute;
    bottom: 18px;
    font-size: 11px;
    color: #999;
    font-family: 'Courier New', monospace;
    transform: translateX(-50%);
    white-space: nowrap;
    pointer-events: none;
    z-index: 3;
}

.timeline-label.hour-marker {
    color: #4CAF50;
    font-weight: bold;
    font-size: 12px;
    bottom: 20px;
}

.timeline-label.minute-marker {
    color: #ccc;
    font-size: 10px;
    bottom: 16px;
}

.timeline-label.frame-marker {
    color: #999;
    font-size: 10px;
    bottom: 16px;
}

/* ============================================================================
   EMPTY STATE
   ============================================================================ */

.timeline-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #666;
    font-size: 14px;
    text-align: center;
}

.timeline-empty .empty-icon {
    font-size: 24px;
    margin-bottom: 8px;
    opacity: 0.5;
}

.timeline-empty .empty-text {
    color: #888;
}

/* ============================================================================
   LOADING STATE
   ============================================================================ */

.timeline-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;
    color: #666;
    font-size: 14px;
}

.timeline-loading::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #444;
    border-top: 2px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

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

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 768px) {
    .timeline-section {
        padding: 12px;
        margin: 12px 0;
    }
    
    .timeline-scroll {
        height: 80px;
    }
    
    .timeline-segment {
        height: 60px;
    }
    
    .timeline-labels {
        height: 28px;
    }
    
    .timeline-label {
        font-size: 10px;
    }
    
    .timeline-label.hour-marker {
        font-size: 12px;
    }
    
    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
} 