/* ============================================
   Interactive Horizontal Timeline UI
   ============================================ */

/* Timeline Section */
.timeline-section {
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    padding: 30px 0;
    position: relative;
}

/* Context Bar - Top Info Display */
.timeline-context-bar {
    text-align: center;
    padding: 20px 20px;
    color: rgb(71, 5, 5);
    margin-bottom: 0;
}

.context-info {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.context-item {
    font-size: 1rem;
}

.context-item strong {
    color: #f1c152;
    margin-left: 5px;
}

.context-item span {
    color: black;
}

.context-divider {
    color: rgba(77, 0, 0, 0.5);
    margin: 0 5px;
}

/* Timeline Wrapper */
.timeline-wrapper {
    position: relative;
    background: #ffffffb3;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
}

/* Timeline Viewport */
.timeline-viewport {
    position: relative;
    overflow: hidden;
    height: 220px;
    background: #f8f9fa61;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.timeline-viewport:active {
    cursor: grabbing;
}

/* Timeline Strip - Horizontal Scrolling Container */
.timeline-strip {
    display: flex;
    align-items: flex-end;
    height: 100%;
    padding: 20px;
    padding-left: 50vw; /* Add left padding equal to half viewport width */
    padding-right: 50vw; /* Add right padding equal to half viewport width */
    gap: 20px;
    position: absolute;
    transition: transform 0.1s ease-out;
    will-change: transform;
}

/* Day Block - Event Card */
.day-block {
    min-width: 140px;
    background: #fff;
    border-radius: 14px;
    padding: 16px 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    border: 2px solid transparent;
    display: block;
}

.day-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Active/Centered Card */
.day-block.active {
    border-color: #f1c152;
    background: linear-gradient(to bottom, #fffbf0, #ffffff);
    box-shadow: 0 8px 25px rgba(241, 193, 82, 0.4);
    transform: scale(1.05);
}

.day-block strong {
    display: block;
    color: #212529;
    font-size: 1.05rem;
    line-height: 1.4;
    margin-bottom: 8px;
}

.day-block small {
    display: block;
    opacity: 0.6;
    font-size: 0.9rem;
    color: #6c757d;
}

/* Center Playhead Indicator */
.playhead {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    background: #f1c152;
    z-index: 10;
    pointer-events: none;
}

.playhead::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 10px solid #f1c152;
}

.playhead::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 10px solid #f1c152;
}

/* ============================================
   Mobile Responsive
   ============================================ */
@media (max-width: 768px) {
    .timeline-viewport {
        height: 180px;
    }
    
    .day-block {
        min-width: 110px;
        padding: 12px 10px;
    }
    
    .day-block strong {
        font-size: 0.85rem;
    }
    
    .day-block small {
        font-size: 0.75rem;
    }
    
    .context-info {
        flex-direction: column;
        gap: 5px;
    }
    
    .context-divider {
        display: none;
    }
    
    .context-item {
        font-size: 0.9rem;
    }

    .context-item {
        background: #fff3e1c7;
    }

}

/* ============================================
   RTL Support
   ============================================ */
[dir="rtl"] .timeline-strip {
    flex-direction: row-reverse;
}

[dir="rtl"] .playhead {
    left: auto;
    right: 50%;
    transform: translateX(50%);
}
