@import url('assets/css/simple-line-icons.css');

@media (min-width: 1200px) {
    body {
        overflow-x: hidden;
    }

    .tm-page {
        position: relative;
        left: 0;
        transition: left .3s ease-in-out;
    }

    .bal-sidebar {
        background: #3f3f3f;
        overflow: hidden;
        width: 50px;
        transition: width .3s ease-in-out;
    }

    .bal-sidebar .bal-submenu {
        display: none;
    }

    .bal-sidebar:hover, .bal-sidebar:focus-within {
        width: 210px;
        animation: bal-rail-reveal .3s step-end forwards;
    }

    .bal-sidebar:hover + .tm-page, .bal-sidebar:focus-within + .tm-page {
        left: 160px;
    }

    .bal-sidebar:hover .bal-menu {
        position: relative;
    }

    .bal-sidebar:hover .bal-menu {
        width: 210px;
        position: relative;
    }

    .bal-sidebar .bal-menu > li {
        position: static;
    }

    .bal-sidebar .bal-menu > li > a {
        width: 210px;
        box-sizing: border-box;
        padding: 0 15px 0 60px;
        height: 50px;
        white-space: normal;
        overflow: hidden;
        color: #8c8a8a;
        background: transparent;
        clip-path: inset(0 160px 0 0);
        transition: width .3s ease-in-out, clip-path .3s ease-in-out;

    }

    .bal-sidebar:hover .bal-menu > li > a, .bal-sidebar:focus-within .bal-menu > li > a {
        clip-path: inset(0 0 0 0);
    }

    .bal-sidebar .bal-menu > li > a::before {
        position: absolute;
        left: 0;
        font-size: 25px;
        color: inherit;
    }

    .bal-sidebar .bal-menu > li:nth-child(1) > a::before {
        font-family: Simple-Line-Icons;
        content: '\e069';
    }

    .bal-sidebar .bal-menu > li:nth-child(2) > a::before {
        font-family: Simple-Line-Icons;
        content: '\e028';
    }

    .bal-sidebar .bal-menu > li:nth-child(4) > a::before {
        font-family: Simple-Line-Icons;
        content: '\e031';
    }

    .bal-sidebar .bal-menu > li:nth-child(6) > a::before {
        font-family: Simple-Line-Icons;
        content: '\e01d';
    }

    .bal-sidebar .bal-menu > li:nth-child(7) > a::before {
        font-family: Simple-Line-Icons;
        content: '\e043';
    }

    .bal-sidebar .bal-menu > li > a:hover, .bal-sidebar .bal-menu > li > a:focus, .bal-sidebar .bal-menu > li.active > a, .bal-sidebar .bal-menu > li > a[aria-current] {
        color: #c85f45;
        background: transparent;
    }

    .bal-sidebar .bal-menu > li > ul {
        left: 210px;
        top: 8.5px;
        width: 210px;
        padding-top: 0;
        z-index: 1;
    }

    .bal-sidebar .bal-menu > li > ul::before {
        content: '';
        position: fixed;
        left: 210px;
        top: 0;
        width: 210px;
        height: 100vh;
        background: #4b4b4b;
        z-index: -1;
    }

    .bal-sidebar::before {
        content: '\f0c9';
        position: absolute;
        top: 10px;
        left: 0;
        width: 50px;
        text-align: center;
        font-family: BalIcons;
        font-size: 20px;
        color: #8c8a8a;
    }

    .bal-sidebar:hover::before, .bal-sidebar:focus-within::before {
        opacity: 0;
        transition: opacity .3s ease-in-out;
    }
}

.bal-menu a, .bal-menu a:hover, .bal-menu a:focus, .bal-menu a:hover *, .bal-menu a:focus * {
    text-decoration: none;
}


#bal-navigation .bal-menu > li > a {
    padding: 0 15px;
    color: #8c8a8a;
    height: 50px;
    box-sizing: border-box;
    text-decoration: none;
}

#bal-navigation .bal-menu > li > a[aria-current], #bal-navigation .bal-menu > li.active > a {
    background: #4b4b4b;
}

#bal-navigation .bal-menu > li:hover > a, #bal-navigation .bal-menu > li:focus-within > a, #bal-navigation .bal-menu > li:hover > a {
    background: #4b4b4b;
    color: #a1a2a3;
}

