/* =========================================================================
   Bootstrap Icons for XAF's action images, like the customer portal's monochrome icons.
   XAF renders an action image as <img class="dxbl-image" src="IImageService/{ImageName}?t=Fluent...">
   in toolbar buttons and menu items. For the images listed here the element holding the image draws the
   glyph (it follows the text colour: Light, Dark and the primary "New" button need nothing) and the image is
   hidden. Images not listed keep the monochrome filter from xaf-shell.css. Add a new image to BOTH lists.
   ========================================================================= */

:has(> img.dxbl-image[src*="IImageService/"])::before {
    content: var(--ts-bi);
    flex: 0 0 auto;
    width: 20px;
    font-family: bootstrap-icons;
    font-size: 16px;
    font-style: normal;
    font-weight: normal;
    line-height: 1;
    text-align: center;
    -webkit-font-smoothing: antialiased;
}

/* Image name -> glyph (bootstrap-icons.min.css code points). */
:has(> img[src*="IImageService/Action_New?"]),
:has(> img[src*="IImageService/Action_Dashboard_New?"]) { --ts-bi: "\f64d"; }                 /* plus-lg */
:has(> img[src*="IImageService/Action_Delete?"]) { --ts-bi: "\f5de"; }                         /* trash */
:has(> img[src*="IImageService/Action_Edit?"]) { --ts-bi: "\f4cb"; }                           /* pencil */
:has(> img[src*="IImageService/Action_Save?"]),
:has(> img[src*="IImageService/Action_Save_Close?"]) { --ts-bi: "\f7d8"; }                     /* floppy */
:has(> img[src*="IImageService/Action_Save_New?"]) { --ts-bi: "\f37d"; }                       /* file-earmark-plus */
:has(> img[src*="IImageService/Action_Cancel?"]),
:has(> img[src*="IImageService/Action_Close?"]) { --ts-bi: "\f659"; }                          /* x-lg */
:has(> img[src*="IImageService/Action_Refresh?"]) { --ts-bi: "\f116"; }                        /* arrow-clockwise */
:has(> img[src*="IImageService/Action_ResetViewSettings?"]) { --ts-bi: "\f117"; }              /* arrow-counterclockwise */
:has(> img[src*="IImageService/Action_Search?"]) { --ts-bi: "\f52a"; }                         /* search */
:has(> img[src*="IImageService/Action_Filter?"]) { --ts-bi: "\f3e1"; }                         /* funnel */
:has(> img[src*="IImageService/Action_Clear?"]) { --ts-bi: "\f331"; }                          /* eraser */
:has(> img[src*="IImageService/Action_Export?"]) { --ts-bi: "\f30a"; }                         /* download */
:has(> img[src*="IImageService/Action_ModelDifferences_Import?"]) { --ts-bi: "\f603"; }        /* upload */
:has(> img[src*="IImageService/Action_ShowInReport?"]) { --ts-bi: "\f35a"; }                   /* file-earmark-bar-graph */
:has(> img[src*="IImageService/Action_Printing_Preview?"]) { --ts-bi: "\f341"; }               /* eye */
:has(> img[src*="IImageService/Action_Report_ShowDesigner?"]),
:has(> img[src*="IImageService/Action_Dashboard_Designer?"]),
:has(> img[src*="IImageService/Action_Dashboard_ShowDesigner?"]),
:has(> img[src*="IImageService/Action_Dashboard_Edit?"]) { --ts-bi: "\f4ca"; }                 /* pencil-square */
:has(> img[src*="IImageService/Action_Copy?"]),
:has(> img[src*="IImageService/Action_Clone?"]) { --ts-bi: "\f759"; }                          /* copy */
:has(> img[src*="IImageService/Action_Navigation_Previous_Object?"]) { --ts-bi: "\f284"; }     /* chevron-left */
:has(> img[src*="IImageService/Action_Navigation_Next_Object?"]) { --ts-bi: "\f285"; }         /* chevron-right */
:has(> img[src*="IImageService/Action_LinkUnlink_Link?"]) { --ts-bi: "\f470"; }                /* link-45deg */
:has(> img[src*="IImageService/Action_LinkUnlink_Unlink?"]) { --ts-bi: "\f623"; }              /* x-circle */
:has(> img[src*="IImageService/Action_Security_ChangePassword?"]),
:has(> img[src*="IImageService/Action_Security_ResetPassword?"]) { --ts-bi: "\f44f"; }         /* key */
:has(> img[src*="IImageService/Action_Validation_Validate?"]) { --ts-bi: "\f270"; }            /* check2-circle */
:has(> img[src*="IImageService/Action_Bell?"]) { --ts-bi: "\f18a"; }                           /* bell */
:has(> img[src*="IImageService/BO_Contact?"]) { --ts-bi: "\f4dd"; }                            /* person-plus (Save sender as contact) */
/* Stock actions (Module/Controllers/StockActionsController). */
:has(> img[src*="IImageService/Action_Workflow_Activate?"]) { --ts-bi: "\f1bc"; }              /* box-arrow-in-down: Receive */
:has(> img[src*="IImageService/Action_Change_State?"]) { --ts-bi: "\f12b"; }                   /* arrow-left-right: Transfer */
:has(> img[src*="IImageService/Action_Grant_Set?"]) { --ts-bi: "\f28b"; }                      /* clipboard-check: Count */
:has(> img[src*="IImageService/Action_Workflow_Deactivate?"]) { --ts-bi: "\f131"; }            /* arrow-return-left: Reverse */

