
.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

/* The nubo health logo, alone at the head of the sidebar with the app's name beside it in the top
   bar, or both in the top bar when there is no sidebar. The logo keeps its size and the name stays
   on one line, cut short with an ellipsis when it is too long for the space; the full name is the
   title. */
.brand {
    display: flex;
    align-items: center;
    min-width: 0;
    max-width: 100%;
}

.brand-logo {
    flex: none;
    height: 1.4rem;
    width: auto;
    margin-right: 0.6rem;
}

.brand-title {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notice {
    max-width: 48rem;
}

/* A chart from ReportChart. A chart of bars across is given the height of its rows by charts.js. */
.report-chart {
    max-width: 60rem;
    margin-bottom: 1rem;
}

app-chart {
    display: block;
    position: relative;
    height: 16rem;
}

/* A button at work, from BusyButton or js/progress.js. The wave takes the size of the button's text. */
.btn[aria-busy="true"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

    .btn[aria-busy="true"]:disabled {
        cursor: progress;
        opacity: 0.92;
    }

    .btn[aria-busy="true"] .nubo-wave {
        flex: none;
        width: 1.4em;
        height: 1.4em;
    }

.loading-note {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--bs-secondary-color);
}

/* While the browser waits for the next page. js/progress.js adds is-visible. It never takes a click:
   somebody who gives up waiting can still go somewhere else. */
.page-progress {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--bs-body-bg) 55%, transparent);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s;
}

    .page-progress.is-visible {
        opacity: 1;
        visibility: visible;
    }

.page-progress-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 1.75rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.75rem;
    background: var(--bs-body-bg);
    color: var(--bs-secondary-color);
    box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.15);
}

.session-bar {
    border-bottom: 1px solid var(--bs-border-color);
    padding-bottom: 0.5rem;
}

.patient-banner {
    border-bottom: 1px solid var(--bs-border-color);
    padding-bottom: 0.75rem;
}

/* Each fact stays whole when the line wraps in a narrow EHR frame. */
.patient-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.1rem 1.25rem;
}

.patient-facts > span {
    white-space: nowrap;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

/* ------------------------------------------------------------------------------------------------
   Conferences. Every colour is a theme.css variable.
   ------------------------------------------------------------------------------------------------ */

.page-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-heading h1 {
    margin-bottom: 0.25rem;
}

/* Status badges carry their text as well as their colour. */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid var(--app-border);
    background: var(--app-surface-sunken);
    color: var(--app-text-muted);
    white-space: nowrap;
}

.status-badge.status-ready { background: var(--app-surface-mint); color: var(--app-accent); border-color: var(--app-accent-line); }
.status-badge.status-live { background: var(--app-accent); color: var(--app-accent-contrast); border-color: var(--app-accent); }
.status-badge.status-review { background: var(--app-review-bg); color: var(--app-review-text); border-color: var(--app-review-border); }
.status-badge.status-error { background: transparent; color: var(--app-critical); border-color: var(--app-critical); }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat {
    padding: 1rem;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-lg);
    background: var(--app-surface);
    box-shadow: var(--app-shadow-sm);
}

.stat .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--app-text-muted);
}

.stat .value {
    font-size: 1.75rem;
    font-weight: 700;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.filter-bar a.active {
    border-color: var(--app-accent-line);
    background: var(--app-surface-mint);
    color: var(--app-accent);
}

.mono, .fhir-json, .audit-detail {
    font-family: var(--app-font-mono);
    font-size: 0.85rem;
}

/* The workflow steps across the top of every preparation page. */
.stepper {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem;
    font-size: 0.85rem;
}

.stepper li {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--app-text-muted);
}

.stepper .num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 50%;
    border: 1px solid var(--app-border-muted);
    font-size: 0.75rem;
    font-weight: 600;
}

.stepper li.done .num,
.stepper li.current .num {
    background: var(--app-accent);
    border-color: var(--app-accent);
    color: var(--app-accent-contrast);
}

.stepper li.current {
    color: var(--app-text);
    font-weight: 600;
}

.patient-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 1.25rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-lg);
    background: var(--app-surface-mint);
}

.patient-strip .name {
    font-weight: 700;
    font-size: 1.05rem;
}

/* A patient's conferences on a launch from a chart: three sections with a clear edge and heading, and
   rows a clinician can scan by date. The date, the title and the decision each have their own weight,
   so they do not read as one run of text. */
