/* changelog.css - Changelog page styles (APEX-inspired) */

/* ── Banner ── */
.changelog-banner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: linear-gradient(135deg, #eef9f3 0%, #f0faf5 100%);
    border: 1px solid #b8e0cc;
    border-left: 4px solid var(--eff-primary);
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 24px;
    font-size: 13px;
    color: #0f5132;
    line-height: 1.6;
    position: relative;
}
.changelog-banner > i {
    font-size: 20px;
    margin-top: 2px;
    flex-shrink: 0;
    opacity: 0.7;
}
.changelog-banner-sub {
    opacity: 0.75;
    font-size: 12px;
    margin-top: 2px;
    display: block;
}
.changelog-banner-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    font-size: 20px;
    color: #0f5132;
    cursor: pointer;
    opacity: 0.4;
    line-height: 1;
    padding: 0;
    transition: opacity 0.2s;
}
.changelog-banner-close:hover { opacity: 1; }

/* ── Header ── */
.changelog-header {
    margin-bottom: 24px;
}
.changelog-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 16px;
}
.changelog-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
}
.changelog-title i {
    color: var(--eff-primary);
    font-size: 20px;
}

/* ── Type Chips (pill filters) ── */
.changelog-type-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.cl-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 600;
    border: 1.5px solid #dee2e6;
    background: #fff;
    color: #555;
    cursor: pointer;
    transition: all 0.2s ease;
}
.cl-chip:hover {
    border-color: #adb5bd;
    background: #f8f9fa;
}
.cl-chip.active {
    background: #1a1a2e;
    color: #fff;
    border-color: #1a1a2e;
}
.cl-chip-count {
    background: rgba(0,0,0,0.07);
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
}
.cl-chip.active .cl-chip-count {
    background: rgba(255,255,255,0.2);
}

