/*
 * The examiner's surfaces (§11, Phase 5): a case page with its reports, evidence and decision form,
 * and an appeal page beside it. The queue pages reuse `admin-table` and `admin-pagination` from
 * tables.css; this file adds the blocks those tables do not cover.
 *
 * ### Reading a case is a vertical journey
 *
 * Header badges, then the reports with their evidence, then the decision log, then the controls — each
 * section separated by a border so an examiner scanning a long case can see where one part ends. The
 * decision form is deliberately the last block: nothing should be decided before the reports beneath it
 * have been read.
 *
 * ### Evidence is collapsed by default
 *
 * The evidence snapshot can be several lines of stored text; `<details>` keeps the report list scannable
 * and costs no script. The definition list inside reads key/value without a table's weight.
 */

.admin-case {
    max-width: 60rem;
}

.admin-case__header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-bottom: var(--space-3);
}

.admin-case__count {
    color: var(--colour-ink-quiet);
    font-size: var(--text-sm);
}

.admin-case__meta {
    color: var(--colour-ink-quiet);
    font-size: var(--text-sm);
}

.admin-case__section-title {
    margin-top: 0;
    font-size: var(--text-lg);
}

.admin-case__reports,
.admin-case__actions,
.admin-case__appeals,
.admin-case__controls {
    margin-top: var(--space-5);
    padding-top: var(--space-4);
    border-top: var(--border-width) solid var(--colour-border);
}

/* ---- One report inside a case -------------------------------------------------------------------- */

.admin-report {
    padding: var(--space-4);
    border: var(--border-width) solid var(--colour-border);
    border-radius: var(--radius-md);
    background: var(--colour-surface-sunken);
}

.admin-report + .admin-report {
    margin-top: var(--space-3);
}

.admin-report__header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-bottom: var(--space-2);
}

.admin-report__reporter {
    font-weight: var(--weight-medium);
}

.admin-report__date {
    margin-inline-start: auto;
    color: var(--colour-ink-quiet);
    font-size: var(--text-sm);
}

.admin-report__details {
    margin: 0;
    max-width: var(--measure);
}

.admin-report__evidence {
    margin-top: var(--space-3);
}

.admin-report__evidence summary {
    cursor: pointer;
    color: var(--colour-primary);
}

.admin-report__evidence-list {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: var(--space-1) var(--space-4);
    margin: var(--space-3) 0 0;
    padding: var(--space-3);
    border: var(--border-width) solid var(--colour-border);
    border-radius: var(--radius-sm);
    background: var(--colour-surface);
    font-size: var(--text-sm);
}

.admin-report__evidence-list dt {
    color: var(--colour-ink-quiet);
}

.admin-report__evidence-list dd {
    margin: 0;
    overflow-wrap: anywhere;
}

/* ---- Appeals listed on a case -------------------------------------------------------------------- */

.admin-case__appeal-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.admin-case__appeal-list li {
    padding: var(--space-2) 0;
    border-bottom: var(--border-width) solid var(--colour-border);
    color: var(--colour-ink-quiet);
    font-size: var(--text-sm);
}

/* ---- The controls -------------------------------------------------------------------------------- */

.admin-case__controls {
    display: grid;
    gap: var(--space-4);
}

.admin-case__controls form {
    margin: 0;
}

.admin-case__notes,
.admin-case__decision {
    display: grid;
    gap: var(--space-3);
    padding: var(--space-4);
    border: var(--border-width) solid var(--colour-border);
    border-radius: var(--radius-md);
    background: var(--colour-surface-sunken);
}

.admin-case__notes .admin-case__section-title,
.admin-case__decision .admin-case__section-title {
    margin-bottom: 0;
}

.admin-case__held {
    color: var(--colour-ink-quiet);
}

/* ---- Queue table additions ----------------------------------------------------------------------- */

/* A reason excerpt: long enough to judge urgency, short enough to keep the row one line. */
.admin-table__excerpt {
    max-width: 28rem;
    color: var(--colour-ink-quiet);
}

.admin-table__subtle {
    color: var(--colour-ink-faint);
    font-size: var(--text-sm);
}
