/* ── Support-Server changelog (CHANGELOG.md) ──
   Pops up once after an update, otherwise opened from the version marker. */

.srv-changelog {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.4);
}
.srv-changelog[hidden] { display: none !important; }

body.srv-changelog-open { overflow: hidden; }

.srv-changelog-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 640px;
    max-height: min(84vh, 760px);
    border-radius: 10px;
    background: var(--surface, #fff);
    color: var(--text, #111827);
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.18);
    overflow: hidden;
}

.srv-changelog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px 12px;
    border-bottom: 1px solid var(--border, #e5e7eb);
}
.srv-changelog-title { margin: 0; font-size: 1.05rem; font-weight: 600; }
.srv-changelog-sub {
    margin: 2px 0 0;
    color: var(--text-muted, #6b7280);
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
}
.srv-changelog-x {
    flex: none;
    border: 0;
    background: none;
    color: var(--text-muted, #6b7280);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    padding: 2px 4px;
}
.srv-changelog-x:hover { color: var(--text, #111827); }

.srv-changelog-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 6px 20px 14px;
    font-size: 0.88rem;
    line-height: 1.5;
}
.srv-changelog-release + .srv-changelog-release {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid var(--border, #e5e7eb);
}
.srv-changelog-release-title { margin: 10px 0 2px; font-size: 0.95rem; font-weight: 600; }
.srv-changelog-text { margin: 4px 0; }

/* Section kinds: colour per kind, shared by summary chips, labels and item markers. */
.srv-cl--new      { --cl: #047857; --cl-bg: #d1fae5; }
.srv-cl--changed  { --cl: #1d4ed8; --cl-bg: #dbeafe; }
.srv-cl--fixed    { --cl: #b45309; --cl-bg: #fef3c7; }
.srv-cl--security { --cl: #b91c1c; --cl-bg: #fee2e2; }
.srv-cl--removed  { --cl: #4b5563; --cl-bg: #e5e7eb; }
.srv-cl--other    { --cl: #4b5563; --cl-bg: #f3f4f6; }

.srv-cl-summary { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.srv-cl-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 9px 2px 7px;
    border-radius: 999px;
    background: var(--cl-bg);
    color: var(--cl);
    font-size: 0.74rem;
    font-weight: 700;
}
.srv-cl-chip svg { width: 12px; height: 12px; }

.srv-cl-section { margin-top: 14px; }
.srv-cl-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 6px;
    padding: 3px 10px 3px 8px;
    border-radius: 6px;
    background: var(--cl-bg);
    color: var(--cl);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.srv-cl-label svg { width: 13px; height: 13px; }

.srv-cl-list { margin: 0; padding: 0; list-style: none; }
.srv-cl-item {
    position: relative;
    margin: 0;
    padding: 6px 0 6px 16px;
    border-bottom: 1px solid var(--border, #f0f1f3);
}
.srv-cl-item:last-child { border-bottom: 0; }
.srv-cl-item::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 13px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cl);
}
.srv-cl-item ul { margin: 3px 0 0; padding-left: 16px; color: var(--text-muted, #4b5563); }
.srv-cl-item ul li { margin: 2px 0; }
.srv-cl-beta {
    display: inline-block;
    margin-right: 2px;
    padding: 0 6px;
    border-radius: 999px;
    background: #f3e8ff;
    color: #7e22ce;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    line-height: 1.6;
    vertical-align: 1px;
}
.srv-changelog-body code {
    padding: 0 4px;
    border-radius: 4px;
    background: var(--surface-muted, #f3f4f6);
    font-size: 0.85em;
}
.srv-changelog-body a { color: inherit; text-decoration: underline; }

.srv-changelog-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 20px;
    border-top: 1px solid var(--border, #e5e7eb);
}
.srv-changelog-hint { color: var(--text-muted, #6b7280); font-size: 0.75rem; }
.srv-changelog-ok {
    flex: none;
    padding: 6px 16px;
    border: 1px solid var(--border, #d4d4d8);
    border-radius: 6px;
    background: var(--surface, #fff);
    color: inherit;
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
}
.srv-changelog-ok:hover { background: var(--surface-muted, #f3f4f6); }

@media (max-width: 480px) {
    .srv-changelog-foot { flex-direction: column; align-items: stretch; }
}