.conference-section {
    margin-bottom: 1.5rem;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-lg);
    background: var(--app-surface);
    box-shadow: var(--app-shadow-sm);
    overflow: hidden;
}

.conference-section > h2 {
    margin: 0;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--app-border);
    background: var(--app-surface-sunken);
    font-size: 1.125rem;
    font-weight: 700;
}

.conference-empty {
    margin: 0;
    padding: 1rem;
    color: var(--app-text-muted);
}

.conference-rows {
    list-style: none;
    margin: 0;
    padding: 0;
}

.conference-row {
    display: grid;
    grid-template-columns: 8.5rem minmax(0, 1fr) auto;
    gap: 0.25rem 1rem;
    align-items: start;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--app-border);
}

.conference-row:last-child {
    border-bottom: 0;
}

.conference-date .day,
.conference-date .time,
.conference-body .title,
.conference-body .meta,
.conference-decision {
    display: block;
}

.conference-date .day {
    font-weight: 600;
}

.conference-date .time,
.conference-body .meta {
    font-size: 0.875rem;
    color: var(--app-text-muted);
}

.conference-body .title {
    font-weight: 600;
}

.conference-decision {
    margin-top: 0.5rem;
    padding: 0.375rem 0.625rem;
    border-left: 3px solid var(--app-accent-line);
    background: var(--app-surface-mint);
}

.conference-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

.conference-actions .btn,
.conference-confirm .btn {
    min-height: 2.75rem;
    min-width: 5.5rem;
}

/* An action a row offers has to look like one. The style guide's neutral outline does not, here. */
.conference-actions .btn-outline-primary {
    --bs-btn-color: var(--app-accent);
    --bs-btn-border-color: var(--app-accent);
}

/* The question an action asks, on the row it is about. */
.conference-confirm {
    grid-column: 1 / -1;
    margin-top: 0.75rem;
    padding: 0.875rem 1rem;
    border: 1px solid var(--app-accent-line);
    border-left-width: 4px;
    border-radius: var(--app-radius);
    background: var(--app-surface-mint);
}

.conference-confirm.danger {
    border-color: var(--app-critical);
    background: var(--app-surface);
}

.conference-confirm p {
    margin-bottom: 0.75rem;
}

.conference-confirm .question {
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.conference-confirm .btn + .btn {
    margin-left: 0.5rem;
}

/* An EHR's frame can be narrow: the columns stack, and the action stays on its own line. */
@media (max-width: 575.98px) {
    .conference-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .conference-actions {
        justify-content: flex-start;
        margin-top: 0.5rem;
    }

    .conference-confirm .btn {
        display: block;
        width: 100%;
    }

    .conference-confirm .btn + .btn {
        margin: 0.5rem 0 0;
    }
}

/* Yellow means a human has to verify this. It is never dismissible. */
.review-banner {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    border: 1px solid var(--app-review-border);
    border-radius: var(--app-radius);
    background: var(--app-review-bg);
    color: var(--app-review-text);
    font-weight: 500;
}

.review-banner strong {
    white-space: nowrap;
}

.domain-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-lg);
    background: var(--app-surface);
}

.domain-card:has(input[type=checkbox]:checked) {
    border: 2px solid var(--app-accent-line);
    padding: calc(1rem - 1px);
    background: var(--app-surface-mint);
}

.domain-card .domain-body {
    flex: 1 1 16rem;
}

.domain-card .domain-body label {
    font-weight: 600;
}

.domain-card .lookback {
    flex: 0 0 auto;
    min-width: 9rem;
}

.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.split-wide {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 20rem;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 991.98px) {
    .split, .split-wide {
        grid-template-columns: minmax(0, 1fr);
    }
}

.summary-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1rem;
}

.summary-statement {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--app-border);
}

.summary-statement details summary {
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--app-accent);
}

.fhir-json {
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 22rem;
    overflow: auto;
    padding: 0.75rem;
    margin: 0.5rem 0 0;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    background: var(--app-surface-sunken);
    color: var(--app-text);
}

.item-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.item-list > li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--app-border);
}

.item-list .item-title {
    font-weight: 600;
}

.item-list .item-meta {
    font-size: 0.85rem;
    color: var(--app-text-muted);
}

.domain-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    border-bottom: 1px solid var(--app-border);
    margin-bottom: 1rem;
}

.domain-tabs a {
    padding: 0.5rem 0.75rem;
    border-bottom: 3px solid transparent;
    color: var(--app-text-muted);
    text-decoration: none;
    font-weight: 500;
}

