/* Deploy changelog page (mw-dcl-*) — release list sidebar + rendered markdown article.
   The article body typography comes from the shared .mw-content stylesheet; this file only
   handles the page layout and the release navigation chrome. */

/* NOTE: Version number at the bottom of the nav drawer — quiet easter egg link to the changelog
   page. Neutralize every anchor default so it looks identical to the plain caption; the pointer
   cursor is the only hint that it is clickable. */
.mw-dcl-version-egg {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.mw-dcl-layout {
    display: flex;
    gap: 12px;
    padding: 12px;
    box-sizing: border-box;
    /* NOTE: Same dense-appbar height math as the Entitlements page (mw-et-layout). */
    height: calc(100vh - var(--mud-appbar-height) + var(--mud-appbar-height) / 4);
}

/* NOTE: Release list sidebar */

.mw-dcl-sidebar {
    display: flex;
    flex-direction: column;
    flex: 0 0 240px;
    min-height: 0;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--mud-default-borderradius);
    background: var(--mud-palette-surface);
    overflow: hidden;
}

.mw-dcl-sidebar-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    color: var(--mud-palette-text-primary);
    font-weight: 600;
}

.mw-dcl-sidebar-count {
    margin-left: auto;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--mud-palette-background-gray);
    color: var(--mud-palette-text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
}

.mw-dcl-release-list {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 2px;
    min-height: 0;
    padding: 6px;
    overflow-y: auto;
}

.mw-dcl-release {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 7px 10px;
    border: none;
    border-radius: var(--mud-default-borderradius);
    background: transparent;
    color: var(--mud-palette-text-primary);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.mw-dcl-release:hover {
    background: var(--mud-palette-action-default-hover);
}

.mw-dcl-release-selected,
.mw-dcl-release-selected:hover {
    background: var(--mud-palette-primary-hover);
    color: var(--mud-palette-primary);
}

.mw-dcl-release-version {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.mw-dcl-release-date {
    color: var(--mud-palette-text-secondary);
    font-size: 0.75rem;
    white-space: nowrap;
}

/* NOTE: Rendered changelog article */

.mw-dcl-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    min-height: 0;
}

.mw-dcl-article-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--mud-default-borderradius);
    background: var(--mud-palette-surface);
}

.mw-dcl-article {
    max-width: 52rem;
    margin: 0 auto;
    padding: 24px 32px 48px;
}

.mw-dcl-article-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    font-size: 0.8rem;
}

.mw-dcl-meta-version {
    color: var(--mud-palette-primary);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.mw-dcl-meta-latest {
    padding: 1px 8px;
    border: 1px solid var(--mud-palette-success);
    border-radius: 999px;
    color: var(--mud-palette-success);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.mw-dcl-meta-file {
    margin-left: auto;
    color: var(--mud-palette-text-secondary);
    font-family: monospace;
    font-size: 0.75rem;
}

.mw-dcl-empty {
    display: flex;
    flex-direction: column;
    flex: 1;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--mud-palette-text-secondary);
}

/* NOTE: Narrow screens — release list collapses to a horizontal strip above the article. */
@media (max-width: 700px) {
    .mw-dcl-layout {
        flex-direction: column;
    }

    .mw-dcl-sidebar {
        flex: 0 0 auto;
    }

    .mw-dcl-release-list {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .mw-dcl-release {
        flex-direction: column;
        align-items: flex-start;
        width: auto;
        white-space: nowrap;
    }
}
