/* Changelog Page Styles */

.changelog-header {
    background: linear-gradient(135deg, var(--light-color) 0%, var(--subtle-bg-color) 100%);
    padding: 4rem 0 2rem;
    margin-bottom: 2rem;
}

/* Dark mode override for plain background */
:root.dark-theme .changelog-header,
:root.auto-dark-theme .changelog-header {
    background: var(--card-bg);
}

.changelog-timeline {
    position: relative;
    padding-left: 2rem;
}

.changelog-timeline::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    border-radius: 1px;
}

.changelog-entry {
    position: relative;
    margin-bottom: 3rem;
    display: flex;
    align-items: flex-start;
}

.timeline-marker {
    position: absolute;
    left: -2rem;
    top: 0.5rem;
    z-index: 2;
}

.timeline-dot {
    width: 1rem;
    height: 1rem;
    background: var(--primary-color);
    border-radius: 50%;
    border: 3px solid var(--card-bg);
    box-shadow: 0 0 0 2px var(--primary-color);
}

.changelog-card {
    flex: 1;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-speed) var(--transition-timing);
}

.changelog-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.changelog-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.changelog-title {
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    color: var(--bs-body-color);
    margin: 0;
    flex: 1;
    min-width: 0; /* Allow text to wrap */
}

.changelog-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.version-badge {
    background: var(--primary-color);
    color: var(--text-on-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: var(--font-size-sm);
    font-weight: 500;
    white-space: nowrap;
}

.publish-date {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    white-space: nowrap;
}

.changelog-content {
    color: var(--bs-body-color);
    line-height: var(--line-height-base);
}

.changelog-content h1,
.changelog-content h2,
.changelog-content h3,
.changelog-content h4,
.changelog-content h5,
.changelog-content h6 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--bs-body-color);
}

.changelog-content h1:first-child,
.changelog-content h2:first-child,
.changelog-content h3:first-child,
.changelog-content h4:first-child,
.changelog-content h5:first-child,
.changelog-content h6:first-child {
    margin-top: 0;
}

.changelog-content ul,
.changelog-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.changelog-content li {
    margin-bottom: 0.5rem;
}

.changelog-content p {
    margin-bottom: 1rem;
}

.changelog-content code {
    background: var(--light-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 0.125rem 0.25rem;
    font-size: 0.875em;
    color: var(--danger-color);
}

.changelog-content pre {
    background: var(--light-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.changelog-content pre code {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
}

.changelog-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    margin: 1rem 0;
    color: var(--text-muted);
    font-style: italic;
}

.changelog-content a {
    color: var(--primary-color);
    text-decoration: none;
}

.changelog-content a:hover {
    text-decoration: underline;
}

/* Category styling for structured content */
.changelog-content .changelog-section {
    margin-bottom: 1.5rem;
}

.changelog-content .changelog-section h4 {
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: var(--font-weight-bold);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.changelog-content .changelog-section.added h4 {
    color: var(--success-color);
}

.changelog-content .changelog-section.changed h4 {
    color: var(--warning-color);
}

.changelog-content .changelog-section.fixed h4 {
    color: var(--info-color);
}

.changelog-content .changelog-section.removed h4 {
    color: var(--danger-color);
}

/* Responsive design */
@media (max-width: 768px) {
    .changelog-header {
        padding: 2rem 0 1rem;
    }
    
    .changelog-timeline {
        padding-left: 1.5rem;
    }
    
    .changelog-timeline::before {
        left: 0.75rem;
    }
    
    .timeline-marker {
        left: -1.75rem;
    }
    
    .changelog-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .changelog-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .changelog-title {
        font-size: 1.25rem;
    }
    
    .changelog-card {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .changelog-timeline {
        padding-left: 0;
    }
    
    .changelog-timeline::before {
        display: none;
    }
    
    .timeline-marker {
        display: none;
    }
    
    .changelog-entry {
        margin-bottom: 2rem;
    }
}

/* Search form enhancements */
.changelog-search-form {
    background: var(--light-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

/* Animation for new entries */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.changelog-entry {
    animation: slideInUp 0.6s ease-out;
}

.changelog-entry:nth-child(n+2) {
    animation-delay: 0.1s;
}

.changelog-entry:nth-child(n+3) {
    animation-delay: 0.2s;
}

.changelog-entry:nth-child(n+4) {
    animation-delay: 0.3s;
}