/* The same images, hidden behind their glyph. */
img.dxbl-image:is(
    [src*="IImageService/Action_New?"], [src*="IImageService/Action_Dashboard_New?"],
    [src*="IImageService/Action_Delete?"], [src*="IImageService/Action_Edit?"],
    [src*="IImageService/Action_Save?"], [src*="IImageService/Action_Save_Close?"], [src*="IImageService/Action_Save_New?"],
    [src*="IImageService/Action_Cancel?"], [src*="IImageService/Action_Close?"],
    [src*="IImageService/Action_Refresh?"], [src*="IImageService/Action_ResetViewSettings?"],
    [src*="IImageService/Action_Search?"], [src*="IImageService/Action_Filter?"], [src*="IImageService/Action_Clear?"],
    [src*="IImageService/Action_Export?"], [src*="IImageService/Action_ModelDifferences_Import?"],
    [src*="IImageService/Action_ShowInReport?"], [src*="IImageService/Action_Printing_Preview?"],
    [src*="IImageService/Action_Report_ShowDesigner?"], [src*="IImageService/Action_Dashboard_Designer?"],
    [src*="IImageService/Action_Dashboard_ShowDesigner?"],
    [src*="IImageService/Action_Dashboard_Edit?"],
    [src*="IImageService/Action_Copy?"], [src*="IImageService/Action_Clone?"],
    [src*="IImageService/Action_Navigation_Previous_Object?"], [src*="IImageService/Action_Navigation_Next_Object?"],
    [src*="IImageService/Action_LinkUnlink_Link?"], [src*="IImageService/Action_LinkUnlink_Unlink?"],
    [src*="IImageService/Action_Security_ChangePassword?"], [src*="IImageService/Action_Security_ResetPassword?"],
    [src*="IImageService/Action_Validation_Validate?"], [src*="IImageService/Action_Bell?"],
    [src*="IImageService/BO_Contact?"],
    [src*="IImageService/Action_Workflow_Activate?"], [src*="IImageService/Action_Change_State?"],
    [src*="IImageService/Action_Grant_Set?"], [src*="IImageService/Action_Workflow_Deactivate?"]) {
    display: none;
}

/* Nested-list tabs (Company > Machines / Users / Contacts, ...) and card captions without icons, like the
   portal's tabs and card labels. DevExpress sets the group-header image's display with !important. */
.xaf-layout-tab-icon { display: none; }
.dxbl-fl .dxbl-group .dxbl-group-header > img.dxbl-image { display: none !important; }
