/**
 * ChronoEye Timeline - Enhanced Video Navigation
 * Company Branding: Timeline with ChronoEye color palette
 * Primary: #387186, Accent: #55C4C7, Warning: #D4B119, Secondary: #A07553, Muted: #7D98B5
 */

/* ===== VIDEO PREVIEW SECTION ===== */
.video-preview {
    background: var(--card-bg, rgba(56, 113, 134, 0.1));
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color, rgba(56, 113, 134, 0.3));
}

.video-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(26, 32, 44, 0.6);
    border-radius: 12px;
    border: 1px solid var(--border-color, rgba(56, 113, 134, 0.3));
}

/* ===== ENHANCED TIMELINE SECTION ===== */
.enhanced-timeline {
    background: var(--card-bg, rgba(56, 113, 134, 0.1));
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color, rgba(56, 113, 134, 0.3));
}

.timeline-container {
    position: relative;
    height: 60px;
    background: rgba(26, 32, 44, 0.8);
    border-radius: 8px;
    cursor: pointer;
    margin: 1rem 0;
    border: 2px solid var(--border-color, rgba(56, 113, 134, 0.3));
    overflow: hidden;
}

.timeline-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue, #387186) 0%, var(--accent-teal, #55C4C7) 100%);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(56, 113, 134, 0.4);
}

.timeline-thumb {
    position: absolute;
    top: 50%;
    right: -8px;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background: var(--accent-teal, #55C4C7);
    border: 3px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.timeline-thumb:hover {
    transform: translateY(-50%) scale(1.2);
    box-shadow: 0 4px 12px rgba(85, 196, 199, 0.5);
}

/* ===== STEP MARKERS ===== */
#stepMarkers {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.step-marker {
    position: absolute;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--warning-gold, #D4B119);
    border-radius: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 0 8px rgba(212, 177, 25, 0.6);
    pointer-events: auto;
    cursor: pointer;
}

.step-marker:hover {
    width: 4px;
    box-shadow: 0 0 12px rgba(212, 177, 25, 0.8);
    transform: scaleY(1.05);
}

.step-marker.active {
    background: var(--accent-teal, #55C4C7);
    width: 4px;
    box-shadow: 0 0 12px rgba(85, 196, 199, 0.8);
    z-index: 10;
}

.step-marker.completed {
    background: rgba(85, 196, 199, 0.6);
    width: 3px;
}

.step-marker::before {
    content: attr(title);
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, 
        rgba(26, 32, 44, 0.95) 0%, 
        rgba(56, 113, 134, 0.3) 30%, 
        rgba(45, 55, 72, 0.8) 70%, 
        rgba(26, 32, 44, 0.95) 100%);
    backdrop-filter: blur(20px);
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    box-shadow: 0 8px 32px rgba(56, 113, 134, 0.4);
    border: 1px solid rgba(85, 196, 199, 0.3);
    z-index: 1000;
    max-width: 350px;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.step-marker:hover::before {
    opacity: 1;
}

.step-marker.active::before {
    background: linear-gradient(135deg, 
        rgba(85, 196, 199, 0.95) 0%, 
        rgba(56, 113, 134, 0.8) 50%, 
        rgba(85, 196, 199, 0.95) 100%);
    color: #ffffff;
    opacity: 1;
    border-color: var(--accent-teal, #55C4C7);
    box-shadow: 0 8px 32px rgba(85, 196, 199, 0.5);
}

/* ===== STEP NAVIGATION CONTROLS ===== */
.step-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(26, 32, 44, 0.6);
    border-radius: 12px;
    border: 1px solid var(--border-color, rgba(56, 113, 134, 0.3));
}

.step-nav-btn {
    background: linear-gradient(135deg, var(--primary-blue, #387186) 0%, var(--muted-blue, #7D98B5) 100%);
    color: #ffffff;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(56, 113, 134, 0.3);
}

.step-nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(56, 113, 134, 0.4);
    background: linear-gradient(135deg, var(--accent-teal, #55C4C7) 0%, var(--primary-blue, #387186) 100%);
}

.step-nav-btn:disabled {
    background: rgba(125, 152, 181, 0.3);
    color: var(--text-muted, #718096);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.current-step-info {
    flex: 1;
    text-align: center;
    color: var(--accent-teal, #55C4C7);
    font-weight: 500;
    font-size: 0.9rem;
    background: rgba(85, 196, 199, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(85, 196, 199, 0.3);
}

/* ===== KEYBOARD SHORTCUTS PANEL ===== */
.keyboard-shortcuts {
    background: rgba(26, 32, 44, 0.8);
    border: 1px solid var(--border-color, rgba(56, 113, 134, 0.3));
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
    backdrop-filter: blur(10px);
}

.keyboard-shortcuts h4 {
    color: var(--accent-teal, #55C4C7);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.shortcut-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(125, 152, 181, 0.2);
}

.shortcut-row:last-child {
    border-bottom: none;
}

.shortcut-row span:first-child {
    color: var(--text-secondary, #a0aec0);
    font-size: 0.9rem;
}

.shortcut-key {
    background: linear-gradient(135deg, var(--secondary-brown, #A07553) 0%, var(--muted-blue, #7D98B5) 100%);
    color: #ffffff;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ===== STEP MODE BUTTON STYLING ===== */
.step-mode-active {
    background: linear-gradient(135deg, var(--warning-gold) 0%, var(--secondary-brown) 100%) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(212, 177, 25, 0.4) !important;
    transform: translateY(-2px);
}

.step-mode-active:hover {
    background: linear-gradient(135deg, var(--secondary-brown) 0%, var(--warning-gold) 100%) !important;
    box-shadow: 0 6px 20px rgba(212, 177, 25, 0.5) !important;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .step-navigation {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .step-nav-btn {
        width: 100%;
        justify-content: center;
        padding: 1rem;
    }
    
    .current-step-info {
        order: -1;
        margin-bottom: 0.5rem;
    }
    
    .keyboard-shortcuts {
        padding: 1rem;
    }
    
    .shortcut-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .timeline-container {
        height: 50px;
    }
    
    .step-marker::before {
        font-size: 0.75rem;
        padding: 4px 8px;
        max-width: 250px;
        white-space: normal;
    }
}

/* ===== ANIMATION ENHANCEMENTS ===== */
@keyframes stepHighlight {
    0% {
        box-shadow: 0 0 8px rgba(85, 196, 199, 0.6);
    }
    50% {
        box-shadow: 0 0 20px rgba(85, 196, 199, 0.9);
    }
    100% {
        box-shadow: 0 0 8px rgba(85, 196, 199, 0.6);
    }
}

.step-marker.current {
    animation: stepHighlight 2s infinite;
}

/* ===== ACCESSIBILITY ENHANCEMENTS ===== */
.timeline-container:focus {
    outline: 2px solid var(--accent-teal, #55C4C7);
    outline-offset: 2px;
}

.step-nav-btn:focus {
    outline: 2px solid var(--accent-teal, #55C4C7);
    outline-offset: 2px;
}

/* ===== UTILITY CLASSES ===== */
.timeline-hidden {
    display: none !important;
}

.timeline-loading {
    opacity: 0.6;
    pointer-events: none;
}

.timeline-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid var(--accent-teal, #55C4C7);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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