/* Observium Changelog - Unified Styles */

/* Reset and Base */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background: #f8fafc;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    /* padding: 2rem 1rem; */
}

/* Header Styles - Unified for all pages */
.header, .title-section {
    text-align: center;
    /*margin-bottom: 2rem;*/
    padding: 2rem 0;
}

.header h1, .title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1a202c;
}

.header h1 a {
    text-decoration: none;
    color: inherit;
}

.header h2, .subtitle {
    color: #64748b;
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 1rem;
}

.header h2 {
    font-size: 1.5rem;
}

/* Navigation - Unified button styles */
.nav-links {
    margin-top: 1.5rem;
}

.year-nav {
    margin-top: 1rem;
}

/* Primary buttons - development links and nav links */
.development-link, .nav-link {
    display: inline-block;
    background: #3182ce;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.development-link {
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-link {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.development-link:hover, .nav-link:hover {
    background: #2c5282;
}

.development-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Secondary buttons - back links */
.back-link {
    display: inline-block;
    margin-bottom: 1rem;
    padding: 0.5rem 1rem;
    background: #e2e8f0;
    color: #4a5568;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.back-link:hover {
    background: #cbd5e0;
}

/* Chart Styles */
.chart-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    padding: 2rem;
    margin-bottom: 3rem;
    text-align: center;
}

.chart-container h3 {
    color: #1a202c;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.chart-wrapper {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.chart-note {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 1rem;
}

/* Card Styles - Unified card design */
.commit-card, .release-card, .chart-container, .section, .summary, .year-item, .tab-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.chart-container, .summary {
    padding: 2rem;
    margin-bottom: 2rem;
}

.commit-card {
    border-left: 4px solid #3182ce;
}

.release-card {
    border-left: 4px solid #059669;
}

.year-item {
    transition: all 0.3s ease;
}

.year-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.commit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.commit-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0;
}

.commit-meta {
    color: #64748b;
    font-size: 0.875rem;
}

.commit-message {
    color: #4a5568;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #f7fafc;
    border-radius: 4px;
    border-left: 3px solid #cbd5e0;
}

.commit-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.added { 
    color: #059669; 
}

.removed { 
    color: #dc2626; 
}

.net-change { 
    color: #1f2937; 
}

/* File Display Styles */
.files-changed {
    background: #000;
    color: #fff;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
}

.files-header {
    background: #333;
    padding: 0.5rem 0.75rem;
    font-weight: 600;
    border-bottom: 1px solid #555;
}

.files-list {
    padding: 0.5rem;
}

.file-entry {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}


.file-path {
    flex: 1;
    color: #e5e7eb;
}

