
/* === Icon-Farben: Einheitlich via Bootstrap-Theme-Variablen === */

.fa-solid:not(.disabled),
.fa-light:not(.disabled),
.fa-regular:not(.disabled),
.fa-thin:not(.disabled),
.fa-sharp:not(.disabled),
.fa-brands:not(.disabled),
.fa-sharp-solid:not(.disabled),
.fa-sharp-regular:not(.disabled),
.fa-sharp-light:not(.disabled),
.fa-sharp-thin:not(.disabled) {
    color: rgba(var(--bs-primary-rgb), 1);
}

/* === Duotone: Zweifarbige Icons via FA CSS Custom Properties === */

.fa-duotone:not(.disabled) {
    --fa-primary-color: rgba(var(--bs-dark-rgb), 0.75);
    --fa-primary-opacity: 1;
    --fa-secondary-color: rgba(var(--bs-primary-rgb), 1);
    --fa-secondary-opacity: 0.5;
}


/* === Duotone unter Element-Typ-Containern: Layer = currentColor ===
   Wenn ein Container eine Element-Typ-Farbe via CSS-Klasse setzt
   (z.B. .udm-type-fg-entity, .udm-type-icon-app, .ctx-app, .type-ae ...),
   sollen Duotone-Icons darin BEIDE Layer mit currentColor faerben — sonst
   dominiert die globale .fa-duotone-Default-Regel oben (Dark-Primary +
   Primary-Secondary) und die Element-Typ-Farbe wird ueberschrieben.

   Diese Regel zentralisiert das Verhalten — vorher mussten an jeder Stelle,
   die Type-Farben benutzt (Sidebar, Breadcrumb, PageHeader, ElementInfo,
   ei-card, ei-rels-group, ...) die FA-Variablen manuell gesetzt werden.
   Mit dieser zentralen Fallback-Regel ist das beim Erstellen neuer
   Type-Color-Containers nicht mehr noetig — solange der Container eine der
   bekannten Type-Klassen-Konventionen verwendet. */
[class*="udm-type-fg-"] .fa-duotone:not(.disabled),
[class*="udm-type-icon-"] .fa-duotone:not(.disabled),
.ctx-app .fa-duotone:not(.disabled),
.ctx-sys .fa-duotone:not(.disabled),
.ctx-mgmt .fa-duotone:not(.disabled),
.ctx-home .fa-duotone:not(.disabled),
.type-dlg .fa-duotone:not(.disabled),
.type-ae .fa-duotone:not(.disabled),
.type-ent .fa-duotone:not(.disabled),
.type-ds .fa-duotone:not(.disabled),
.type-job .fa-duotone:not(.disabled),
.type-code .fa-duotone:not(.disabled) {
    --fa-primary-color: currentColor;
    --fa-secondary-color: currentColor;
    --fa-primary-opacity: 1;
    --fa-secondary-opacity: 0.45;
}


/* === Custom Sizes === */

.fa-4xl {
    font-size: 2.5rem;
}

/* === UDM Icon-Groessen: Absolute rem-Werte ===
   Unabhaengig von der Container-Schriftgroesse.
   Werden von UiIconHelper.Create() verwendet. */
.udm-icon-xs  { font-size: 0.85rem !important; }
.udm-icon-sm  { font-size: 1rem !important; }
.udm-icon-md  { font-size: 1.25rem !important; }
.udm-icon-lg  { font-size: 1.5rem !important; }
.udm-icon-xl  { font-size: 2rem !important; }
.udm-icon-2xl { font-size: 2.5rem !important; }
.udm-icon-3xl { font-size: 3rem !important; }


/* === Input-Icon States === */

.udm-input-icon.error {
    --fa-secondary-color: var(--bs-danger) !important;
    --fa-primary-color: var(--bs-danger) !important;
    color: var(--bs-danger) !important;
}

.udm-input-icon.warning {
    --fa-secondary-color: var(--bs-warning) !important;
    --fa-primary-color: var(--bs-warning) !important;
    color: var(--bs-warning) !important;
}


/* === Legacy Size-Mappings (DevExpress Image-Kompatibilität) === */

.fa-1x {
    font-size: 0.75rem;
    --dxbl-image-width: 0.75rem !important;
    --dxbl-image-height: 0.75rem !important;
}

.fa-2x {
    font-size: 1rem;
    --dxbl-image-width: 1rem !important;
    --dxbl-image-height: 1rem !important;
}

.fa-3x {
    font-size: 1.25rem;
    --dxbl-image-width: 1.25rem !important;
    --dxbl-image-height: 1.25rem !important;
}

.fa-4x {
    font-size: 1.5rem;
    --dxbl-image-width: 1.5rem !important;
    --dxbl-image-height: 1.5rem !important;
}
