.message_alert_count,
.text_message_alert_count,
.chat_message_alert_count {
    font-size: 1.25em;
}

.htt-dropdown-wrapper {
    position: relative;
    display: inline-block;
    z-index: 999;
    overflow: visible;
}

.htt-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid #ccc;
    z-index: 999;
    min-width: 300px;
    box-sizing: border-box;
}

.htt-dropdown-wrapper:hover > .htt-dropdown-menu {
    display: block;
}

.htt-dropdown-menu li,
.htt-submenu li {
    position: relative;
}

.htt-dropdown-menu li {
    margin: 0;
    padding: 0;
}

.htt-dropdown-menu a,
.htt-submenu a {
    display: block;
    padding: 8px 16px;
    text-decoration: none;
    color: #333;
    white-space: nowrap;
    text-transform: none !important;
}

.htt-dropdown-menu a:hover,
.htt-submenu a:hover {
    background-color: #eee;
}

.htt-submenu {
    display: none;
    position: absolute;
    top: 0;
    left: 100%;
    min-width: 180px;
    background: #f9f9f9;
    margin-left: 0;
    border: 1px solid #ccc;
    z-index: 1500;
    max-height: 350px;
    overflow-y: auto; 
}

.htt-dropdown-menu li.has-submenu:hover > .htt-submenu {
    display: block;
}

.htt-dropdown-menu,
.htt-submenu {
    list-style: none;
}

.menu-block-anchor > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.custom-subitem-arrow {
    font-size: 15px;
    margin-left: 8px;
    padding-left: 20px;
    float: right;
}

.htt-dropdown-menu li.has-submenu > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    position: relative;
    text-transform: none;
}

html:not(.fontawesome-i2svg-complete) #navbarCollapse .fa-2x {
    display: inline-block;
    width: 29px;
}

.htt-menu-toggle {
    display: none;
}

@media (max-width: 805px) {
    .htt-dropdown-menu {
        display: block;
        position: relative;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0;
        max-height: 0;
        border: none;
        overflow: hidden;
        transition: max-height 0.5s ease;
    }

    .htt-dropdown-wrapper:hover > .htt-dropdown-menu {
        display: inherit;
    }

    .htt-dropdown-wrapper.is-open > .htt-dropdown-menu {
        max-height: 1500px;
    }

    .htt-submenu {
        display: block;
        position: relative;
        top: auto;
        left: auto;
        min-width: 180px;
        margin-left: 0;
        max-height: 0;
        border: none;
        overflow: hidden;
        transition: max-height 0.5s ease;
    }

    .htt-dropdown-menu li.has-submenu:hover > .htt-submenu {
        display: inherit;
    }

    .htt-dropdown-menu li.has-submenu.is-open > .htt-submenu {
        max-height: 1500px;
    }

    .htt-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 0;
        right: 0;
        width: 40px;
        height: 40px;
        margin: auto;
        background: transparent;
        border: none;
        padding: 0;
        cursor: pointer;
        z-index: 1;
    }

    .htt-dropdown-menu .htt-menu-toggle {
        width: 40px;
        height: 25px;
    }

    .htt-menu-toggle::before {
        content: '';
        width: 8px;
        height: 8px;
        border-right: 2px solid #333;
        border-bottom: 2px solid #333;
        transform: rotate(45deg);
        transition: transform 0.2s ease;
    }

    .htt-dropdown-wrapper > .htt-menu-toggle::before {
        border-right: 2px solid white;
        border-bottom: 2px solid white;
    }

    .htt-dropdown-menu .custom-subitem-arrow {
        display: none;
    }

    .htt-menu-toggle[aria-expanded="true"]::before {
        transform: rotate(-135deg);
    }

    .navbar-fixed-top .navbar-collapse.collapsing {
        overflow: hidden;
        transition: height 0.35s ease !important;
    }

    .navbar-fixed-top .navbar-collapse {
        max-height: 100dvh !important;
        overflow-y: auto;
    }
}
