/* =========================================================================
   Response Roleplay — pages/changelog.css
   Vertical timeline with marker dots, version cards, grouped change lists.
   Pattern reused later for member history in the portal.
   ========================================================================= */

/* --- Filter chips (top of page) --------------------------------------- */

.changelog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 40px;
}
.changelog-filters .pill {
    cursor: pointer;
    transition: background-color 120ms ease, color 120ms ease;
}
.changelog-filters .pill.is-active {
    background: var(--rrp-text);
    color: var(--rrp-bg);
    box-shadow: none;
}
.changelog-filters .pill.is-active::before { background: var(--rrp-bg); }

/* --- Timeline shell --------------------------------------------------- */

.changelog-timeline {
    position: relative;
    padding-left: 36px;
}

/* The vertical rule running down the side */
.changelog-timeline::before {
    content: "";
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: 12px;
    width: 1px;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        var(--rrp-border) 40px,
        var(--rrp-border) calc(100% - 40px),
        transparent 100%
    );
}

/* --- Individual entry ------------------------------------------------- */

.changelog-entry {
    position: relative;
    padding-bottom: 36px;
}
.changelog-entry:last-child { padding-bottom: 0; }

/* Marker dot on the timeline */
.changelog-entry::before {
    content: "";
    position: absolute;
    left: -36px;
    top: 24px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--rrp-bg-elev);
    box-shadow:
        inset 0 0 0 2px var(--entry-color, var(--rrp-accent)),
        0 0 0 4px var(--rrp-bg),
        0 0 0 5px color-mix(in srgb, var(--entry-color, var(--rrp-accent)) 35%, transparent);
    z-index: 1;
}

/* Subtle inner dot for the marker */
.changelog-entry::after {
    content: "";
    position: absolute;
    left: -28px;
    top: 32px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--entry-color, var(--rrp-accent));
    z-index: 2;
}

/* The card holding the entry content */
.changelog-card {
    background: var(--rrp-glass);
    border-radius: var(--rrp-r-lg);
    padding: 22px 26px;
    box-shadow:
        inset 0 1px 0 0 rgba(255, 255, 255, 0.04),
        inset 0 0 0 1px var(--rrp-border-soft),
        var(--rrp-shadow-lift);
}

.changelog-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.changelog-version {
    font-family: var(--rrp-font-mono);
    font-size: 13px;
    color: var(--entry-color, var(--rrp-accent));
    padding: 3px 10px;
    border-radius: var(--rrp-r-sm);
    background: color-mix(in srgb, var(--entry-color, var(--rrp-accent)) 12%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--entry-color, var(--rrp-accent)) 30%, transparent);
}

.changelog-date {
    font-family: var(--rrp-font-mono);
    font-size: 13px;
    color: var(--rrp-text-dim);
}

.changelog-title {
    font-family: var(--rrp-font-display);
    font-size: 22px;
    letter-spacing: 1.5px;
    color: var(--rrp-text);
    text-transform: uppercase;
    margin-bottom: 10px;
    line-height: 1.2;
}

.changelog-body {
    color: var(--rrp-text-body);
    font-size: 15px;
    margin-bottom: 18px;
}
.changelog-body:last-child { margin-bottom: 0; }

/* --- Change groups (Added / Changed / Fixed / Removed) --------------- */

.changes-group { margin-bottom: 14px; }
.changes-group:last-child { margin-bottom: 0; }

.changes-group-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--rrp-font-display);
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--group-color, var(--rrp-text-dim));
    margin-bottom: 6px;
}
.changes-group-label::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.changes-group.is-added    { --group-color: var(--rrp-green);  }
.changes-group.is-changed  { --group-color: var(--rrp-blue);   }
.changes-group.is-fixed    { --group-color: var(--rrp-orange); }
.changes-group.is-removed  { --group-color: var(--rrp-accent); }

.changes-group ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.changes-group li {
    position: relative;
    padding-left: 18px;
    margin-bottom: 4px;
    color: var(--rrp-text-body);
    font-size: 14px;
    line-height: 1.5;
}
.changes-group li:last-child { margin-bottom: 0; }
.changes-group li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 9px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--group-color, var(--rrp-text-dim));
    opacity: 0.7;
}

/* --- Empty state (when filters yield nothing) ------------------------- */

.changelog-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--rrp-text-dim);
    font-size: 15px;
    display: none;
}
.changelog-timeline.is-empty .changelog-entry { display: none; }
.changelog-timeline.is-empty .changelog-empty { display: block; }

/* --- Responsive ------------------------------------------------------- */

@media (max-width: 540px) {
    .changelog-timeline { padding-left: 28px; }
    .changelog-timeline::before { left: 8px; }
    .changelog-entry::before { left: -28px; width: 20px; height: 20px; }
    .changelog-entry::after  { left: -22px; top: 30px; width: 6px; height: 6px; }
    .changelog-card { padding: 18px 20px; }
}
