/* ==========================================================================
   Sick reports: layout only. Chips, cards, tables, buttons, fields, callouts and the dialog come from components/ui.css and
   Web Awesome. Two parts share this file because one script draws both:
     - the reviewer screen (#viewSickReports), and
     - the employee's pieces: the top-bar dialog (.sr2-report) and the MC upload and add-days controls the My medical page draws
       inside its sick report dialog (.sr2-panel; the layout of that dialog is in medical-claims.css).
   An element that carries the hidden attribute must stay hidden, so none of the wrappers below set display.
   ========================================================================== */
@layer app-pages {

    /* ---- The employee's controls ------------------------------------------------------------ */
    .sr2-panel.is-busy, .sr2-report.is-busy { opacity: 0.7; }
    .sr2-report-actions { justify-content: flex-end; }
    .sr2-choices:not([hidden]) { display: flex; flex-direction: column; gap: 0.5rem; }
    .sr2-choices p { margin: 0 0 0.5rem; }
    .sr2-choice { width: 100%; }
    .sr2-title { margin: 0; display: flex; align-items: center; gap: 0.5rem; font-size: 1rem; font-weight: 700; color: var(--d26-ink); }
    .sr2-title i { color: var(--d26-accent); }
    .sr2-line { margin: 0; color: var(--d26-ink); font-size: 0.9375rem; }
    .sr2-form, .sr2-extend { display: flex; flex-direction: column; gap: 0.75rem; }
    .sr2-extend { border-top: 1px solid var(--d26-line); padding-top: 0.75rem; }
    .sr2-days { max-width: 10rem; }
    .sr2-btn { align-self: flex-start; }
    .sr2-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.625rem; }

    /* The native file input sits invisibly over a label that looks like a button. */
    .sr2-file-btn {
        position: relative;
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        min-height: var(--d26-target);
        padding: 0 1rem;
        border: 1px solid var(--d26-accent);
        border-radius: var(--d26-radius-control);
        background: var(--d26-accent);
        color: #fff;
        font-weight: 600;
        cursor: pointer;
    }
    .sr2-file-btn:hover { background: var(--d26-accent-hover); }
    .sr2-file-btn--outline { background: #fff; color: var(--d26-ink); border-color: var(--d26-line); }
    .sr2-file-btn--outline:hover { background: var(--d26-surface); border-color: var(--d26-accent); }
    .sr2-file-btn:focus-within { outline: 2px solid var(--d26-accent); outline-offset: 2px; }
    .sr2-file { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

    @media (max-width: 480px) {
        .sr2-btn, .sr2-file-btn { align-self: stretch; justify-content: center; }
        .sr2-days { max-width: none; }
    }

    /* ---- The reviewer screen ---------------------------------------------------------------- */
    .sr2-table td { vertical-align: top; }
    .sr2-reason-cell { max-width: 22rem; overflow-wrap: anywhere; }
    .sr2-view-mc { margin-left: 0.5rem; text-decoration: none; }
    .sr2-view-mc:hover { text-decoration: underline; }
    .sr2-silent { margin-top: 2rem; }
    .sr2-silent .ui-section-title { margin-bottom: 0.25rem; }
    #sr2ListError:not([hidden]), #sr2SilentError:not([hidden]), #sr2ListNote:not([hidden]), #sr2ModalError:not([hidden]) { margin: 0 0 1rem; }
    #sr2Empty:not([hidden]) { margin-top: 0.5rem; }

    /* The review dialog */
    .sr2-review { display: flex; flex-direction: column; gap: 1rem; }
    .sr2-preview-box { border: 1px solid var(--d26-line); border-radius: var(--d26-radius-control); overflow: hidden; background: var(--d26-surface); }
    .sr2-preview-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem; padding: 0.25rem 0.75rem; border-bottom: 1px solid var(--d26-line); }
    .sr2-preview-label { display: inline-flex; align-items: center; gap: 0.375rem; font-weight: 700; color: var(--d26-ink); }
    .sr2-preview-head a { display: inline-flex; align-items: center; gap: 0.25rem; }
    .sr2-preview-frame { display: block; width: 100%; height: 22rem; border: 0; background: #fff; }
    .sr2-fieldset { display: flex; flex-direction: column; gap: 0.125rem; min-width: 0; margin: 0; padding: 0.5rem 0.75rem; border: 1px solid var(--d26-line); border-radius: var(--d26-radius-control); }
    .sr2-fieldset legend { padding: 0 0.375rem; font-size: 0.875rem; font-weight: 700; color: var(--d26-ink); }

    @container (width <= 40rem) { .sr2-reason-cell { max-width: none; } }            /* the card switch itself is the shared data_table(cards="narrow") */
    @media (max-width: 640px) { .sr2-preview-frame { height: 16rem; } }
}
