/* ========================================
   Changelog Module CSS
   Author: iNexxus (https://inexxus.com.br)
   Bootstrap 3 Compatible
======================================== */

/* ===== Admin Styles ===== */

.changelog-table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

.changelog-table .row-options a {
    margin-right: 10px;
}

.changelog-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 3px;
    color: white;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.changelog-module-tag {
    display: inline-block;
    padding: 2px 8px;
    background-color: #5bc0de;
    color: white;
    border-radius: 3px;
    font-size: 11px;
    margin-right: 5px;
    margin-bottom: 3px;
}

/* ===== Public Timeline Styles ===== */

.changelog-public-body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f8f9fa;
    color: #333;
}

/* Header */
.changelog-header {
    background: #fff;
    border-bottom: 3px solid #28a745;
    color: #333;
    padding: 60px 0;
    text-align: center;
}

.changelog-main-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #28a745;
}

.changelog-subtitle {
    font-size: 18px;
    color: #6c757d;
    margin-bottom: 0;
}

/* Environment Tabs */
.changelog-environment-tabs {
    background-color: white;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 0;
}

.changelog-tabs {
    border-bottom: 3px solid #e9ecef;
    margin-bottom: 0;
}

.changelog-tabs > li {
    margin-bottom: -3px;
}

.changelog-tabs > li > a {
    padding: 18px 25px;
    font-size: 15px;
    font-weight: 600;
    color: #6c757d;
    border: none;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.changelog-tabs > li > a:hover {
    background-color: #f8f9fa;
    border-color: transparent;
    color: #495057;
}

.changelog-tabs > li.active > a,
.changelog-tabs > li.active > a:hover,
.changelog-tabs > li.active > a:focus {
    background-color: transparent;
    border-color: transparent transparent #28a745 transparent;
    color: #28a745;
}

.changelog-tabs > li > a i {
    margin-right: 8px;
    font-size: 16px;
}

.changelog-tabs > li > a .badge {
    margin-left: 8px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

/* Tab content */
.tab-content {
    padding-top: 40px;
}

/* Filters (kept for search page) */
.changelog-filters {
    background-color: white;
    padding: 30px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

.changelog-filters .form-inline {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.changelog-filters .form-control {
    border-radius: 4px;
    border: 1px solid #ddd;
}

/* Timeline Container */
.changelog-timeline-container {
    padding: 40px 0;
    min-height: 400px;
}

/* Module Section */
.changelog-module-section {
    margin-bottom: 60px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    overflow: hidden;
}

.changelog-module-header {
    background: white;
    padding: 30px;
    border-bottom: 3px solid #e9ecef;
    margin-bottom: 20px;
}

.changelog-module-header-content {
    display: flex;
    align-items: center;
}

.changelog-module-name {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 5px 0;
    line-height: 1.2;
}

.changelog-module-description {
    font-size: 14px;
    color: #6c757d;
    margin: 0;
    line-height: 1.4;
}

/* Version Group */
.changelog-version-group {
    margin-bottom: 40px;
    padding: 0 30px 30px 30px;
}

.changelog-version-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.changelog-version-title {
    font-size: 22px;
    font-weight: 700;
    color: #495057;
    margin-bottom: 8px;
}

.changelog-version-date {
    font-size: 16px;
    color: #6c757d;
    margin: 0;
}

/* Timeline */
.changelog-timeline {
    position: relative;
    padding-left: 40px;
}

.changelog-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #28a745;
    border-radius: 2px;
}

/* Timeline Item */
.changelog-timeline-item {
    position: relative;
    margin-bottom: 40px;
    padding-left: 30px;
}

.changelog-timeline-marker {
    position: absolute;
    left: -25px;
    top: 8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #28a745;
    border: 4px solid white;
    box-shadow: 0 0 0 3px #28a745;
    z-index: 1;
}

.changelog-timeline-content {
    background-color: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 3px solid #28a745;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.changelog-timeline-content:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Entry Header */
.changelog-entry-header {
    margin-bottom: 15px;
}

.changelog-entry-badges {
    margin-bottom: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.changelog-module-badge {
    display: inline-block;
    padding: 6px 12px;
    background-color: #17a2b8;
    color: white;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}

.changelog-module-badge i {
    margin-right: 5px;
}

.changelog-entry-category {
    margin-bottom: 10px;
}

.changelog-entry-title {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    line-height: 1.3;
}

/* Entry Body */
.changelog-entry-body {
    margin-bottom: 20px;
    color: #555;
    font-size: 15px;
    line-height: 1.7;
}

/* Entry Modules */
.changelog-entry-modules {
    margin-bottom: 15px;
    padding: 10px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    font-size: 13px;
    color: #6c757d;
}

.changelog-entry-modules i {
    margin-right: 5px;
}

/* Entry Relations */
.changelog-entry-relation {
    margin: 10px 0;
    padding: 8px 12px;
    background-color: #f8f9fa;
    border-left: 3px solid #17a2b8;
    border-radius: 3px;
    font-size: 13px;
    color: #495057;
}

.changelog-entry-relation i {
    color: #17a2b8;
    margin-right: 6px;
}

.changelog-relation-label {
    font-weight: 500;
}

/* Entry Footer */
.changelog-entry-footer {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    font-size: 13px;
    color: #6c757d;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.changelog-entry-author,
.changelog-entry-date {
    display: inline-block;
    margin-right: 15px;
}

.changelog-entry-author i,
.changelog-entry-date i {
    margin-right: 5px;
}

/* Category Badges */
.changelog-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 8px;
    margin-bottom: 5px;
}

.changelog-badge i {
    margin-right: 4px;
}

/* Environment Badge Specific Styling */
.changelog-badge-environment {
    opacity: 0.95;
    font-size: 11px;
    padding: 5px 12px;
}

.changelog-badge-environment:hover {
    opacity: 1;
}

/* Module Tags */
.changelog-module-tag {
    display: inline-block;
    padding: 4px 10px;
    background-color: #e9ecef;
    color: #495057;
    border-radius: 3px;
    font-size: 12px;
    margin-right: 6px;
    margin-bottom: 4px;
    font-weight: 500;
}

/* Footer */
.changelog-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    color: #6c757d;
    padding: 30px 0;
    margin-top: 60px;
}

.changelog-footer p {
    margin: 5px 0;
}

.changelog-footer a {
    color: #28a745;
    text-decoration: none;
}

.changelog-footer a:hover {
    color: #1e7e34;
    text-decoration: underline;
}

/* Single Entry View */
.changelog-single-entry {
    background-color: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.changelog-single-version {
    margin: 20px 0;
}

.changelog-single-title {
    font-size: 36px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
}

.changelog-single-meta {
    margin-bottom: 25px;
    padding-bottom: 15px;
}

.changelog-single-content {
    margin: 30px 0;
}

.changelog-single-modules {
    margin: 20px 0;
}

.changelog-single-modules h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #2c3e50;
}

/* ===== Responsive Design ===== */

@media (max-width: 768px) {
    .changelog-main-title {
        font-size: 32px;
    }
    
    .changelog-subtitle {
        font-size: 16px;
    }
    
    /* Responsive tabs */
    .changelog-tabs {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .changelog-tabs > li {
        flex: 0 0 auto;
    }
    
    .changelog-tabs > li > a {
        padding: 15px 18px;
        font-size: 13px;
        white-space: nowrap;
    }
    
    .changelog-tabs > li > a span:not(.badge) {
        display: none;
    }
    
    .changelog-tabs > li > a i {
        margin-right: 4px;
        font-size: 18px;
    }
    
    .changelog-filters .form-inline {
        flex-direction: column;
    }
    
    .changelog-filters .form-group {
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 10px;
    }
    
    .changelog-filters .form-control {
        width: 100%;
    }
    
    .changelog-filters button {
        width: 100%;
    }
    
    .changelog-timeline {
        padding-left: 25px;
    }
    
    .changelog-timeline::before {
        left: 10px;
    }
    
    .changelog-timeline-marker {
        left: -20px;
        width: 16px;
        height: 16px;
    }
    
    .changelog-timeline-item {
        padding-left: 20px;
    }
    
    .changelog-entry-title {
        font-size: 20px;
    }
    
    .changelog-entry-footer {
        flex-direction: column;
    }
    
    .changelog-entry-author,
    .changelog-entry-date {
        margin-bottom: 5px;
    }
    
    .changelog-version-title {
        font-size: 18px;
    }
    
    .changelog-module-section {
        margin-bottom: 40px;
    }
    
    .changelog-module-header {
        padding: 20px;
    }
    
    .changelog-module-header-content {
        flex-direction: row;
    }
    
    .changelog-module-header-content i {
        font-size: 24px !important;
        margin-right: 12px !important;
    }
    
    .changelog-module-name {
        font-size: 22px;
    }
    
    .changelog-version-group {
        padding: 0 20px 20px 20px;
    }
    
    .changelog-single-entry {
        padding: 20px;
    }
    
    .changelog-single-title {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .changelog-header {
        padding: 40px 0;
    }
    
    .changelog-main-title {
        font-size: 28px;
    }
    
    .changelog-timeline-content {
        padding: 20px 15px;
    }
    
    .changelog-entry-title {
        font-size: 18px;
    }
}

/* ===== Animation ===== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.changelog-timeline-item {
    animation: fadeInUp 0.5s ease-out;
}

/* ===== Loading State ===== */

.changelog-loading {
    text-align: center;
    padding: 60px 20px;
}

.changelog-loading i {
    font-size: 48px;
    color: #28a745;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== Admin Panel Enhancements ===== */

.panel_s .changelog-stats {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin: 20px 0;
}

.changelog-stat-box {
    text-align: center;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-top: 3px solid #28a745;
    margin: 10px;
    flex: 1;
    min-width: 150px;
}

.changelog-stat-number {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
}

.changelog-stat-label {
    font-size: 14px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== Alert Customization ===== */

.changelog-alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.changelog-alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.changelog-alert-error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.changelog-alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

