/**
 * Timeline Enhancement Styles
 * Styling for the interactive features of the Ancient History timeline
 */

/* Search & Filter Container */
.search-container {
    background-color: rgba(36, 26, 16, 0.8);
    border: 1px solid #ba9b37;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem auto;
    max-width: 800px;
    box-shadow: 0 0 15px rgba(186, 155, 55, 0.3);
}

.search-box {
    display: flex;
    margin-bottom: 1rem;
}

#timeline-search {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 1px solid #ba9b37;
    background-color: rgba(36, 26, 16, 0.9);
    color: #d4af37;
    border-radius: 4px 0 0 4px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
}

#timeline-search::placeholder {
    color: rgba(212, 175, 55, 0.6);
}

#search-button {
    padding: 0.8rem 1.5rem;
    background-color: #ba9b37;
    color: #241a10;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    font-weight: bold;
    transition: all 0.3s ease;
}

#search-button:hover {
    background-color: #d4af37;
}

.filter-options {
    display: flex;
    gap: 1rem;
}

#era-filter {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 1px solid #ba9b37;
    background-color: rgba(36, 26, 16, 0.9);
    color: #d4af37;
    border-radius: 4px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    cursor: pointer;
}

#era-filter option {
    background-color: #241a10;
}

#reset-filters {
    padding: 0.8rem 1.5rem;
    background-color: rgba(186, 155, 55, 0.3);
    color: #d4af37;
    border: 1px solid #ba9b37;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    transition: all 0.3s ease;
}

#reset-filters:hover {
    background-color: rgba(186, 155, 55, 0.5);
}

/* No Results Message */
.no-results {
    text-align: center;
    padding: 2rem;
    font-size: 1.3rem;
    color: #d4af37;
    font-style: italic;
    border: 1px dashed #ba9b37;
    border-radius: 8px;
    margin: 2rem auto;
    max-width: 600px;
}

/* Timeline Navigation */
.timeline-navigation {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 100;
}

.nav-arrow {
    width: 40px;
    height: 40px;
    background-color: rgba(186, 155, 55, 0.8);
    color: #241a10;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    margin: 0.5rem 0;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.nav-arrow:hover {
    background-color: #d4af37;
    transform: scale(1.1);
}

.nav-progress {
    height: 100px;
    width: 4px;
    background-color: rgba(186, 155, 55, 0.3);
    border-radius: 2px;
    margin: 0.5rem 0;
    position: relative;
    overflow: hidden;
}

.progress-bar {
    position: absolute;
    bottom: 0;
    width: 100%;
    background-color: #d4af37;
    height: 0%;
    transition: height 0.2s ease;
}

/* Styles for Younger Dryas Impact Hover Image */
.timeline-item .content {
    position: relative; /* Ensure parent has relative position for absolute child */
    overflow: hidden; /* Optional: Prevents image overflow if needed */
}

.impact-hover-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover the area, might crop */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out, visibility 0s 0.5s, transform 0.5s ease-in-out;
    transform: scale(0.95); /* Slightly scale down initially */
    z-index: 5; /* Ensure it appears above the text */
    pointer-events: none; /* Prevent image from interfering with text hover */
}

.timeline-item.theoretical:hover .impact-hover-image {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease-in-out, visibility 0s 0s, transform 0.5s ease-in-out;
    transform: scale(1); /* Scale to normal size on hover */
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .search-box {
        flex-direction: column;
    }
    
    #timeline-search {
        border-radius: 4px 4px 0 0;
        margin-bottom: 0.5rem;
    }
    
    #search-button {
        border-radius: 0 0 4px 4px;
    }
    
    .filter-options {
        flex-direction: column;
    }
    
    .timeline-navigation {
        right: 10px;
    }
    
    .nav-arrow {
        width: 30px;
        height: 30px;
        font-size: 1.2rem;
    }
    
    .nav-progress {
        height: 80px;
    }
}

/* Animation for search results */
@keyframes highlightResult {
    0% { background-color: rgba(212, 175, 55, 0.3); }
    100% { background-color: transparent; }
}

.highlight-result {
    animation: highlightResult 2s ease;
}