/* Enhanced Timeline Visualization Styles */

.enhanced-timeline-container {
    position: fixed;
    bottom: 80px;
    left: 0;
    right: 0;
    background: rgba(33, 37, 41, 0.85);
    padding: 8px 20px;
    z-index: 999;
    box-shadow: 0 -3px 15px rgba(0, 0, 0, 0.4);
    border-top: 2px solid rgba(255, 255, 255, 0.1);
}

.timeline-visualization {
    position: relative;
    height: 60px;
    margin: 5px 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 8px;
    overflow: hidden;
}

.timeline-visualization::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 0;
}

.timeline-track {
    position: absolute;
    top: 30px;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 2px;
    overflow: hidden;
    backdrop-filter: blur(2px);
    z-index: 1;
}

.timeline-markers {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    z-index: 2;
}

.timeline-marker {
    position: absolute;
    cursor: pointer;
    transition: all 0.2s ease;
}

.timeline-marker:hover {
    transform: scale(1.2);
    z-index: 10;
}

.marker-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #fff;
    background-color: #dc3545;
    position: relative;
    top: 26px;
}

.marker-dot.major {
    width: 16px;
    height: 16px;
    top: 24px;
    background-color: #0d6efd;
    box-shadow: 0 0 10px rgba(13, 110, 253, 0.5);
}

.marker-dot.start,
.marker-dot.end {
    width: 18px;
    height: 18px;
    top: 23px;
}

.marker-dot.start {
    background-color: #28a745;
    box-shadow: 0 0 12px rgba(40, 167, 69, 0.6);
}

.marker-dot.end {
    background-color: #ffc107;
    box-shadow: 0 0 12px rgba(255, 193, 7, 0.6);
}

.marker-label {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    color: #fff;
    white-space: nowrap;
    pointer-events: none;
    opacity: 1;
    transition: all 0.2s ease;
    text-align: center;
    background: rgba(0, 0, 0, 0.75);
    padding: 4px 8px;
    border-radius: 4px;
    min-width: 70px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.marker-year {
    font-weight: 700;
    color: #ffc107;
    font-size: 0.95rem;
    display: block;
}

.marker-number {
    display: none;
}

.marker-city {
    font-size: 0.6rem;
    color: #e9ecef;
    margin-top: 2px;
    display: block;
}

.marker-country {
    display: none;
}

.timeline-marker:hover .marker-label {
    transform: translateX(-50%) scale(1.05);
    background: rgba(0, 0, 0, 0.95);
}

.timeline-marker.active .marker-label {
    background: rgba(13, 110, 253, 0.95);
    font-weight: 700;
}

/* Emotion display removed per requirements */

.timeline-current-position {
    position: absolute;
    top: 23px;
    width: 3px;
    height: 14px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.3));
    z-index: 100;
    pointer-events: none;
    transition: left 0.3s ease;
}

.timeline-current-position::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid rgba(255, 255, 255, 0.9);
}

.timeline-current-info {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    color: #212529;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

.timeline-year-markers {
    position: absolute;
    top: 48px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
}

.year-marker {
    font-size: 0.8rem;
    color: #ffc107;
    font-weight: 700;
}

/* Emotion emojis removed per requirements */

/* Responsive adjustments */
@media (max-width: 768px) {
    .enhanced-timeline-container {
        bottom: 80px;
        padding: 6px 15px;
    }
    
    /* Mobile timeline in bottom panel */
    .mobile-timeline-container .timeline-visualization {
        height: 105px; /* Increased from 45px for larger dots and better spacing */
        margin: 0;
        border-radius: 6px;
    }
    
    .mobile-timeline-container .timeline-track {
        top: 52px; /* Adjusted for taller container */
    }
    
    /* Larger markers for easier mobile tapping */
    .mobile-timeline-container .marker-dot {
        width: 20px; /* Increased from 16px for better touch targets */
        height: 20px;
        top: 42px; /* Adjusted for new track position */
    }
    
    .mobile-timeline-container .marker-dot.major {
        width: 22px; /* Increased from 20px for consistency */
        height: 22px;
        top: 41px; /* Adjusted for new track position */
    }
    
    .mobile-timeline-container .marker-dot.start,
    .mobile-timeline-container .marker-dot.end {
        width: 24px; /* Increased from 22px for better prominence */
        height: 24px;
        top: 40px; /* Adjusted for new track position */
    }
    
    .mobile-timeline-container .marker-label {
        top: -38px; /* Adjusted slightly for new positioning */
        font-size: 0.6rem; /* Slightly increased for better readability */
        padding: 4px 8px; /* Increased padding for better touch targets */
        min-width: 65px; /* Slightly wider for better content fit */
    }
    
    .mobile-timeline-container .marker-year {
        font-size: 1rem; /* Increased from 0.85rem (16px for better prominence) */
        color: #ffc107;
        font-weight: 700;
    }
    
    .mobile-timeline-container .marker-city {
        font-size: 0.65rem; /* Increased from 0.5rem for better readability */
    }
    
    .mobile-timeline-container .timeline-year-markers {
        top: 75px; /* Adjusted for taller container and larger dots */
    }
    
    .mobile-timeline-container .year-marker {
        font-size: 0.875rem; /* Increased from 0.75rem for better readability */
        color: #ffc107;
        font-weight: 700;
    }
    
    .mobile-timeline-container .timeline-current-position {
        top: 42px; /* Adjusted to match marker-dot position */
    }
    
    /* Increase touch target area for timeline markers */
    .timeline-marker {
        padding: 10px;
        margin: -10px;
    }
    
    .marker-label {
        font-size: 0.55rem;
        padding: 3px 6px;
        min-width: 60px;
    }
    
    .marker-year {
        font-size: 0.85rem;
        color: #ffc107;
        font-weight: 700;
    }
    
    .marker-city {
        font-size: 0.55rem;
    }
    
    .timeline-year-markers {
        top: 40px;
    }
    
    .year-marker {
        font-size: 0.75rem;
        color: #ffc107;
        font-weight: 700;
    }
}

@media (max-width: 576px) {
    /* Extra large markers for small mobile screens */
    .marker-dot {
        width: 18px;
        height: 18px;
        top: 22px;
    }
    
    .marker-dot.major {
        width: 22px;
        height: 22px;
        top: 20px;
    }
    
    .marker-dot.start,
    .marker-dot.end {
        width: 26px;
        height: 26px;
        top: 18px;
    }
    
    /* Larger touch area for very small screens */
    .timeline-marker {
        padding: 12px;
        margin: -12px;
    }
}