.domain-tabs a[aria-current=page] {
    border-bottom-color: var(--app-accent-line);
    color: var(--app-accent);
    font-weight: 600;
}

.qr-code {
    width: min(22rem, 100%);
    padding: 0.5rem;
    background: #ffffff;
    border-radius: var(--app-radius-lg);
    border: 1px solid var(--app-border);
}

.qr-code svg {
    display: block;
    width: 100%;
    height: auto;
}

/* The live presentation: dark whatever the app's theme, large type, for a room display. */
.presentation {
    background: var(--app-surface);
    color: var(--app-text);
    border-radius: var(--app-radius-lg);
    overflow: hidden;
}

.presentation-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--app-surface-sunken);
    border-bottom: 1px solid var(--app-border);
}

.presentation-bar .name {
    font-size: 1.25rem;
    font-weight: 700;
}

.presentation-bar .meta {
    font-family: var(--app-font-mono);
    font-size: 0.85rem;
    color: var(--app-accent);
}

.presentation-bar .spacer {
    flex: 1;
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.2rem 0.7rem;
    border-radius: 9999px;
    background: var(--app-critical);
    color: #0f172a;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.presentation-body {
    display: grid;
    grid-template-columns: 15rem minmax(0, 1fr);
    min-height: 70vh;
}

@media (max-width: 767.98px) {
    .presentation-body {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* The patient shown, across the top of the live presentation, with the switcher between patients. */
.presentation-case-bar {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid var(--app-border);
}

.presentation-case-bar .name {
    font-size: 1.35rem;
    font-weight: 700;
}

.presentation-case-bar .meta {
    font-family: var(--app-font-mono);
    font-size: 0.9rem;
    color: var(--app-accent);
}

.presentation-cases {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.presentation-cases .form-select {
    width: auto;
    max-width: 100%;
}

.presentation-nav {
    padding: 1rem 0.5rem;
    background: var(--app-surface-sunken);
    border-right: 1px solid var(--app-border);
}

.presentation-nav a,
.presentation-nav .presentation-tab {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border-top: 0;
    border-right: 0;
    border-bottom: 0;
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.15rem;
    border-radius: var(--app-radius);
    border-left: 3px solid transparent;
    color: var(--app-text-muted);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 500;
}

.presentation-nav a[aria-current=page],
.presentation-nav .presentation-tab[aria-current=page] {
    background: var(--app-sidebar-active-bg);
    border-left-color: var(--app-accent-line);
    color: var(--app-accent);
    font-weight: 600;
}

/* The placeholder before the live tabs connect; hidden once they render after it. */
.presentation-loading {
    padding: 1.25rem 1.75rem;
    color: var(--app-text-muted);
    grid-column: 1 / -1;
}

.presentation-loading:not(:last-child) {
    display: none;
}

.presentation-main {
    padding: 1.25rem 1.75rem 1.75rem;
    font-size: 1.15rem;
}

.presentation-main h2 {
    font-size: 1.75rem;
}

.presentation-card {
    padding: 1rem 1.25rem;
    margin-bottom: 0.9rem;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-lg);
    background: var(--app-surface-sunken);
}

.presentation-card .title {
    font-weight: 600;
    font-size: 1.2rem;
}

.presentation-card .detail {
    font-family: var(--app-font-mono);
    font-size: 1rem;
    color: var(--app-text-muted);
}

.presentation-card .status {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--app-accent);
}

.presentation-controls {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--app-border);
}

.notes-pane {
    margin-top: 1.5rem;
    padding: 1rem;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-lg);
    background: var(--app-surface-sunken);
}

/* The session notes in the live presentation, under the patient on screen, across the full width. */
.presentation-body > .notes-pane {
    grid-column: 1 / -1;
}

.notes-pane summary {
    cursor: pointer;
    font-weight: 600;
}

/* Check-in: one large target on a phone. */
.checkin {
    max-width: 28rem;
    margin: 1rem auto;
    text-align: center;
}

.checkin .btn-lg {
    min-height: 3.5rem;
    width: 100%;
}

.chip {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 9999px;
    background: var(--app-surface-mint);
    color: var(--app-accent);
    font-size: 0.8rem;
    font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* The agenda's sortable column headings: links styled as headings. */
.sort-link {
    color: inherit;
    text-decoration: none;
}

.sort-link:hover,
.sort-link:focus-visible {
    text-decoration: underline;
}
