/*
 * DL/AI annotation severity palette.
 * Spec: docs/specs/2026-08-24-ai-grading-ui-changes-design.md (FR-1.1, FR-1.3)
 *
 * Linked UNCONDITIONALLY from head.jsp and gradinghead.jsp. It must not live in
 * default.css or grading.css: both of those are skipped entirely when a user has a
 * userPreferences.stylesheetUrl / gradingStylesheetUrl set, and clinical severity
 * colour is not allowed to be optional.
 *
 * Bands and colours were set in clinical review on 2026-10-30. The bands live in
 * AiSeverityStyle.cssClassFor; change the two together.
 */
:root {
    --ai-sev-none:    #2E7D32; /* ETDRS level 10 (No DR), and the no-referral line     */
    --ai-sev-mild:    #D19900; /* ETDRS level 11-20 - questionable DR, MA only          */
    --ai-sev-mod:     #EF6C00; /* ETDRS level 21-52 - mild to moderately severe NPDR    */
    --ai-sev-high:    #C62828; /* ETDRS level >= 53 - severe NPDR or higher             */
    --ai-sev-unknown: #8E24AA; /* no level, or a referral whose worse eye is level 10   */
}

/*
 * The severity is a coloured box with white text, so it reads the same on the patient
 * view's blue, the black grading panels and the retinal image. The thin light border
 * marks the box edge on the patient view, whose blue is about as light as these fills.
 * Yellow and orange carry white text below 4.5:1 (2.5:1 and 3.1:1); that was accepted
 * in review to keep them clean, and the bold weight and shadow are what make it work.
 */
.ai-sev-none,
.ai-sev-mild,
.ai-sev-mod,
.ai-sev-high,
.ai-sev-unknown {
    display: inline-block;
    padding: 2px 8px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 3px;
    color: #ffffff;
    font-weight: bold;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.45);
}

.ai-sev-none    { background-color: var(--ai-sev-none); }
.ai-sev-mild    { background-color: var(--ai-sev-mild); }
.ai-sev-mod     { background-color: var(--ai-sev-mod); }
.ai-sev-high    { background-color: var(--ai-sev-high); }
.ai-sev-unknown { background-color: var(--ai-sev-unknown); }

/*
 * AI grading shown inline beside the manual DR Level combo (FR-3.1). The row wrapper
 * keeps it on the combo's line; baseline alignment lines its text up with the combo's
 * selected value, and stays put when a validation message appears under the combo.
 */
.ai-grading-row {
    display: flex;
    align-items: baseline;
}

.ai-grading-inline {
    margin-left: 10px;
    font-size: calc(1em + 2pt);
    white-space: nowrap;
}
