/* ==========================================================================
   Departments: layout only. Table, chips, buttons, fields and dialogs come from components/ui.css and Web Awesome.
   ========================================================================== */
@layer app-pages {

    #viewDepartments > .ui-page { display: flex; flex-direction: column; gap: 1rem; }

    /* The code is typed and shown in capitals; when it cannot be changed it looks locked. */
    wa-input.dep2-code-input::part(input) { text-transform: uppercase; }
    wa-input.dep2-code-input[readonly]::part(base) { background: var(--d26-surface); cursor: not-allowed; }

    .dep2-roles { border: 0; margin: 0; padding: 0; min-width: 0; }
    .dep2-checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0.25rem 1rem; }
    #dep2Error:not([hidden]), #dep2FormError:not([hidden]), #dep2ConfirmError:not([hidden]) { margin: 0 0 1rem; }

    .dep2-roles-cell { display: flex; flex-wrap: wrap; gap: 0.25rem; }
    .dep2-lock { display: inline-flex; align-items: center; gap: 0.25rem; margin-left: 0.375rem; font-size: 0.75rem; font-weight: 600; color: var(--d26-ink-2); }
    .dep2-off td { color: var(--d26-ink-2); }
    .dep2-actions { white-space: nowrap; }
    .dep2-buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem; }

    @container (width <= 40rem) { .dep2-actions { white-space: normal; } }          /* the card switch itself is the shared data_table(cards="narrow") */
}
