/* ============================================================================
   DECK CHANGELOG
============================================================================ */

.deck-changelog-section {
    margin-top: 1.5rem;
}

.deck-changelog-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.deck-changelog-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--ps-gold-2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.deck-changelog-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}


/* ── Entry Card ── */

.changelog-entry {
    background: #2a2a2a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
}

.changelog-entry-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}

.changelog-entry-header:hover {
    background: rgba(255, 255, 255, 0.04);
}

.changelog-date {
    font-size: 13px;
    font-weight: 600;
    color: #e0e0e0;
    white-space: nowrap;
}

.changelog-summary {
    font-size: 12px;
    color: #999;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.changelog-expand-arrow {
    font-size: 12px;
    color: #888;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.changelog-expand-arrow.expanded {
    transform: rotate(180deg);
}


/* ── Entry Body ── */

.changelog-entry-body {
    display: none;
    padding: 0 16px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.changelog-section-label {
    font-size: 11px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 12px;
    margin-bottom: 6px;
}

.changelog-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.changelog-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 13px;
}

.changelog-card-img {
    width: 28px;
    height: 40px;
    object-fit: cover;
    border-radius: 3px;
    flex-shrink: 0;
}

.changelog-card-name {
    color: #ddd;
}


/* ── Badges ── */

.changelog-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    flex-shrink: 0;
}

.changelog-badge.add {
    background: rgba(106, 191, 64, 0.15);
    color: #6abf40;
}

.changelog-badge.remove {
    background: rgba(224, 85, 85, 0.15);
    color: #e05555;
}

.changelog-badge.change {
    background: rgba(218, 165, 32, 0.15);
    color: var(--ps-gold-2);
}


/* ── Day Group (multi-edit days) ── */

.changelog-day-group {
    background: #2a2a2a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
}

.changelog-day-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}

.changelog-day-header:hover {
    background: rgba(255, 255, 255, 0.04);
}

.changelog-day-count {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: rgba(218, 165, 32, 0.15);
    color: var(--ps-gold-2);
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    flex-shrink: 0;
}

.changelog-day-body {
    display: none;
    padding: 6px 12px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.changelog-sub-entry + .changelog-sub-entry {
    margin-top: 6px;
}

/* Sub-entries inside a day group: lighter background, time instead of date. */
.changelog-sub-entry {
    background: #232323;
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    overflow: hidden;
}

.changelog-sub-entry .changelog-entry-header {
    padding: 8px 12px;
}

.changelog-sub-entry .changelog-entry-body {
    padding: 0 12px 10px;
}

.changelog-time {
    font-size: 12px;
    font-weight: 600;
    color: #c0c0c0;
    white-space: nowrap;
}

/* ── Show more / hide ── */

.changelog-hidden {
    display: none !important;
}

.changelog-show-more {
    margin-top: 4px;
    padding: 10px 16px;
    background: transparent;
    border: 1px dashed rgba(218, 165, 32, 0.4);
    border-radius: 10px;
    color: var(--ps-gold-2);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s, border-color 0.15s;
}

.changelog-show-more:hover {
    background: rgba(218, 165, 32, 0.08);
    border-color: rgba(218, 165, 32, 0.7);
    border-style: solid;
}


/* ── Responsive ── */

@media (max-width: 768px) {
    .changelog-entry-header,
    .changelog-day-header {
        padding: 10px 12px;
        gap: 8px;
    }

    .changelog-entry-body {
        padding: 0 12px 12px;
    }

    .changelog-day-body {
        padding: 6px 10px 10px;
    }

    .changelog-sub-entry .changelog-entry-header {
        padding: 8px 10px;
    }

    .changelog-sub-entry .changelog-entry-body {
        padding: 0 10px 8px;
    }
}