.file-stats {
    display: flex;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.lines-added { 
    color: #22c55e; 
}

.lines-removed { 
    color: #ef4444; 
}

.lines-unchanged { 
    color: #9ca3af; 
}

/* Trunk Commits Section */
.trunk-commits {
    /* background: #f8fafc;
    border-radius: 6px;
    padding: 1.5rem; */
    margin: 1.5rem 0;
}

.trunk-commits-header {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.trunk-commits ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.trunk-commits li {
    padding: 0.05rem 0;
}

.trunk-commits li:last-child {
    border-bottom: none;
}

.trunk-commits h6 {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin: 1.5rem 0 0.75rem 0;
    padding: 0.5rem 0;
    border-bottom: 1px solid #d1d5db;
}

.trunk-commits h6:first-child {
    margin-top: 0;
}

/* Section Headers - Unified across all content types */
.section h3, .chart-container h3, .commit-category h6, .trunk-commits-header {
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.trunk-commits h6 {
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
}

.section h3, .chart-container h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.chart-container h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.commit-category h6, .trunk-commits h6 {
    font-size: 1rem;
    color: #4a5568;
    margin-top: 1.5rem;
}

.commit-category h6 {
    color: #4a5568;
    margin-bottom: 1rem;
}

.trunk-commits-header {
    font-size: 1rem;
    color: #1f2937;
    border-bottom: 2px solid #e5e7eb;
}

.trunk-commits h6:first-child {
    margin-top: 0;
}

.commit-category {
    margin-bottom: 2rem;
}

/* Summary and Statistics - Unified layout styles */
.summary {
    display: flex;
    justify-content: space-around;
}

.summary-item, .stat-group, .stat-item {
    text-align: center;
}

.summary-item strong, .stat-value, .stat-number {
    display: block;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 0.25rem;
}

.summary-item strong {
    font-size: 1.5rem;
}

.stat-number {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.1rem;
}

.summary-item small, .stat-desc, .stat-label {
    color: #64748b;
    font-size: 0.875rem;
}

.stat-desc {
    margin-top: 0.25rem;
}

.stat-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Layout Grids and Flexbox - Unified spacing */
.years-list {
    display: grid;
    /* gap: 1rem; */
    margin-bottom: 2rem;
}

.year-stats, .stat-values {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.stat-values {
    gap: 3rem;
    justify-content: center;
    margin: 0;
}

/* Links - Unified link styling */
.year-link {
    font-size: 1.5rem;
    font-weight: 700;
    color: #3182ce;
    text-decoration: none;
    display: block;
    margin-bottom: 0.75rem;
    transition: color 0.2s;
}

.year-link:hover {
    color: #2c5282;
}

/* Badges - Unified badge styling */
.commits-badge, .releases-badge, .tag-badge {
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.commits-badge {
    background: #3b82f6;
}

.releases-badge {
    background: #10b981;
}

.tag-badge {
    border-radius: 4px;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    margin-left: 0.5rem;
    color: white;
    font-weight: 500;
}

/* Bootstrap color classes for tag badges */
.tag-badge.bg-success { background-color: #28a745; }
.tag-badge.bg-info { background-color: #17a2b8; }
.tag-badge.bg-danger { background-color: #dc3545; }
.tag-badge.bg-warning { background-color: #ffc107; color: #212529; }
.tag-badge.bg-primary { background-color: #007bff; }
.tag-badge.bg-secondary { background-color: #6c757d; }
.tag-badge.bg-dark { background-color: #343a40; }

/* Tag-based commit message color themes */
.commit-message.tag-major,
.commit-message.tag-add {
    background: rgba(40, 167, 69, 0.05);
    border-left: 3px solid #28a745;
}

.commit-message.tag-improve {
    background: rgba(23, 162, 184, 0.05);
    border-left: 3px solid #17a2b8;
}

.commit-message.tag-fix {
    background: rgba(220, 53, 69, 0.05);
    border-left: 3px solid #dc3545;
}

.commit-message.tag-css {
    background: rgba(0, 123, 255, 0.05);
    border-left: 3px solid #007bff;
}

.commit-message.tag-mibs,
.commit-message.tag-php8 {
    background: rgba(255, 193, 7, 0.05);
    border-left: 3px solid #ffc107;
}

.commit-message.tag-sql {
    background: rgba(52, 58, 64, 0.05);
    border-left: 3px solid #343a40;
}

.commit-message.tag-minor {
    background: rgba(108, 117, 125, 0.05);
    border-left: 3px solid #6c757d;
}

.no-releases {
    color: #9ca3af;
    font-size: 0.9rem;
}

/* Tab Navigation - Year page specific but could be reused */
.tab-nav, .tabs {
    display: flex;
    background: white;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    border-bottom: none;
    margin-bottom: 0;
}

.tabs {
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
    border-radius: 0;
    box-shadow: none;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
}

.tab-nav a, .tab-button {
    flex: 1;
    padding: 1rem 1.5rem;
    text-align: center;
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.tab-button {
    padding: 0.75rem 1.5rem;
}

.tab-nav a:first-child {
    border-radius: 8px 0 0 0;
}

.tab-nav a:last-child {
    border-radius: 0 8px 0 0;
}

.tab-nav a:hover, .tab-button:hover {
    background: #f8fafc;
    color: #3182ce;
}

.tab-button:hover {
    background: none;
    color: #1a202c;
}

.tab-nav a.active, .tab-button.active {
    color: #3182ce;
    border-bottom-color: #3182ce;
    background: #f8fafc;
}

.tab-button.active {
    background: none;
}

.tab-content {
    border-radius: 0 0 8px 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    display: none;
}

.tab-content.hidden {
    display: none;
}

.tab-content.active {
    display: block !important;
}

/* Year Page Specific Styles */
.year-page .container {
    max-width: 1000px;
}

.year-page .back-link {
    color: #3182ce;
    font-weight: 500;
}

.year-page .back-link:hover {
    text-decoration: underline;
}

.year-page .title {
    font-size: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    padding: 1rem;
}

.stat-card h3 {
    color: #1a202c;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.file-section {
    margin-top: 1rem;
}

.file-header {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.file-list {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 0.75rem;
    background: #000;
    color: #fff;
    border-radius: 4px;
    padding: 0.5rem;
}

.file-entry {
    display: flex;
    align-items: center;
}

.file-action {
    display: inline-block;
    width: 12px;
    font-weight: bold;
    margin-right: 8px;
    text-align: center;
}

.file-action.A { color: #22c55e; } /* Green for Added */
.file-action.M { color: #fff; } /* White for Modified */
.file-action.D { color: #ef4444; } /* Red for Deleted */

.file-path {
    flex: 1;
    margin-right: 8px;
    color: #e5e7eb;
}

.file-stats {
    font-size: 0.7rem;
    color: #9ca3af;
    white-space: nowrap;
}

.file-stats .lines-added { color: #22c55e; }
.file-stats .lines-removed { color: #ef4444; }

.commit-stats {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
    color: #64748b;
    font-size: 0.875rem;
}

/* Utility Classes */
.no-data, .footer {
    text-align: center;
    color: #64748b;
}

.no-data {
    padding: 3rem;
}

.footer {
    padding: 2rem;
    border-top: 1px solid #e2e8f0;
    margin-top: 2rem;
}

.hidden-xl {
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .year-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .stat-values {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .tab-nav {
        flex-direction: column;
    }
    
    .tab-nav a {
        border-bottom: 1px solid #e2e8f0;
    }
    
    .tab-nav a:last-child {
        border-bottom: none;
    }
}

@media (min-width: 1200px) {
    .hidden-xl {
        display: none;
    }
}
