/* Generated diagnostic pages (/reference/diagnostics/bevelNNN/) and the index table.
   Linked by DocArticle (pages) and DiagnosticTable (index). Uses the tokens from site.css. */

/* ---------- Header meta row: severity, code ---------- */
.diag-code {
    list-style: none;
    margin: 0;
    padding: 0;
}

.diag-code code {
    font: 700 14px/20px var(--mono);
    letter-spacing: 0.04em;
    user-select: all;
}

.badge--error {
    background: var(--brick-tint);
}

.badge--error .icon {
    color: var(--brick);
}

.badge--warning {
    background: var(--accent-tint);
}

.badge--warning .icon {
    color: var(--warning);
}

/* ---------- Page body ---------- */
/* The example message is one long build-output line: wrap it instead of scrolling sideways. */
.prose .code-block[data-lang="text"] .code-block__pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.prose .code-block[data-lang="text"] .code-block__pre > code {
    white-space: inherit;
}

/* Related links: compact, wrapped chips instead of a bullet list. */
.prose h2#related + ul {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-2) var(--s-3);
    list-style: none;
    margin: var(--s-4) 0 0;
    padding: 0;
}

.prose h2#related + ul > li {
    margin: 0;
    padding: 0;
}

.prose h2#related + ul > li::marker {
    content: none;
}

.prose h2#related + ul a {
    display: inline-block;
    padding: 3px 10px;
    border: 2px solid var(--edge);
    background: var(--surface);
    font: 700 13px/18px var(--mono);
    text-decoration: none;
}

.prose h2#related + ul a:hover {
    background: var(--accent-tint);
}

/* ---------- Index table ---------- */
.diag-index {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.diag-index th, .diag-index td {
    text-align: left;
    vertical-align: baseline;
    padding: 8px 12px;
    border-bottom: 1px solid var(--line);
}

.diag-index thead th {
    border-bottom: 2px solid var(--edge);
    font: 700 13px/1.4 var(--mono);
}

.diag-index tbody th {
    white-space: nowrap;
    font-weight: 700;
}

.diag-index tbody th a {
    text-decoration: none;
}

.diag-index tbody tr:hover {
    background: var(--surface);
}

.diag-index__sev {
    font: 700 12px/1.4 var(--mono);
    padding: 1px 6px;
    border: 2px solid var(--edge);
    white-space: nowrap;
}

.diag-index__sev--error {
    background: var(--brick-tint);
}

.diag-index__sev--warning {
    background: var(--accent-tint);
}

.diag-index__title {
    display: block;
    font-weight: 700;
    text-decoration: none;
    background: none;
    color: var(--text);
}

.diag-index__title:hover {
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 3px;
}

.diag-index code {
    font-size: 0.85em;
}

.diag-index__summary {
    color: var(--muted);
}

@media (max-width: 640px) {
    .diag-index thead {
        display: none;
    }

    .diag-index, .diag-index tbody, .diag-index tr, .diag-index th, .diag-index td {
        display: block;
    }

    .diag-index tr {
        padding: var(--s-3) 0;
        border-bottom: 1px solid var(--line);
    }

    .diag-index th, .diag-index td {
        border: 0;
        padding: 2px 0;
    }
}
