/* Universal override for EspoCRM Stream RSS/Signal icon */
.fa-rss::before,
.fa-rss-square::before,
.fa-feed::before,
.fa-stream::before,
.fas.fa-rss::before {
    content: "\f086" !important; /* Unicode for FontAwesome fa-comments (chat bubble) */
    font-family: "Font Awesome 5 Free", "Font Awesome 6 Free", FontAwesome !important;
    font-weight: 900 !important;
}

/* Hide EspoCRM copyright links everywhere */
footer a[href*="espocrm.com"],
.login-container a[href*="espocrm.com"],
a[href*="espocrm.com"],
.powered-by {
    display: none !important;
    visibility: hidden !important;
}

/* =========================================================
   Dynamic Theme-Based Logo Swap (Glitch-Free Login Engine)
   ========================================================= */

/* 1. Default Base Rule: Fallback & Light Themes -> Dark Logo */
.navbar-brand img,
.login-container .logo img,
.logo-container img,
#login .logo-container img {
    content: url('../img/logo-dark.png') !important;
    max-height: 36px !important;
    width: auto !important;
}

/* 2. Cache-Safe Login Centering & Sizing */
#login .panel-heading {
    display: flex !important;
    justify-content: center !important;
    padding-top: 20px !important;
}

#login .logo-container {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    float: none !important;
}

#login .logo-container img.logo {
    margin: 0 auto !important;
    display: block !important;
    max-height: 55px !important;
}

/* 3. Dark/Glass Themes -> Light Logo (APPLIES ONLY TO INTERNAL NAVBAR) */
body[data-theme-name="Dark"] .navbar-brand img,
body[data-theme-name="Glass"] .navbar-brand img {
    content: url('../img/logo-light.png') !important;
}

/* 4. Login Screen Lock -> ALWAYS Dark Logo (Protects White Login Card) */
#login .logo-container img,
#login .login-container img,
.login-container .logo img {
    content: url('../img/logo-dark.png') !important;
}