.imaging-study-viewer {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px 0;
    container: imaging-study / inline-size;
}

.imaging-study-viewer-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.imaging-study-viewer-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.imaging-study-viewer-meta {
    color: var(--ink-muted);
    font-size: 13px;
}

.imaging-study-viewer-status {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
}

/* The viewer beside a report is dark, and only the viewer. Like the embedded call,
   it re-points the palette tokens so the shared rules inside draw on the film ground. */
#akashic-health-records-patient-portal-root .imaging-study-viewer--pane {
    --surface: #1b1f27;
    --sunken: #22272e;
    --line: #2d3441;
    --ink: #c3cddc;
    --ink-strong: #e6ebf0;
    --ink-muted: #9aa7b4;
    --foreground: var(--ink);
    --background: var(--sunken);
    --muted-foreground: var(--ink-muted);
    --border: var(--line);
    padding: 10px;
    gap: 8px;
    background: #15181c;
    color: var(--ink);
    box-shadow: 2px 2px 3px rgba(31, 26, 20, 0.1);
    min-width: 0;
}

#akashic-health-records-patient-portal-root .imaging-pane__bar {
    display: flex;
    align-items: baseline;
    gap: 10px;
    min-width: 0;
    font-size: 11.5px;
    color: var(--ink-muted);
}

#akashic-health-records-patient-portal-root .imaging-pane__bar b {
    font-size: 12px;
    font-weight: 500;
    color: var(--ink-strong);
}

#akashic-health-records-patient-portal-root .imaging-pane__ref {
    margin-left: auto;
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink-muted);
}
