/* timelineDetailView.css - Updated Timeline Detail View Styles */

.timeline-header {
    margin: 0;
    padding: 1rem;
    font-size: 2.2vh;
    padding-top: 0;
    padding-left: 0.5rem;
}



/* Main timeline detail view container */
.timeline-detail-view {
    
    padding: 0 1rem;
    background: #000;
    color: #fff;
}

/* Timeline container with vertical line */
.timeline-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    
    
}

/* Vertical timeline line - grey instead of purple */
.timeline-line {
    position: absolute;
    left: 33px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #66666655;
    z-index: 1;
}

body.light-mode .timeline-line {
    background: rgb(0,0,0,0.05);
}

/* Individual timeline items - only expansion is slow */
.timeline-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    margin-bottom: 10vh;
}

/* Slow transition only for expanding items */
.timeline-item.expanding {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Immediate transition for collapsing items */
.timeline-item.collapsing {
    transition: none;
}

/* Timeline timestamp (left side) - 30px width and centered */
.timeline-timestamp {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    text-align: right;
    font-size: 0.85rem;
    color: #999;
    font-weight: 500;
    padding-right: 1rem;
}

/* Timeline dot - grey instead of purple */
.timeline-dot {
    position: absolute;
    top: 50%;
    left: 30px;
    width: 8px;
    height: 8px;
    background: #666;
    border-radius: 50%;
    
    z-index: 2;
    transition: all 0.3s ease;
    transform: translateY(-50%);
}

/* .timeline-item.expanded .timeline-dot {
    background: #fff;
    
} */

/* Timeline cards - different transitions for expand/collapse */
.timeline-card {
    margin-left: 60px;
    background: rgba(20, 20, 30, 0.9);
    border-radius: 12px;
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

/* Slow transition only when expanding */
.timeline-item.expanding .timeline-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Immediate transition when collapsing */
.timeline-item.collapsing .timeline-card {
    transition: none;
}

.timeline-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(141, 4, 255, 0.3);
}

/* Purple flood fill effect for expanding cards */
.timeline-item.expanding .timeline-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: rgba(141, 4, 255, 1);
    animation: purple-flood-disappear 1.2s ease-out;
    z-index: 1;
    pointer-events: none;
}

@keyframes purple-flood-disappear {
    0% {
        opacity: 1;
        clip-path: inset(0 0 0 0);
    }
    30% {
        opacity: 1;
        clip-path: inset(0 0 0 0);
    }
    100% {
        opacity: 1;
        clip-path: inset(0 0 100% 0);
    }
}

/* Expanded timeline card - no border, no padding, 70% width */
.timeline-card.expanded {
    padding: 0;
    background: rgba(20, 20, 30, 0.95);
    min-height: 200px;
    width: calc(100vw - 100px);
}

/* Collapsed timeline card - 50% width */
.timeline-card.collapsed {
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    width: calc(100vw - 180px);
    border: 1px solid rgba(141, 4, 255, 0.3);
}

/* Image grid for expanded cards - rounded corners only top */
.timeline-image-grid {
    margin-bottom: 1rem;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    background: #1c0757;
}

/* Inherit the buildHeroImageGrid styles */
.timeline-image-grid .story-view-hero-image-grid {
    border-radius: 12px 12px 0 0;
    max-height: 40vh;
}

.timeline-image-grid .story-view-hero-image-grid img {
    border-radius: 0;
}

/* If no buildHeroImageGrid, use our fallback styles */
.timeline-image-grid:not(:has(.story-view-hero-image-grid)) {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    max-height: 150px;
}

.timeline-image-grid:not(:has(.story-view-hero-image-grid)) img {
    width: 100%;
    height: 50px;
    object-fit: cover;
}

/* Small image for collapsed cards */
.timeline-small-image {
    width: auto;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #1c0757;
}

.timeline-small-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Headlines */
.timeline-card-headline {
    font-size: 2.2vh;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 1rem;
    font-weight: 500;
    padding-left: 1rem;
    padding-right: 1rem;
}

.timeline-card-small-headline {
    font-size: 2vh;
    color: #ccc;
    line-height: 1.3;
    margin: 0;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Favicons */
.timeline-favicons {
    margin: 0.5rem 0;
}

.timeline-favicons .story-view-hero-favicons {
    padding: 0;
    margin: 0;
    height: auto;
    justify-content: flex-start;
}

/* Favicons in expanded state - padding left only */
.timeline-card.expanded .timeline-favicons .story-view-hero-favicons {
    padding-left: 1rem;
}

.timeline-favicons .story-view-hero-favicon {
    width: 14px;
    height: 14px;
    margin-right: 4px;
}

.timeline-source-text {
    font-size: 0.75rem;
    color: #8d04ff;
    font-weight: 500;
}

/* Bullet points for expanded cards */
.timeline-bullet-points {
    margin: 1rem;
    margin-left: 0;
    margin-bottom: 0;
}

.timeline-bullet-point {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #ccc;
}

.timeline-bullet-point .bullet {
    color: #8d04ff;
    font-weight: bold;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

/* Read full report button - full width, no border radius */
.timeline-read-button {
    background: linear-gradient(135deg, #8d04ff, #ff4081);
    border: none;
    border-radius: 0;
    color: white;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    /* margin-top: 1rem; */
    width: 100%;
    position: relative;
    overflow: hidden;
}

.timeline-read-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(141, 4, 255, 0.4);
}

.timeline-read-button:active {
    transform: translateY(0);
}

/* Responsive design */
@media (max-width: 768px) {
    .timeline-detail-view {
        padding: 1rem 0.5rem;
    }
    
    
    
    
    
    .timeline-timestamp {
        width: 25px;
        font-size: 0.75rem;
        padding-right: 0.5rem;
    }
    
    
    
    .timeline-card {
        margin-left: 45px;
    }
    
    .timeline-card.expanded {
        width: calc(100vw - 70px);
    }
    
    .timeline-card.collapsed {
        width: calc(100vw - 120px);
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    
}

/* Dark/Light mode compatibility */
body.light-mode .timeline-detail-view {
    background: #f6f3ff;
    color: #333;
}

body.light-mode .timeline-card {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    border: none;
}

body.light-mode .timeline-card.expanded {
    background: rgba(255, 255, 255, 0.98);
}

body.light-mode .timeline-timestamp {
    color: #666;
}

body.light-mode .timeline-card-small-headline {
    color: #555;
}

body.light-mode .timeline-bullet-point {
    color: #666;
}



/* Quick Summary section styles */
.timeline-summary-header {
    font-size: 0.9rem;
    color: #fff;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    padding: 0 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Facts list styles */
.timeline-facts-list {
    list-style: none;
    padding: 0;
    margin: 0 1rem 1.5rem 1rem;
}

.timeline-fact-item {
    margin-bottom: 0.75rem;
    padding-left: 1rem;
    position: relative;
    font-size: 0.85rem;
    line-height: 1.4;
    color: #ddd;
}

/* Custom bullet point */
.timeline-fact-item::before {
    content: '•';
    position: absolute;
    left: 0;
    top: 0;
    color: #8d04ff;
    font-weight: bold;
    font-size: 1rem;
}

/* Style for bold text within facts */
.timeline-fact-item b {
    color: #fff;
    font-weight: 600;
}
body.light-mode .timeline-fact-item,
body.light-mode .timeline-fact-item b,
body.light-mode .timeline-card-headline,
body.light-mode .timeline-summary-header {
    color:#333;

}

/* Last fact item - no bottom margin */
.timeline-fact-item:last-child {
    margin-bottom: 0;
}