/* MVC DataTables labels retain their TH color on hover and keyboard focus.
   Override the older page-local button rules without changing sort/focus state. */
.portal-shell .portal-main :is(
    .portal-users-sort,
    .portal-open-encounters-sort-button,
    .portal-global-settings-sort,
    .portal-status-sort,
    .portal-announcement-sort,
    .portal-archive-sort,
    .portal-client-program-details-sort,
    .portal-sms-sort,
    .portal-template-sort
):is(:hover, :focus-visible),
.portal-shell .portal-main .portal-published-table th.portal-published-sortable > button:is(:hover, :focus-visible) { color: inherit; }

/* MVC's modern DataTables page-length control uses the real Font Awesome
   chevron from new-intellahub-styles.css, not the browser's select arrow. */
.portal-main :is(label, div, span)[class*="-page-size"]:has(select) {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.portal-main :is(label, div, span)[class*="-page-size"] select {
    appearance: none;
    background-image: none;
    cursor: pointer;
}
.portal-main :is(label, div, span)[class*="-page-size"]:has(select)::after {
    content: "\f078";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    pointer-events: none;
    font-size: 12px;
}
/* These values are confirmed against the live MVC Clients control. */
.portal-main .portal-clients-page-size select { border-color: #000; color: #000; }

/* These MVC views explicitly set the content-wrapper background in their
   page script. Coloring only the native page's content leaves a white band
   beneath short grids, so apply the same color to the shared main surface.
   Keep the public Address Book kiosk's own chrome unchanged. */
.portal-main:not(.portal-kiosk-main):has(
    .portal-address-page,
    .portal-clients-page,
    .portal-client-editor-page,
    .portal-calendar-page,
    .portal-shared-calendars-page,
    .portal-adc-page,
    .portal-client-queue-page,
    .portal-published-page,
    .portal-open-encounters-page,
    .portal-template-page,
    .portal-identifier-page,
    .portal-global-settings-page,
    .portal-ocr-history-page,
    .portal-status-page,
    .portal-sms-page,
    .portal-client-program-details-page,
    .portal-interop-page,
    .portal-role-page,
    .portal-investigation-config-page
) { background: #e9ecef; }

/* Bootstrap lets an open select menu extend outside modal-content. Native
   pickers keep their own scrolling limits; clipping them at the form edge
   makes lower options unreachable with a mouse. */
.portal-main .mvc-modal-content:has(.portal-multiselect-menu, .portal-selectpicker-menu) { overflow: visible; }

/* These desktop grids fit their minimum widths at this breakpoint. Their
   native action menus extend past the final row; overflow-x:auto also makes
   overflow-y:auto and clips those actions behind the pager. Keep horizontal
   scrolling for smaller layouts, and let the desktop menus remain clickable. */
@media (min-width: 1400px) {
    .portal-main .portal-clients-table-wrap,
    .portal-main .portal-clients-table td.portal-clients-actions,
    .portal-main .portal-client-editor-page .portal-client-programs,
    .portal-main .portal-client-programs .mvc-table-responsive,
    .portal-main .portal-client-programs .portal-program-table td.portal-client-program-actions { overflow: visible; }
}

/*
   Final MVC visual compatibility pass.  This sheet is deliberately loaded
   after the generated scoped bundle: individual migrated pages used to set
   the compact action buttons to font-size: 0 while they still carried an
   inline Font Awesome glyph.  Keep their exact page geometry, colour and
   handlers, but make the real MVC icon win consistently.
*/
.portal-main .mvc-icon-button > i.fa,
.portal-main .mvc-icon-button > i.fas,
.portal-main .mvc-icon-button > i.far,
.portal-main .mvc-icon-button > i.fab,
.portal-main .mvc-icon-button > i.portal-mvc-action-icon {
    display: inline-block !important;
    color: currentColor !important;
    font-size: 1rem !important;
    font-style: normal;
    line-height: 1 !important;
    text-align: center;
}

.portal-main .mvc-icon-button:has(> i)::before {
    display: none !important;
}

.portal-main .mvc-app-button > i.fa,
.portal-main .mvc-app-button > i.fas,
.portal-main .mvc-app-button > i.far,
.portal-main .mvc-app-button > i.fab {
    display: inline-block !important;
    flex: 0 0 auto;
    color: currentColor !important;
    font-size: 20px !important;
    line-height: 1 !important;
    text-align: center;
}

.portal-main .mvc-app-button:has(> i)::before {
    display: none !important;
}

/* Action/Index places its block icon at the top padding, followed by a 12px/18px text line. */
.portal-main .portal-reference-actions .mvc-app-button { justify-content: flex-start; }
.portal-main .portal-reference-actions .mvc-app-button > span { line-height: 1.5; }

/* Account/UnAuthorized uses AdminLTE's ordinary white callout. Bootstrap5
   supplies no callout rules; keep this opt-in Source denial hook separate. */
.portal-shell .portal-main .portal-source-permission-callout {
    margin: 0 0 1rem;
    padding: 1rem;
    border-left: 5px solid #bd2130;
    border-radius: .25rem;
    color: #212529;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 1px 2px rgba(0, 0, 0, .24);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
}
.portal-shell .portal-main .portal-source-permission-callout h4 {
    margin: 0 0 .5rem;
    color: inherit;
    font-family: inherit;
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.2;
}
.portal-shell .portal-main .portal-source-permission-callout label {
    display: inline-block;
    margin-bottom: .5rem;
    font-weight: 700;
}
.portal-shell .portal-main .portal-source-permission-callout p { margin: 0 0 1rem; }
.portal-shell .portal-main .portal-source-permission-callout p:last-child { margin-bottom: 0; }

/* ClientADC's action-button uses the source 18px FA glyph at its natural width. */
.portal-shell .portal-main .portal-adc-page .portal-adc-action > :is(i.fa, i.fas) {
    width: auto;
    height: auto;
    flex: 0 0 auto;
    font-size: 18px !important;
}

/* The MVC DataTables Bootstrap 4 skin uses paired Unicode up/down arrows
   (dataTables.bootstrap4.min.css), inheriting the header's text face. Keep
   their page-owned position and active-state opacity. */
.portal-main .mvc-data-table th:has(.mvc-sort-button)::before,
.portal-main .mvc-data-table th:has(.mvc-sort-button)::after,
.portal-main .mvc-data-table th.mvc-sort-idle::before,
.portal-main .mvc-data-table th.mvc-sort-idle::after,
.portal-main .mvc-data-table th.mvc-sortable::before,
.portal-main .mvc-data-table th.mvc-sortable::after {
    font-family: inherit !important;
    font-weight: inherit !important;
}

.portal-main .mvc-data-table th:has(.mvc-sort-button)::before,
.portal-main .mvc-data-table th.mvc-sort-idle::before,
.portal-main .mvc-data-table th.mvc-sortable::before { content: "\2191" !important; }

.portal-main .mvc-data-table th:has(.mvc-sort-button)::after,
.portal-main .mvc-data-table th.mvc-sort-idle::after,
.portal-main .mvc-data-table th.mvc-sortable::after { content: "\2193" !important; }

/* These two grids render their own paired sort marks. Avoid adding another
   pair on the header, and give the existing marks the MVC skin's glyphs. */
.portal-main .portal-address-table th:has(.portal-address-sort-button)::before,
.portal-main .portal-address-table th:has(.portal-address-sort-button)::after { display: none !important; }
.portal-main .portal-announcement-sort-mark > i {
    font-family: inherit !important;
    font-weight: inherit !important;
    font-style: normal;
    font-size: 16px;
    line-height: 1;
}
.portal-main .portal-announcement-sort-mark > .fa-sort-up::before,
.portal-main .portal-address-sort-button > span::before { content: "\2191"; }
.portal-main .portal-announcement-sort-mark > .fa-sort-down::before,
.portal-main .portal-address-sort-button > span::after { content: "\2193"; }
.portal-main .portal-address-sort-button > span { display: contents; color: inherit; font: inherit !important; }
.portal-main .portal-address-sort-button > span::before,
.portal-main .portal-address-sort-button > span::after { opacity: .3; }
.portal-main .portal-address-sort-button > span.fa-sort-up::before,
.portal-main .portal-address-sort-button > span.fa-sort-down::after { opacity: 1; }

/* The restored Open Encounters component owns a separate table and indicator. */
.portal-main .portal-open-encounters-sort-indicator::before,
.portal-main .portal-open-encounters-sort-indicator::after {
    font-family: inherit !important;
    font-weight: inherit !important;
}
.portal-main .portal-open-encounters-sort-indicator::before { content: "\2191" !important; }
.portal-main .portal-open-encounters-sort-indicator::after { content: "\2193" !important; }

/* Current AdminLTE's site bundle includes DataTables Bootstrap 4. Its sort
   marks are text-font arrows anchored to the TH, including on the newer
   14px tblBodyContent tables. Reset the old native caret geometry as well as
   the glyph: changing only the font leaves 11px/13px marks and top offsets.
   Address Book keeps its separately measured page rules. */
.portal-shell .portal-main :is(
    .mvc-data-table:not(.portal-address-table) th:has(.mvc-sort-button),
    .mvc-data-table th.mvc-sortable,
    .mvc-data-table th.mvc-sort-idle,
    .portal-status-table th:has(.portal-status-sort),
    .portal-global-settings-table th:has(.portal-global-settings-sort),
    .portal-template-table th:has(.portal-template-sort),
    .portal-sms-table th:has(.portal-sms-sort),
    .portal-users-table th:has(.portal-users-sort),
    .portal-active-announcements-page .mvc-data-table th:has(.portal-announcement-sort),
    .portal-archived-announcements-page th:has(.portal-archive-sort),
    .portal-open-encounters-table th.portal-open-encounters-sortable,
    .portal-client-incidents-page th:has(> button),
    .portal-special-request-table th:has(.portal-special-request-sort),
    .portal-investigation-table th[aria-sort],
    .portal-adc-sortable,
    .portal-ocr-history-sortable,
    .portal-published-sortable,
    .portal-role-sort-header,
    .portal-identifier-table th:has(.mvc-sort-button),
    .portal-investigation-config-table th:has(.mvc-sort-button),
    .portal-clients-table th:has(> button),
    .portal-client-mapping-table th:has(> button),
    .portal-shared-calendar-table th:has(> button),
    .portal-interop-table th:has(.portal-interop-sort),
    .portal-call-log-table thead :is(th, td):has(> .portal-call-log-sort)
) {
    position: relative;
}

.portal-shell .portal-main :is(
    .mvc-data-table:not(.portal-address-table) th:has(.mvc-sort-button),
    .mvc-data-table th.mvc-sortable,
    .mvc-data-table th.mvc-sort-idle,
    .portal-status-table th:has(.portal-status-sort),
    .portal-global-settings-table th:has(.portal-global-settings-sort),
    .portal-template-table th:has(.portal-template-sort),
    .portal-sms-table th:has(.portal-sms-sort),
    .portal-users-table th:has(.portal-users-sort),
    .portal-active-announcements-page .mvc-data-table th:has(.portal-announcement-sort),
    .portal-archived-announcements-page th:has(.portal-archive-sort),
    .portal-open-encounters-table th.portal-open-encounters-sortable,
    .portal-client-incidents-page th:has(> button),
    .portal-special-request-table th:has(.portal-special-request-sort),
    .portal-investigation-table th[aria-sort],
    .portal-adc-sortable,
    .portal-ocr-history-sortable,
    .portal-published-sortable,
    .portal-role-sort-header,
    .portal-identifier-table th:has(.mvc-sort-button),
    .portal-investigation-config-table th:has(.mvc-sort-button),
    .portal-clients-table th > button,
    .portal-client-mapping-table th > button,
    .portal-shared-calendar-table th > button,
    .portal-interop-table th > .portal-interop-sort,
    .portal-call-log-table thead :is(th, td) > .portal-call-log-sort
)::before,
.portal-shell .portal-main :is(
    .mvc-data-table:not(.portal-address-table) th:has(.mvc-sort-button),
    .mvc-data-table th.mvc-sortable,
    .mvc-data-table th.mvc-sort-idle,
    .portal-status-table th:has(.portal-status-sort),
    .portal-global-settings-table th:has(.portal-global-settings-sort),
    .portal-template-table th:has(.portal-template-sort),
    .portal-sms-table th:has(.portal-sms-sort),
    .portal-users-table th:has(.portal-users-sort),
    .portal-active-announcements-page .mvc-data-table th:has(.portal-announcement-sort),
    .portal-archived-announcements-page th:has(.portal-archive-sort),
    .portal-open-encounters-table th.portal-open-encounters-sortable,
    .portal-client-incidents-page th:has(> button),
    .portal-special-request-table th:has(.portal-special-request-sort),
    .portal-investigation-table th[aria-sort],
    .portal-adc-sortable,
    .portal-ocr-history-sortable,
    .portal-published-sortable,
    .portal-role-sort-header,
    .portal-identifier-table th:has(.mvc-sort-button),
    .portal-investigation-config-table th:has(.mvc-sort-button),
    .portal-clients-table th > button,
    .portal-client-mapping-table th > button,
    .portal-shared-calendar-table th > button,
    .portal-interop-table th > .portal-interop-sort,
    .portal-call-log-table thead :is(th, td) > .portal-call-log-sort
)::after {
    position: absolute !important;
    top: auto !important;
    bottom: .9em !important;
    display: block !important;
    margin: 0 !important;
    color: inherit !important;
    font: inherit !important;
    transform: none !important;
    pointer-events: none;
}

.portal-shell .portal-main :is(
    .mvc-data-table:not(.portal-address-table) th:has(.mvc-sort-button),
    .mvc-data-table th.mvc-sortable,
    .mvc-data-table th.mvc-sort-idle,
    .portal-status-table th:has(.portal-status-sort),
    .portal-global-settings-table th:has(.portal-global-settings-sort),
    .portal-template-table th:has(.portal-template-sort),
    .portal-sms-table th:has(.portal-sms-sort),
    .portal-users-table th:has(.portal-users-sort),
    .portal-active-announcements-page .mvc-data-table th:has(.portal-announcement-sort),
    .portal-archived-announcements-page th:has(.portal-archive-sort),
    .portal-open-encounters-table th.portal-open-encounters-sortable,
    .portal-client-incidents-page th:has(> button),
    .portal-special-request-table th:has(.portal-special-request-sort),
    .portal-investigation-table th[aria-sort],
    .portal-adc-sortable,
    .portal-ocr-history-sortable,
    .portal-published-sortable,
    .portal-role-sort-header,
    .portal-identifier-table th:has(.mvc-sort-button),
    .portal-investigation-config-table th:has(.mvc-sort-button),
    .portal-clients-table th > button,
    .portal-client-mapping-table th > button,
    .portal-shared-calendar-table th > button,
    .portal-interop-table th > .portal-interop-sort,
    .portal-call-log-table thead :is(th, td) > .portal-call-log-sort
)::before {
    right: 1em !important;
    content: "\2191" !important;
}

.portal-shell .portal-main :is(
    .mvc-data-table:not(.portal-address-table) th:has(.mvc-sort-button),
    .mvc-data-table th.mvc-sortable,
    .mvc-data-table th.mvc-sort-idle,
    .portal-status-table th:has(.portal-status-sort),
    .portal-global-settings-table th:has(.portal-global-settings-sort),
    .portal-template-table th:has(.portal-template-sort),
    .portal-sms-table th:has(.portal-sms-sort),
    .portal-users-table th:has(.portal-users-sort),
    .portal-active-announcements-page .mvc-data-table th:has(.portal-announcement-sort),
    .portal-archived-announcements-page th:has(.portal-archive-sort),
    .portal-open-encounters-table th.portal-open-encounters-sortable,
    .portal-client-incidents-page th:has(> button),
    .portal-special-request-table th:has(.portal-special-request-sort),
    .portal-investigation-table th[aria-sort],
    .portal-adc-sortable,
    .portal-ocr-history-sortable,
    .portal-published-sortable,
    .portal-role-sort-header,
    .portal-identifier-table th:has(.mvc-sort-button),
    .portal-investigation-config-table th:has(.mvc-sort-button),
    .portal-clients-table th > button,
    .portal-client-mapping-table th > button,
    .portal-shared-calendar-table th > button,
    .portal-interop-table th > .portal-interop-sort,
    .portal-call-log-table thead :is(th, td) > .portal-call-log-sort
)::after {
    right: .5em !important;
    content: "\2193" !important;
}

/* Some tables put the pseudos on their keyboard-operable sort button. A
   static button makes their containing block the same TH as DataTables. */
.portal-shell .portal-main :is(
    .portal-clients-table,
    .portal-client-mapping-table,
    .portal-shared-calendar-table,
    .portal-interop-table,
    .portal-call-log-table
) th > button,
.portal-shell .portal-main .portal-call-log-table thead td > .portal-call-log-sort { position: static !important; }
.portal-shell .portal-main .portal-shared-calendar-table th:has(> button) { padding-right: 30px; }
.portal-shell .portal-main .portal-shared-calendar-table th > button { padding-right: 0; }

/* Client Programs already receives the shared TH pair; suppress its older
   button pair. Announcements and Open Encounters use the TH pair below. */
.portal-shell .portal-main .mvc-sort-button:not(.portal-address-sort-button)::before,
.portal-shell .portal-main .mvc-sort-button:not(.portal-address-sort-button)::after,
.portal-shell .portal-main .portal-announcement-sort-mark,
.portal-shell .portal-main .portal-open-encounters-sort-indicator { display: none !important; }

.portal-shell .portal-main .portal-open-encounters-sort-button { padding-right: 30px; }
.portal-shell .portal-main .portal-active-announcements-page .mvc-data-table th:has(.portal-announcement-sort)::before,
.portal-shell .portal-main .portal-active-announcements-page .mvc-data-table th:has(.portal-announcement-sort)::after,
.portal-shell .portal-main .portal-open-encounters-sortable::before,
.portal-shell .portal-main .portal-open-encounters-sortable::after,
.portal-shell .portal-main .portal-shared-calendar-table th > button::before,
.portal-shell .portal-main .portal-shared-calendar-table th > button::after { opacity: .3; }

.portal-shell .portal-main .mvc-data-table:not(.portal-address-table) th:has(> .mvc-sort-button:is(.mvc-sort-asc, .is-ascending))::before,
.portal-shell .portal-main .mvc-data-table:not(.portal-address-table) th:has(> .mvc-sort-button:is(.mvc-sort-desc, .is-descending))::after,
.portal-shell .portal-main .portal-active-announcements-page .mvc-data-table th:has(.portal-announcement-sort-mark.is-asc)::before,
.portal-shell .portal-main .portal-active-announcements-page .mvc-data-table th:has(.portal-announcement-sort-mark.is-desc)::after,
.portal-shell .portal-main .portal-open-encounters-sortable[aria-sort="ascending"]::before,
.portal-shell .portal-main .portal-open-encounters-sortable[aria-sort="descending"]::after,
.portal-shell .portal-main .portal-shared-calendars-page.is-sorted-calendar-name-ascending .portal-shared-calendar-table th:nth-child(1) button::before,
.portal-shell .portal-main .portal-shared-calendars-page.is-sorted-client-name-ascending .portal-shared-calendar-table th:nth-child(2) button::before,
.portal-shell .portal-main .portal-shared-calendars-page.is-sorted-calendar-name-descending .portal-shared-calendar-table th:nth-child(1) button::after,
.portal-shell .portal-main .portal-shared-calendars-page.is-sorted-client-name-descending .portal-shared-calendar-table th:nth-child(2) button::after { opacity: 1; }

/* These current MVC views load new-intellahub-styles and use tblBodyContent
   without table-bordered. Their TH font is 14px bold; the table-bordered
   16px/normal reference grid rule does not apply. */
.portal-shell .portal-main :is(
    .portal-shared-calendar-table,
    .portal-global-settings-table,
    .portal-client-program-details-table,
    .portal-ocr-history-table,
    .portal-identifier-table,
    .portal-sms-table,
    .portal-users-table,
    .portal-investigation-config-table
) th { font-weight: 700; }

/* Programs/DARCategory/Dispositions use Bootstrap's full-width table and DataTables
   automatic columns rather than the earlier fixed desktop measurements. */
.portal-shell .portal-main :is(.portal-reference-programs, .portal-reference-dar-categories, .portal-reference-dispositions) .mvc-data-table {
    width: 100%;
    table-layout: auto;
}
.portal-shell .portal-main :is(.portal-reference-programs, .portal-reference-dar-categories, .portal-reference-dispositions) .mvc-data-table :is(th, td) {
    width: auto;
}

/* ClientProgramDetails uses tblBodyContent without the native mvc-data-table
   class. Reserve the same Bootstrap/DataTables header space and arrow color. */
.portal-shell .portal-main .portal-client-program-details-table th:has(.portal-client-program-details-sort) {
    padding: 12px 30px 12px 12px;
}
.portal-shell .portal-main .portal-client-program-details-table th:has(.portal-client-program-details-sort)::before,
.portal-shell .portal-main .portal-client-program-details-table th:has(.portal-client-program-details-sort)::after {
    color: inherit;
}

.portal-shell .portal-main :is(.portal-identifier-table, .portal-investigation-config-table) th:has(.mvc-sort-button) { padding-right: 30px; }
.portal-shell .portal-main :is(.portal-identifier-sort, .portal-investigation-config-sort) {
    display: block;
    width: auto;
    min-width: max-content;
    margin: 0;
    padding: 0;
    font: inherit;
    text-align: left;
}
.portal-shell .portal-main :is(.portal-identifier-table, .portal-investigation-config-table) th:has(.mvc-sort-button)::before,
.portal-shell .portal-main :is(.portal-identifier-table, .portal-investigation-config-table) th:has(.mvc-sort-button)::after { opacity: .3; }
.portal-shell .portal-main :is(.portal-identifier-table, .portal-investigation-config-table) th:has(.mvc-sort-asc)::before,
.portal-shell .portal-main :is(.portal-identifier-table, .portal-investigation-config-table) th:has(.mvc-sort-desc)::after { opacity: 1; }

/* Source modal-icon/delete-modal-icon use natural FA advance at 18px.
   Resizing the old helper's box alone left its glyph at 22px. */
.portal-shell .portal-main:has(:is(.portal-identifier-page, .portal-template-page, .portal-global-settings-page, .portal-client-program-details-page, .portal-investigation-config-page, .portal-status-page, .portal-sms-page)) .mvc-modal-header .portal-header-icon.portal-header-icon,
.portal-shell .portal-main .portal-shared-calendar-modal > header .portal-header-icon,
.portal-shell .portal-main :is(.mvc-program-editor, .portal-client-delete-program-dialog, .portal-calendar-editor, .portal-calendar-delete-dialog) .mvc-modal-header .portal-header-icon.portal-header-icon {
    width: auto;
    height: auto;
    flex: 0 0 auto;
    margin-right: 12px;
    font-size: 18px;
    line-height: 1;
    vertical-align: baseline;
}

/* CallExport/Index uses an ordinary fa-calendar with natural glyph advance. */
.portal-shell .portal-main .portal-call-export-page .mvc-content-header > .portal-header-icon {
    width: auto;
    height: auto;
    flex: 0 0 auto;
}

/* These MVC content-header icons explicitly use 1.5em against 16px text. */
.portal-shell .portal-main :is(.portal-emergency-coverage-page, .portal-acuity-email-page, .portal-acuity-page) .mvc-content-header > .portal-header-icon {
    font-size: 24px;
    line-height: 1;
}
/* ClientIncidentLog places its natural-width icon beside the heading. */
.portal-shell .portal-main .portal-client-incidents-page .mvc-content-header > .portal-header-icon {
    width: auto;
    height: auto;
    flex: 0 0 auto;
    margin-right: 0;
    color: #000080;
    font-size: 20px;
    line-height: 1;
    vertical-align: baseline;
}

/* InvestigationLog/_Create uses an ordinary inherited-size FA warning icon. */
.portal-shell .portal-main .portal-investigation-existing-warning {
    color: #1f2d3d;
    font-size: 16px;
}
.portal-shell .portal-main .portal-investigation-existing-warning .portal-header-icon.portal-header-icon {
    width: auto;
    height: auto;
    flex: 0 0 auto;
    margin-right: 0;
    color: inherit;
    font-size: 16px;
    line-height: 1;
    vertical-align: baseline;
}
.portal-shell .portal-main:has(.portal-adc-page) .mvc-modal-header .portal-header-icon.portal-header-icon {
    width: auto;
    height: auto;
    flex: 0 0 auto;
    margin-right: 8px;
    font-size: 20px;
    line-height: 1;
    vertical-align: baseline;
}

.portal-shell .portal-main .portal-adc-actions button .portal-header-icon {
    width: 16px;
    height: auto;
    flex: 0 0 16px;
    margin-right: 8px;
    font-size: 14px;
    line-height: 1;
    vertical-align: baseline;
}
.portal-shell .portal-main :is(.portal-client-program-add, .portal-ocr-history-export) .portal-header-icon {
    width: auto;
    height: auto;
    flex: 0 0 auto;
    margin-right: 0;
    font-size: 18px;
    line-height: 1;
    vertical-align: baseline;
}
.portal-shell .portal-main .portal-calendar-bulk button .portal-header-icon {
    width: auto;
    height: auto;
    flex: 0 0 auto;
    margin-right: 6px;
    font-size: 13px;
    line-height: 1;
    vertical-align: baseline;
}

/* The source Print action uses btn-sm (14px), so fa-lg scales to 18.6666px. */
.portal-shell .portal-main .portal-announcements-print > i.fa-print.fa-lg {
    font-size: 1.33333em !important;
    line-height: .75em !important;
    vertical-align: -.0667em;
}

/* The archive action deliberately uses MVC's fa-lg utility, unlike ordinary
   16px pencil/trash controls. Give em units the source button font base. */
.portal-shell .portal-main .portal-unarchive-action {
    display: inline-block;
    font-size: 1rem;
    line-height: 1.5;
}
.portal-shell .portal-main .portal-unarchive-action > i.fa-file-upload.fa-lg {
    font-size: 1.33333em !important;
    line-height: .75em !important;
    vertical-align: -.0667em;
}

.portal-shell .portal-main .portal-calendar-header .mvc-icon-button { display: inline-block; }
.portal-shell .portal-main .portal-calendar-header .mvc-icon-button > i:is(.fa-chevron-left, .fa-chevron-right) {
    display: inline-block !important;
    width: 1em;
    height: 1em;
    font-family: fcicons !important;
    font-size: 1.5em !important;
    font-style: normal;
    font-variant: normal;
    font-weight: 400;
    line-height: 1 !important;
    text-align: center;
    text-transform: none;
    vertical-align: middle;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.portal-shell .portal-main .portal-calendar-header .mvc-icon-button > .fa-chevron-left::before { content: "\e900"; }
.portal-shell .portal-main .portal-calendar-header .mvc-icon-button > .fa-chevron-right::before { content: "\e901"; }

/* These seven source modals use Bootstrap 4's ordinary .close with ASCII x,
   not the opt-in .intella-modal close or the shared native multiplication sign. */
.portal-shell .portal-main :is(
    .mvc-modal-content[aria-labelledby="investigation-editor-title"],
    .mvc-modal-content[aria-labelledby="investigation-delete-title"],
    .mvc-modal-content[aria-labelledby="encounter-status-editor-title"],
    .mvc-modal-content.portal-status-details,
    .mvc-modal-content[aria-labelledby="delete-encounter-status-title"],
    .mvc-modal-content[aria-labelledby="global-setting-editor-title"],
    .mvc-modal-content[aria-labelledby="delete-global-setting-title"]
) > .mvc-modal-header > .mvc-close-button {
    position: static;
    inset: auto;
    display: block;
    float: right;
    width: auto;
    height: auto;
    padding: 1rem;
    margin: -1rem -1rem -1rem auto;
    border: 0;
    border-radius: 0;
    color: #000;
    background: transparent;
    font-family: "Source Sans Pro", "Helvetica Neue", Arial, sans-serif;
    font-size: 1.5rem !important;
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 1px 0 #fff;
    opacity: .5;
}
.portal-shell .portal-main :is(
    .mvc-modal-content[aria-labelledby="investigation-editor-title"],
    .mvc-modal-content[aria-labelledby="investigation-delete-title"],
    .mvc-modal-content[aria-labelledby="encounter-status-editor-title"],
    .mvc-modal-content.portal-status-details,
    .mvc-modal-content[aria-labelledby="delete-encounter-status-title"],
    .mvc-modal-content[aria-labelledby="global-setting-editor-title"],
    .mvc-modal-content[aria-labelledby="delete-global-setting-title"]
) > .mvc-modal-header > .mvc-close-button::after { content: none; display: none; }
.portal-shell .portal-main :is(
    .mvc-modal-content[aria-labelledby="investigation-editor-title"],
    .mvc-modal-content[aria-labelledby="investigation-delete-title"],
    .mvc-modal-content[aria-labelledby="encounter-status-editor-title"],
    .mvc-modal-content.portal-status-details,
    .mvc-modal-content[aria-labelledby="delete-encounter-status-title"],
    .mvc-modal-content[aria-labelledby="global-setting-editor-title"],
    .mvc-modal-content[aria-labelledby="delete-global-setting-title"]
) > .mvc-modal-header > .mvc-close-button:is(:hover, :focus) {
    color: #000;
    background: transparent;
    text-decoration: none;
}
.portal-shell .portal-main :is(
    .mvc-modal-content[aria-labelledby="investigation-editor-title"],
    .mvc-modal-content[aria-labelledby="investigation-delete-title"],
    .mvc-modal-content[aria-labelledby="encounter-status-editor-title"],
    .mvc-modal-content.portal-status-details,
    .mvc-modal-content[aria-labelledby="delete-encounter-status-title"],
    .mvc-modal-content[aria-labelledby="global-setting-editor-title"],
    .mvc-modal-content[aria-labelledby="delete-global-setting-title"]
) > .mvc-modal-header > .mvc-close-button:not(:disabled):is(:hover, :focus) { opacity: .75; }

/* Confirmed legacy reference forms use ordinary Bootstrap close text. Keep
   each component's source x/× glyph, rather than drawing a second shared ×.
   This class excludes the source opt-in intella-modal close treatment. */
.portal-shell .portal-main .portal-reference-legacy-editor { color: #212529; }
.portal-shell .portal-main .portal-reference-legacy-editor > .mvc-modal-header {
    position: static;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: none;
    text-align: center;
}
.portal-shell .portal-main .portal-reference-legacy-editor > .mvc-modal-header > h4 {
    width: 100%;
    margin: 0;
    color: #212529;
    font: 700 1.5rem / 1.5 "Source Sans Pro", "Helvetica Neue", Arial, sans-serif;
}
.portal-shell .portal-main .portal-reference-legacy-editor > .mvc-modal-header > .mvc-close-button {
    position: static;
    inset: auto;
    display: block;
    float: right;
    width: auto;
    height: auto;
    padding: 1rem;
    margin: -1rem -1rem -1rem auto;
    border: 0;
    border-radius: 0;
    color: #000;
    background: transparent;
    font-family: "Source Sans Pro", "Helvetica Neue", Arial, sans-serif;
    font-size: 1.5rem !important;
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 1px 0 #fff;
    opacity: .5;
}
.portal-shell .portal-main .portal-reference-legacy-editor > .mvc-modal-header > .mvc-close-button::after {
    content: none;
    display: none;
}
.portal-shell .portal-main .portal-reference-legacy-editor > .mvc-modal-header > .mvc-close-button:is(:hover, :focus) {
    color: #000;
    background: transparent;
    text-decoration: none;
}
.portal-shell .portal-main .portal-reference-legacy-editor > .mvc-modal-header > .mvc-close-button:not(:disabled):is(:hover, :focus) { opacity: .75; }

/* Explicitly opted-in ordinary Source Bootstrap 4 close buttons keep their
   own x/× text. Custom intella-modal, callback and local Alert/editor close
   treatments remain independent of this shared native fallback correction. */
.portal-shell .portal-main .mvc-modal-header:has(> .mvc-source-close) {
    position: static;
    align-items: flex-start;
    justify-content: space-between;
}
.portal-shell .portal-main .mvc-modal-header > .mvc-source-close {
    position: static;
    inset: auto;
    transform: none;
    display: block;
    float: right;
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 0;
    padding: 1rem;
    margin: -1rem -1rem -1rem auto;
    border: 0;
    border-radius: 0;
    color: #000;
    background: transparent;
    font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    font-size: 1.5rem !important;
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 1px 0 #fff;
    opacity: .5;
    cursor: auto;
    -webkit-appearance: none;
    appearance: none;
}
.portal-shell .portal-main .mvc-modal-header > .mvc-source-close::before,
.portal-shell .portal-main .mvc-modal-header > .mvc-source-close::after { content: none; display: none; }
.portal-shell .portal-main .mvc-modal-header > .mvc-source-close:not(:disabled):not(.disabled) { cursor: pointer; }
.portal-shell .portal-main .mvc-modal-header > .mvc-source-close:is(:hover, :focus) {
    color: #000;
    background: transparent;
    text-decoration: none;
}
.portal-shell .portal-main .mvc-modal-header > .mvc-source-close:not(:disabled):not(.disabled):is(:hover, :focus) { opacity: .75; }
/* Ordinary Bootstrap dialogs begin at the top margin rather than centering
   vertically. Only the six explicitly opted-in Source close hosts use this. */
.portal-shell .portal-main .mvc-modal-backdrop:has(> .mvc-modal-content > .mvc-modal-header > .mvc-source-close) {
    align-content: start;
    place-items: start center;
    padding: .5rem;
}
@media (min-width: 576px) {
    .portal-shell .portal-main .mvc-modal-backdrop:has(> .mvc-modal-content > .mvc-modal-header > .mvc-source-close) {
        padding-top: 1.75rem;
        padding-bottom: 1.75rem;
    }
}
@media (min-width: 992px) {
    /* Source #myModalContent is a centered 700px dialog while _Detail's
       650px content begins at that dialog's left edge. */
    .portal-shell .portal-main .mvc-modal-backdrop:has(> .portal-work-type-details > .mvc-modal-header > .mvc-source-close) {
        grid-template-columns: minmax(0, 700px);
        justify-content: center;
        justify-items: start;
    }
    .portal-shell .portal-main .mvc-modal-backdrop > .portal-work-type-details:has(> .mvc-modal-header > .mvc-source-close) {
        width: min(100%, 650px);
    }
}
.portal-shell .portal-main .portal-reference-legacy-editor > .mvc-modal-body > .mvc-form-group > label:not(.form-check-label):not(.custom-file-label):not(:has(input[type="checkbox"], input[type="radio"])) {
    margin-bottom: .5rem;
    color: #212529;
    font-weight: 700;
}
.portal-shell .portal-main .mvc-modal-backdrop:has(> .portal-reference-legacy-editor) {
    align-content: start;
    place-items: start center;
    padding: .5rem;
}
@media (min-width: 576px) {
    .portal-shell .portal-main .mvc-modal-backdrop:has(> .portal-reference-legacy-editor) {
        padding-top: 1.75rem;
        padding-bottom: 1.75rem;
    }
}
.portal-shell .portal-main :is(
    .mvc-modal-content[aria-labelledby="investigation-editor-title"],
    .mvc-modal-content[aria-labelledby="investigation-delete-title"],
    .mvc-modal-content[aria-labelledby="encounter-status-editor-title"],
    .mvc-modal-content.portal-status-details,
    .mvc-modal-content[aria-labelledby="delete-encounter-status-title"],
    .mvc-modal-content[aria-labelledby="global-setting-editor-title"],
    .mvc-modal-content[aria-labelledby="delete-global-setting-title"]
) > .mvc-modal-header > h4 { width: 100%; }

/* Embedded fcicons face copied verbatim from Mvc/UI/wwwroot/js/fullcalendar.min.js.
   Original bundle provenance/license notice follows. No new font asset. */
/*!
FullCalendar Premium Bundle v6.1.10
Docs & License: https://fullcalendar.io/docs/initialize-globals
(c) 2023 Adam Shaw
*/
@font-face{font-family:fcicons;font-style:normal;font-weight:400;src:url("data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAw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oAZERIZAAABAOIAjQMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=") format("truetype")}

/* These modern MVC grids explicitly use text angle brackets in DataTables language. */
.portal-shell .portal-main :is(.portal-users-pagination, .portal-sms-pagination, .portal-shared-calendar-footer nav) > button:is([aria-label="Previous page"], [aria-label="Next page"]) {
    font-family: "Source Sans Pro", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.25;
}

/* Source whole-page denial is a manual native fragment without a page scope attribute. */
.portal-shell .portal-main .portal-client-config-post-denied { padding: 0 .5rem; }

/* Classic MVC .btn-app Add/Upload controls: AdminLTE's 20px block glyph
   starts at top padding, followed by the 12px/18px text line. Limit this to
   the real fa-plus variant; modern row actions and the already-fixed Actions
   page keep their own metrics. Outer header spacing and button geometry stay. */
.portal-shell .portal-main .mvc-reference-page:not(.portal-reference-actions) .mvc-content-header .mvc-app-button:has(> i.fa-plus):not(.portal-adc-action) {
    font-size: 12px;
    line-height: 1.5;
}
.portal-shell .portal-main .mvc-reference-page:not(.portal-reference-actions) .mvc-content-header .mvc-app-button:has(> i.fa-plus):not(.portal-adc-action):not(.portal-announcements-action) {
    justify-content: flex-start;
    row-gap: 0;
}
.portal-shell .portal-main .mvc-reference-page:not(.portal-reference-actions) .mvc-content-header .mvc-app-button:has(> i.fa-plus):not(.portal-adc-action) > i.fa-plus {
    align-self: stretch;
    margin: 0;
}
.portal-shell .portal-main .mvc-reference-page:not(.portal-reference-actions) .mvc-content-header .mvc-app-button:has(> i.fa-plus):not(.portal-adc-action) > span {
    flex: 0 0 auto;
    font-size: inherit;
    line-height: 1.5;
}
/* Announcements shares a gap rule with Print. Its Add remains a column;
   remove only that column's vertical gap, preserving the distinct header,
   margin/width and Print's separate row arrangement and 7px icon/text gap. */
.portal-shell .portal-main .portal-announcements-header > .portal-announcements-action {
    justify-content: flex-start;
    row-gap: 0;
}