#bal-navigation .bal-menu ul, .bal-sidebar .bal-menu ul {
    box-sizing: border-box;
    width: 200px;
    min-width: 0;
    background: #4b4b4b;
    padding: 20px 30px;
    margin: 0;
    box-shadow: none;
}

#bal-navigation .bal-menu ul a, .bal-sidebar .bal-menu ul a {
    font-size: 15px !important;
    line-height: 24px;
    padding: 5px 0;
    color: #8c8a8a;
    white-space: normal;
    background: transparent;
}

#bal-navigation .bal-menu ul li + li, .bal-sidebar .bal-menu ul li + li {
    border-top: 1px solid #585858;
}

#bal-navigation .bal-menu ul a:hover, #bal-navigation .bal-menu ul a:focus, .bal-sidebar .bal-menu ul a:hover, .bal-sidebar .bal-menu ul a:focus {
    color: #c85f45;
    transition: color .1s ease-in-out;
    background: transparent;
}

.bal-nav-logo {
    display: none;
}

.bal-nav-shade[hidden] {
    display: none;
}

@media (max-width: 1199px) {
    body.bal-nav-open {
        overflow: hidden;
    }

    .bal-nav-shade {
        position: fixed;
        inset: 0;
        background: rgba(63, 63, 63, .7);
        z-index: 190;
    }

    #bal-navigation {
        position: fixed;
        right: 0;
        top: 0;
        bottom: 0;
        width: 270px;
        margin: 0;
        overflow-y: auto;
        background: #3f3f3f;
        z-index: 200;
    }

    #bal-navigation .bal-nav-logo {
        display: block;
        margin: 20px 15px;
    }

    #bal-navigation > .bal-menu {
        padding: 20px;
    }

    #bal-navigation .bal-menu > li > a {
        padding: 0;
        font-size: 15px !important;
        background: transparent;
        color: #8c8a8a;
        white-space: nowrap;
        transition: clip-path .3s ease-in-out;
    }

    #bal-navigation .bal-menu > li > a[aria-current], #bal-navigation .bal-menu > li.active > a, #bal-navigation .bal-menu a:hover, #bal-navigation .bal-menu a:focus {
        color: #c85f45;
        background: transparent;
    }

    #bal-navigation .bal-menu ul {
        position: static;
        display: block;
        background: transparent;
        width: auto;
        padding: 10px 20px;
        border-top: 1px solid #585858;
        border-bottom: 1px solid #585858;
    }

    #bal-navigation .bal-menu ul a {
        padding: 2px 0;
        line-height: 24px;
    }

    #bal-navigation .bal-menu ul li + li {
        border: 0;
    }
}

@media (min-width: 1200px) {
    .bal-sidebar .bal-menu.nav-managed li:not(.nav-open) > ul {
        display: none;
    }
}

.bal-menu li:hover > ul {
    display: block;
}

.bal-menu ul ul {
    top: 0;
    left: 100%;
}

.bal-menu ul.flip {
    left: auto;
    right: 100%;
}

#bal-navigation .bal-menu > li > ul.flip {
    left: auto;
    right: 0;
}

#bal-navigation .bal-menu ul {
    max-height: 0;
    padding: 0 30px;
    overflow: hidden;
    transition: max-height .2s ease-in-out, padding .2s ease-in-out;
}

#bal-navigation .bal-menu li:hover ul {
    max-height: 300px;
    padding: 20px 30px;
    display: block;
}


/* Reveal the full-height flyout and its labels together, without reflow.
   Drop the clip at the end so deeper submenus remain reachable. */
@media (min-width: 1200px) {
    .bal-sidebar .bal-menu > li:hover > ul {
        animation: bal-flyout-reveal .3s ease-in-out 0s backwards;
    }
}

@keyframes bal-flyout-reveal {
    from {
        clip-path: inset(-100vh 100% -100vh 0);
    }
    to {
        clip-path: inset(-100vh 0 -100vh 0);
    }
}

/* Clip labels until the rail finishes expanding; then allow flyouts. */
@keyframes bal-rail-reveal {
    from { overflow: hidden; }
    to { overflow: visible; }
}
