/* Icon Fix Mini - Frontend/Admin fixes */

/* Prevent icon pseudo-elements from inheriting broken fonts */
.fa,
.fa-solid,
.fa-regular,
.fa-brands,
.fas,
.far,
.fab,
[class^="fa-"],
[class*=" fa-"] {
    font-style: normal;
    line-height: 1;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.fa,
.fas,
.fa-solid,
[class*=" fa-"]::before,
[class^="fa-"]::before {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 5 Free", "FontAwesome" !important;
    font-weight: 900;
}

.far,
.fa-regular {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 5 Free", "FontAwesome" !important;
    font-weight: 400;
}

.fab,
.fa-brands {
    font-family: "Font Awesome 6 Brands", "Font Awesome 5 Brands", "FontAwesome" !important;
    font-weight: 400;
}

/* Make SVG icons predictable */
svg,
img[src$=".svg"],
.attachment svg,
.icon svg,
.elementor-icon svg,
.wp-block-social-link svg,
.menu svg,
button svg,
a svg,
.widget svg {
    display: inline-block;
    vertical-align: middle;
    max-width: 100%;
    height: auto;
    overflow: visible;
}

/* Common cases where themes/plugins force wrong size */
.elementor-icon svg,
.icon svg,
button svg,
a svg {
    width: 1em;
    height: 1em;
}

/* Respect current text color for inline SVG icons */
svg path,
svg circle,
svg rect,
svg polygon,
svg ellipse,
svg line,
svg polyline {
    vector-effect: non-scaling-stroke;
}

svg:not([fill]) {
    fill: currentColor;
}

/* Font Awesome in buttons/menus often misaligns */
button .fa,
button .fas,
button .far,
button .fab,
a .fa,
a .fas,
a .far,
a .fab,
.menu .fa,
.menu .fas,
.menu .far,
.menu .fab,
.elementor-button .fa,
.elementor-button .fas,
.elementor-button .far,
.elementor-button .fab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Avoid invisible icons caused by lazy CSS resets */
i.fa:before,
i.fas:before,
i.far:before,
i.fab:before,
span.fa:before,
span.fas:before,
span.far:before,
span.fab:before {
    display: inline-block;
}
