/**
 * jQuery Timeline Plugin CSS
 * Optimized for TV display and 4K support
 */

.timeline-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    box-sizing: border-box;
}

.timeline-wrapper {
    width: 100%;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: #6c757d #e9ecef;
}

.timeline-wrapper::-webkit-scrollbar {
    height: 8px;
}

.timeline-wrapper::-webkit-scrollbar-track {
    background: #e9ecef;
    border-radius: 4px;
}

.timeline-wrapper::-webkit-scrollbar-thumb {
    background: #6c757d;
    border-radius: 4px;
}

.timeline-wrapper::-webkit-scrollbar-thumb:hover {
    background: #495057;
}

.timeline-track {
    display: flex;
    align-items: center;
    height: 100%;
    min-width: 100%;
    position: relative;
    padding: 20px 0;
}

.timeline-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007bff 0%, #28a745 50%, #ffc107 100%);
    border-radius: 2px;
    z-index: 1;
}

.timeline-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 30px;
    min-width: 200px;
    z-index: 2;
}

.timeline-date {
    background: #007bff;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 15px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.timeline-content {
    background: white;
    border: 2px solid #007bff;
    border-radius: 12px;
    padding: 15px;
    min-width: 180px;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #007bff;
}

.timeline-content::after {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
}

.timeline-releases {
    list-style: none;
    padding: 0;
    margin: 0;
}

.timeline-release {
    padding: 5px 0;
    border-bottom: 1px solid #e9ecef;
    font-size: 13px;
    color: #495057;
}

.timeline-release:last-child {
    border-bottom: none;
}

.timeline-release-name {
    font-weight: 600;
    color: #007bff;
}

.timeline-release-count {
    font-size: 12px;
    color: #6c757d;
    font-style: italic;
    margin-top: 5px;
}

.timeline-navigation {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 10px;
    z-index: 10;
}

.timeline-nav-btn {
    background: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.timeline-nav-btn:hover {
    background: #0056b3;
    transform: scale(1.1);
}

.timeline-nav-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

/* 4K Display Support */
@media screen and (min-width: 3800px) {
    .timeline-container {
        padding: 40px;
        border-radius: 16px;
    }
    
    .timeline-wrapper::-webkit-scrollbar {
        height: 16px;
    }
    
    .timeline-wrapper::-webkit-scrollbar-track,
    .timeline-wrapper::-webkit-scrollbar-thumb {
        border-radius: 8px;
    }
    
    .timeline-track {
        padding: 40px 0;
    }
    
    .timeline-line {
        height: 8px;
        border-radius: 4px;
    }
    
    .timeline-item {
        margin: 0 60px;
        min-width: 400px;
    }
    
    .timeline-date {
        padding: 16px 32px;
        border-radius: 40px;
        font-size: 28px;
        margin-bottom: 30px;
    }
    
    .timeline-content {
        border-radius: 24px;
        padding: 30px;
        min-width: 360px;
        max-width: 600px;
    }
    
    .timeline-content::before {
        top: -20px;
        border-left-width: 20px;
        border-right-width: 20px;
        border-bottom-width: 20px;
    }
    
    .timeline-content::after {
        top: -16px;
        border-left-width: 16px;
        border-right-width: 16px;
        border-bottom-width: 16px;
    }
    
    .timeline-release {
        padding: 10px 0;
        font-size: 26px;
    }
    
    .timeline-release-count {
        font-size: 24px;
        margin-top: 10px;
    }
    
    .timeline-navigation {
        top: 20px;
        right: 20px;
        gap: 20px;
    }
    
    .timeline-nav-btn {
        width: 80px;
        height: 80px;
        font-size: 32px;
        border-radius: 50%;
    }
}

/* Animation for smooth scrolling */
.timeline-wrapper.smooth-scroll {
    scroll-behavior: smooth;
}

/* Loading state */
.timeline-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 18px;
    color: #6c757d;
}

.timeline-loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #e9ecef;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: timeline-spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes timeline-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error state */
.timeline-error {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #dc3545;
    font-size: 16px;
}

/* Empty state */
.timeline-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #6c757d;
    font-size: 16px;
}

/* Release-specific styling */
.timeline-release-version {
    font-size: 11px;
    color: #28a745;
    font-weight: 500;
    margin-top: 2px;
}

.timeline-content .timeline-releases {
    max-height: 200px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #dee2e6 transparent;
}

.timeline-content .timeline-releases::-webkit-scrollbar {
    width: 4px;
}

.timeline-content .timeline-releases::-webkit-scrollbar-track {
    background: transparent;
}

.timeline-content .timeline-releases::-webkit-scrollbar-thumb {
    background: #dee2e6;
    border-radius: 2px;
}

/* Date-based grouping enhancements */
.timeline-date.today {
    background: #28a745;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.timeline-date.upcoming {
    background: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.timeline-date.past {
    background: #6c757d;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

/* Smooth scrolling enhancements */
.timeline-wrapper.smooth-scroll {
    scroll-behavior: smooth;
}

.timeline-wrapper.auto-scroll {
    animation: timeline-auto-scroll 30s linear infinite;
}

@keyframes timeline-auto-scroll {
    0% { scroll-left: 0; }
    50% { scroll-left: 50%; }
    100% { scroll-left: 0; }
}

/* Navigation enhancements */
.timeline-navigation.enhanced {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 25px;
    padding: 5px;
    backdrop-filter: blur(10px);
}

.timeline-nav-btn.enhanced {
    transition: all 0.2s ease;
}

.timeline-nav-btn.enhanced:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

/* Release data display enhancements */
.timeline-release-project {
    font-size: 10px;
    color: #6c757d;
    font-weight: 400;
    margin-left: 5px;
}

.timeline-release-date {
    font-size: 10px;
    color: #17a2b8;
    font-style: italic;
    margin-top: 2px;
}

.timeline-release.priority-high {
    border-left: 3px solid #dc3545;
    padding-left: 8px;
}

.timeline-release.priority-medium {
    border-left: 3px solid #ffc107;
    padding-left: 8px;
}

.timeline-release.priority-low {
    border-left: 3px solid #28a745;
    padding-left: 8px;
}

/* TV display optimizations */
@media screen and (min-width: 1920px) {
    .timeline-container {
        font-size: 16px;
    }
    
    .timeline-date {
        font-size: 16px;
        padding: 10px 20px;
    }
    
    .timeline-release {
        font-size: 15px;
        padding: 8px 0;
    }
    
    .timeline-release-count {
        font-size: 14px;
    }
}

/* 4K Display enhancements */
@media screen and (min-width: 3800px) {
    .timeline-release-version {
        font-size: 22px;
        margin-top: 4px;
    }
    
    .timeline-release-project {
        font-size: 20px;
        margin-left: 10px;
    }
    
    .timeline-release-date {
        font-size: 20px;
        margin-top: 4px;
    }
    
    .timeline-content .timeline-releases {
        max-height: 400px;
    }
    
    .timeline-content .timeline-releases::-webkit-scrollbar {
        width: 8px;
    }
    
    .timeline-navigation.enhanced {
        border-radius: 50px;
        padding: 10px;
    }
}