/* timeline.css - Enhanced Timeline Styles for Trisha Paytas Baby Theory */

/* Enhanced Timeline Container */
#enhanced-timeline {
    margin: 60px 0;
    padding: 20px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

/* Timeline Header */
.timeline-header {
    text-align: center;
    margin-bottom: 30px;
}

.timeline-header h3 {
    font-size: 1.8rem;
    color: #ff6b6b;
    margin-bottom: 10px;
}

.timeline-header p {
    color: #666;
    max-width: 700px;
    margin: 0 auto;
}

/* Timeline Controls */
.timeline-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.view-toggle {
    display: flex;
    background-color: #f5f5f5;
    border-radius: 50px;
    overflow: hidden;
}

.view-toggle button {
    background: none;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
}

.view-toggle button.active {
    background-color: #ff6b6b;
    color: white;
}

.filter-options select {
    padding: 10px 15px;
    border-radius: 50px;
    border: 1px solid #ddd;
    font-family: 'Poppins', sans-serif;
    background-color: white;
    cursor: pointer;
    color: #333;
}

/* Timeline Views Container */
.timeline-views {
    position: relative;
    min-height: 400px;
}

.timeline-view {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.timeline-view.active {
    display: block;
    opacity: 1;
}

/* List View Styles */
#list-view {
    position: relative;
}

#list-view::after {
    content: '';
    position: absolute;
    width: 6px;
    background-color: #ff9a9e;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
    border-radius: 3px;
}

.timeline-item {
    padding: 15px 40px;
    position: relative;
    width: 50%;
    margin-bottom: 30px;
}

.timeline-item.left {
    left: 0;
}

.timeline-item.right {
    left: 50%;
}

.timeline-content {
    padding: 25px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 25px;
    right: -13px;
    background-color: white;
    border: 4px solid #ff9a9e;
    top: 25px;
    border-radius: 50%;
    z-index: 1;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.timeline-item.right::after {
    left: -13px;
}

.timeline-item:hover::after {
    transform: scale(1.2);
    background-color: #ff9a9e;
}

/* Timeline Content Elements */
.timeline-header h4 {
    margin-bottom: 10px;
    font-size: 1.3rem;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.event-tag {
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
}

.event-tag.death {
    background-color: #ffebee;
    color: #f44336;
}

.event-tag.health-scare {
    background-color: #fff8e1;
    color: #ffa000;
}

.timeline-dates {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 15px 0;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.date-item {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 120px;
}

.date-label {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 5px;
}

.date-value {
    font-weight: 600;
    color: #333;
}

.date-item.highlight {
    background-color: #fff0f0;
    padding: 8px;
    border-radius: 6px;
    border-left: 3px solid #ff6b6b;
}

.date-item.highlight .date-value {
    color: #ff6b6b;
    font-size: 1.1rem;
}

.timeline-description {
    margin: 15px 0;
    line-height: 1.6;
}

.timeline-image {
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
}

.timeline-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.timeline-image:hover img {
    transform: scale(1.03);
}

.timeline-stats {
    display: flex;
    justify-content: space-around;
    margin: 15px 0;
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #ff6b6b;
}

.stat-label {
    font-size: 0.8rem;
    color: #666;
}

.timeline-links {
    margin-top: 15px;
    text-align: center;
}

.media-link {
    display: inline-block;
    padding: 8px 20px;
    background-color: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.media-link:hover {
    background-color: #ff6b6b;
    color: white;
}

/* Chart View Styles */
#chart-view {
    height: 600px;
    padding: 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
}

#timeline-chart {
    width: 100%;
    height: 100%;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    #list-view::after {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    
    .timeline-item::after {
        left: 18px;
    }
    
    .timeline-item.left::after, .timeline-item.right::after {
        left: 18px;
    }
    
    .timeline-item.right {
        left: 0;
    }
    
    .timeline-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    #chart-view {
        height: 400px;
    }
}

/* Animation for Timeline Items */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.timeline-item.left {
    animation: fadeInLeft 0.8s ease forwards;
}

.timeline-item.right {
    animation: fadeInRight 0.8s ease forwards;
}

/* Staggered Animation Delay */
.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.3s; }
.timeline-item:nth-child(3) { animation-delay: 0.5s; }
.timeline-item:nth-child(4) { animation-delay: 0.7s; }
.timeline-item:nth-child(5) { animation-delay: 0.9s; }

/* Loading State */
.timeline-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.timeline-loading::after {
    content: "Loading timeline data...";
    color: #666;
    font-style: italic;
}

/* No Events State */
.no-events {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
} 