/* Type-specific chip styling (inactive = outlined, active = solid) */
.cl-type-feature-chip     { color: #198754; border-color: #b8e0cc; }
.cl-type-fix-chip         { color: #dc3545; border-color: #f5c2c7; }
.cl-type-enhancement-chip { color: #0d6efd; border-color: #b6d4fe; }
.cl-type-style-chip       { color: #6f42c1; border-color: #c8b6e2; }
.cl-type-performance-chip { color: #fd7e14; border-color: #fed8b1; }

.cl-type-feature-chip:hover     { background: #f0fdf4; border-color: #198754; }
.cl-type-fix-chip:hover         { background: #fef2f2; border-color: #dc3545; }
.cl-type-enhancement-chip:hover { background: #eff6ff; border-color: #0d6efd; }
.cl-type-style-chip:hover       { background: #f8f4ff; border-color: #6f42c1; }
.cl-type-performance-chip:hover { background: #fff8f0; border-color: #fd7e14; }

.cl-type-feature-chip.active     { background: #198754; border-color: #198754; color: #fff; }
.cl-type-fix-chip.active         { background: #dc3545; border-color: #dc3545; color: #fff; }
.cl-type-enhancement-chip.active { background: #0d6efd; border-color: #0d6efd; color: #fff; }
.cl-type-style-chip.active       { background: #6f42c1; border-color: #6f42c1; color: #fff; }
.cl-type-performance-chip.active { background: #fd7e14; border-color: #fd7e14; color: #fff; }

/* ── Filter Row ── */
.changelog-filter-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.changelog-select {
    padding: 8px 14px;
    border-radius: 8px;
    border: 1.5px solid #dee2e6;
    font-size: 13px;
    color: #333;
    background: #fff;
    cursor: pointer;
    min-width: 150px;
    outline: none;
    transition: border-color 0.2s;
}
.changelog-select:focus { border-color: var(--eff-primary); }
.changelog-search-wrapper {
    position: relative;
    flex: 1;
    min-width: 200px;
}
.changelog-search-wrapper i {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
    font-size: 13px;
    pointer-events: none;
}
.changelog-search {
    width: 100%;
    padding: 8px 14px 8px 36px;
    border-radius: 8px;
    border: 1.5px solid #dee2e6;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}
.changelog-search:focus { border-color: var(--eff-primary); }

/* ── Day Group ── */
.changelog-day-group {
    margin-bottom: 28px;
}
.changelog-day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: #f8f9fb;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    cursor: pointer;
    user-select: none;
    margin-bottom: 12px;
    transition: background 0.2s;
}
.changelog-day-header:hover {
    background: #f0f2f5;
}
.changelog-day-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.changelog-day-chevron {
    font-size: 12px;
    color: #6c757d;
    transition: transform 0.25s ease;
}
.changelog-day-group.collapsed .changelog-day-chevron {
    transform: rotate(-90deg);
}
.changelog-day-date {
    font-weight: 700;
    font-size: 14px;
    color: #1a1a2e;
}
.changelog-day-count {
    font-size: 12px;
    color: #6c757d;
    background: #e9ecef;
    padding: 2px 10px;
    border-radius: 12px;
    font-weight: 600;
}
.changelog-day-summary {
    display: flex;
    gap: 12px;
    font-size: 12px;
    font-weight: 600;
}
.changelog-day-summary .cl-summary-feature     { color: #198754; }
.changelog-day-summary .cl-summary-fix         { color: #dc3545; }
.changelog-day-summary .cl-summary-enhancement { color: #0d6efd; }
.changelog-day-summary .cl-summary-style       { color: #6f42c1; }
.changelog-day-summary .cl-summary-performance { color: #fd7e14; }

.changelog-day-entries {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.changelog-day-group.collapsed .changelog-day-entries {
    display: none;
}

/* ── Entry Card (APEX style with left accent border) ── */
.changelog-entry {
    background: #fff;
    border: 1px solid #e9ecef;
    border-left: 4px solid #e9ecef;
    border-radius: 0 10px 10px 0;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    margin-bottom: 8px;
}
.changelog-entry:last-child { margin-bottom: 0; }
.changelog-entry:hover {
    background: #fcfcfd;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.changelog-entry.expanded {
    box-shadow: 0 3px 16px rgba(0,0,0,0.06);
    background: #fff;
}

/* Left accent border by type */
.changelog-entry.cl-entry-feature     { border-left-color: #198754; }
.changelog-entry.cl-entry-fix         { border-left-color: #dc3545; }
.changelog-entry.cl-entry-enhancement { border-left-color: #0d6efd; }
.changelog-entry.cl-entry-style       { border-left-color: #6f42c1; }
.changelog-entry.cl-entry-performance { border-left-color: #fd7e14; }

/* Entry header row */
.changelog-entry-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.changelog-entry-badges {
    display: flex;
    align-items: center;
    gap: 8px;
}
.changelog-entry-chevron {
    font-size: 12px;
    color: #ccc;
    transition: transform 0.25s ease, color 0.2s;
}
.changelog-entry.expanded .changelog-entry-chevron {
    transform: rotate(180deg);
    color: var(--eff-primary);
}

/* Type badge (outlined style like APEX) */
.changelog-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.6px;
    border: 1.5px solid;
}
.cl-type-feature     { color: #198754; border-color: #198754; background: #f0fdf4; }
.cl-type-fix         { color: #dc3545; border-color: #dc3545; background: #fef2f2; }
.cl-type-enhancement { color: #0d6efd; border-color: #0d6efd; background: #eff6ff; }
.cl-type-style       { color: #6f42c1; border-color: #6f42c1; background: #f8f4ff; }
.cl-type-performance { color: #fd7e14; border-color: #fd7e14; background: #fff8f0; }
.cl-type-other       { color: #6c757d; border-color: #6c757d; background: #f5f5f5; }

/* Category tag */
.changelog-category-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 6px;
    border: 1px solid;
}
/* Category colors */
.changelog-category-tag[data-cat="UI"]          { color: #0d6efd; border-color: #b6d4fe; background: #eff6ff; }
.changelog-category-tag[data-cat="Security"]    { color: #dc3545; border-color: #f5c2c7; background: #fef2f2; }
.changelog-category-tag[data-cat="Claims"]      { color: #198754; border-color: #b8e0cc; background: #f0fdf4; }
.changelog-category-tag[data-cat="Dev Console"] { color: #6f42c1; border-color: #c8b6e2; background: #f8f4ff; }
.changelog-category-tag[data-cat="Infrastructure"] { color: #fd7e14; border-color: #fed8b1; background: #fff8f0; }
.changelog-category-tag[data-cat="Auth"]        { color: #d63384; border-color: #f0b6d3; background: #fdf2f8; }
.changelog-category-tag[data-cat="Navigation"]  { color: #0dcaf0; border-color: #b6effb; background: #f0fbff; }
.changelog-category-tag[data-cat="Dashboard"]   { color: #198754; border-color: #b8e0cc; background: #f0fdf4; }
.changelog-category-tag[data-cat="Data"]        { color: #fd7e14; border-color: #fed8b1; background: #fff8f0; }
/* Default (no match) */
.changelog-category-tag {
    color: #6c757d;
    border-color: #dee2e6;
    background: #f8f9fa;
}

/* Title + description */
.changelog-entry-title {
    font-size: 14.5px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 4px;
    line-height: 1.4;
}
.changelog-entry-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.55;
}

/* ── Expandable Detail ── */
.changelog-entry-detail {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.25s ease, margin 0.25s ease;
    margin-top: 0;
}
.changelog-entry.expanded .changelog-entry-detail {
    max-height: 800px;
    opacity: 1;
    margin-top: 16px;
}

/* Before / After comparison (APEX style with colored left bar) */
.changelog-before-after {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}
.changelog-ba {
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 12.5px;
    line-height: 1.55;
    border-left: 4px solid;
}
.changelog-before {
    background: #fef2f2;
    border-left-color: #dc3545;
    border-top: 1px solid #fecaca;
    border-right: 1px solid #fecaca;
    border-bottom: 1px solid #fecaca;
}
.changelog-after {
    background: #f0fdf4;
    border-left-color: #198754;
    border-top: 1px solid #bbf7d0;
    border-right: 1px solid #bbf7d0;
    border-bottom: 1px solid #bbf7d0;
}
.changelog-ba-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.6px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.changelog-before .changelog-ba-label { color: #dc3545; }
.changelog-after .changelog-ba-label  { color: #198754; }
.changelog-ba-text { color: #333; }

/* File chips */
.changelog-files {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 2px;
}
.changelog-file-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: #f0f4ff;
    border: 1px solid #d0daf0;
    border-radius: 6px;
    font-size: 11px;
    color: #4a6fa5;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    transition: background 0.15s;
}
.changelog-file-chip:hover {
    background: #e0ecff;
}

/* ── Empty State ── */
.changelog-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #adb5bd;
    text-align: center;
}
.changelog-empty i { font-size: 44px; margin-bottom: 14px; }
.changelog-empty p { font-size: 14px; margin: 0; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .changelog-title-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .changelog-filter-row { flex-direction: column; }
    .changelog-select,
    .changelog-search-wrapper {
        width: 100%;
        min-width: unset;
    }
    .changelog-before-after { grid-template-columns: 1fr; }
    .changelog-day-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .changelog-day-summary { padding-left: 22px; }
    .changelog-entry { padding: 14px 16px; }
}
