﻿/* ============================================================
   STOCKLEDGER GLOBAL MENU
   ============================================================ */

.sl-layout {
    min-height: 100vh;
}


/* ============================================================
   NAVBAR
   ============================================================ */

.sl-header {
    position: relative;
    z-index: 9999;
    background: #ffffff;
    border-bottom: 1px solid #dee2e6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}


.sl-navbar {
    display: flex;
    align-items: center;
    min-height: 60px;
    padding: 0 20px;
}


/* ============================================================
   BRAND
   ============================================================ */

.sl-brand {
    display: inline-block;
    margin-right: 25px;
    font-size: 22px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}


.sl-brand-blue {
    color: #0A5C9B;
}


.sl-brand-green {
    color: #30A262;
}


/* ============================================================
   NAVIGATION
   ============================================================ */

.sl-navigation {
    display: flex;
    align-items: center;
    flex: 1;
}


/* ============================================================
   MAIN MENU
   ============================================================ */

.sl-top-menu {
    position: relative;
}


.sl-main-menu {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}


.sl-main-item {
    position: relative;
    list-style: none;
}


.sl-main-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 7px;
    min-height: 60px;
    padding: 0 14px;
    border: 0;
    background: transparent;
    color: #212529;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}


    .sl-main-link:hover {
        color: #0A5C9B;
        background: #f4f8fb;
    }


.sl-menu-link-content {
    display: flex;
    align-items: center;
    gap: 7px;
}


.sl-menu-icon {
    font-size: 16px;
}


.sl-main-arrow {
    font-size: 10px;
}


/* ============================================================
   MAIN DROPDOWN
   ============================================================ */

.sl-main-dropdown {
    position: absolute;
    top: calc(100% - 1px);
    left: 0;
    min-width: 240px;
    padding: 6px 0;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
    z-index: 10000;
    display: none;
}


    .sl-main-dropdown > ul {
        margin: 0;
        padding: 0;
        list-style: none;
    }


/* ============================================================
   DESKTOP MAIN HOVER
   ============================================================ */

@media (min-width: 992px) {

    .sl-main-item:hover > .sl-main-dropdown {
        display: block;
    }
}


/* ============================================================
   SUBMENU ITEM
   ============================================================ */

.sl-menu-item {
    position: relative;
    list-style: none;
}


.sl-menu-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 40px;
    padding: 9px 14px;
    border: 0;
    background: transparent;
    color: #212529;
    text-decoration: none;
    text-align: left;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    box-sizing: border-box;
}


    .sl-menu-link:hover {
        background: #f1f7fb;
        color: #0A5C9B;
    }


/* ============================================================
   RIGHT SIDE SUBMENU
   ============================================================ */

.sl-submenu {
    position: absolute;
    top: -6px;
    left: calc(100% - 1px);
    min-width: 240px;
    padding: 6px 0;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
    z-index: 11000;
    display: none;
}


    .sl-submenu > ul {
        margin: 0;
        padding: 0;
        list-style: none;
    }


/* ============================================================
   DESKTOP SUBMENU HOVER
   ============================================================ */

@media (min-width: 992px) {

    .sl-has-children:hover > .sl-submenu {
        display: block;
    }


    /*
       Hover bridge.

       This prevents the submenu disappearing when the mouse
       moves from parent to child submenu.
    */

    .sl-has-children::after {
        content: "";
        position: absolute;
        top: 0;
        left: 100%;
        width: 10px;
        height: 100%;
        background: transparent;
    }
}


/* ============================================================
   SUBMENU ARROW
   ============================================================ */

.sl-submenu-arrow {
    font-size: 10px;
    margin-left: 15px;
}


/* ============================================================
   USER
   ============================================================ */

.sl-user-area {
    position: relative;
    margin-left: auto;
    margin-right: 10px;
    min-width: 180px;
}




.sl-user-button {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 42px;
    padding: 0 10px;
    border: 0;
    background: transparent;
    color: #212529;
    cursor: pointer;
}


    .sl-user-button:hover {
        color: #0A5C9B;
        background: #f4f8fb;
    }


    .sl-user-button i:last-child {
        font-size: 10px;
    }


/* ============================================================
   USER DROPDOWN
   ============================================================ */

.sl-user-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    width: 300px;
    padding: 15px;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
    z-index: 20000;
}


.sl-user-name {
    font-weight: 600;
    color: #212529;
}


.sl-user-info {
    margin-top: 4px;
    color: #6c757d;
    font-size: 13px;
}


.sl-user-dropdown hr {
    margin: 10px 0;
    border: 0;
    border-top: 1px solid #eeeeee;
}


.sl-logout-button {
    width: 100%;
    padding: 8px 10px;
    border: 0;
    background: transparent;
    color: #dc3545;
    text-align: left;
    cursor: pointer;
    border-radius: 4px;
}


    .sl-logout-button:hover {
        background: #fff5f5;
    }


/* ============================================================
   HAMBURGER
   ============================================================ */

.sl-hamburger {
    display: none;
    width: 42px;
    height: 42px;
    margin-left: auto;
    padding: 8px;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    background: #ffffff;
    cursor: pointer;
}


    .sl-hamburger span {
        display: block;
        width: 100%;
        height: 2px;
        margin: 5px 0;
        background: #212529;
    }


/* ============================================================
   PAGE CONTENT
   ============================================================ */

.sl-main-content {
    padding: 20px;
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 991.98px) {

    .sl-user-area {
        width: 100%;
        min-width: 0;
        margin: 10px 0 0 0;
    }

    .sl-user-dropdown {
        position: static;
        width: 100%;
        box-sizing: border-box;
    }

    .sl-navbar {
        display: flex;
        flex-wrap: wrap;
        padding: 0 15px;
    }


    .sl-brand {
        margin-right: 0;
    }


    .sl-hamburger {
        display: block;
    }


    .sl-navigation {
        display: none;
        flex-basis: 100%;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }


        .sl-navigation.sl-mobile-open {
            display: flex;
        }


    /* --------------------------------------------------------
       MAIN MENU
       -------------------------------------------------------- */

    .sl-top-menu {
        width: 100%;
    }


    .sl-main-menu {
        display: block;
        width: 100%;
    }


    .sl-main-item {
        width: 100%;
    }


    .sl-main-link {
        width: 100%;
        min-height: 45px;
        padding: 10px 12px;
        border-bottom: 1px solid #eeeeee;
    }


    /* --------------------------------------------------------
       MAIN DROPDOWN
       -------------------------------------------------------- */

    .sl-main-dropdown {
        position: static;
        display: none;
        width: 100%;
        min-width: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        background: #f8f9fa;
    }


        .sl-main-dropdown.sl-show-mobile {
            display: block;
        }


    /*
       Disable desktop hover on mobile.
    */

    .sl-main-item:hover > .sl-main-dropdown {
        display: none;
    }


    /*
       But allow clicked/open menu.
    */

    .sl-main-item > .sl-main-dropdown.sl-show-mobile {
        display: block;
    }


    /* --------------------------------------------------------
       NESTED SUBMENU
       -------------------------------------------------------- */

    .sl-submenu {
        position: static;
        display: none;
        width: 100%;
        min-width: 0;
        padding: 0 0 0 15px;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        background: #ffffff;
    }


        .sl-submenu.sl-submenu-mobile-open {
            display: block;
        }


    /*
       Disable desktop hover on mobile.
    */

    .sl-has-children:hover > .sl-submenu {
        display: none;
    }


    /*
       Only the clicked submenu opens.
    */

    .sl-has-children > .sl-submenu.sl-submenu-mobile-open {
        display: block;
    }


    .sl-menu-link {
        min-height: 42px;
        padding: 10px 12px;
    }


    /* --------------------------------------------------------
       USER
       -------------------------------------------------------- */

    .sl-user-area {
        width: 100%;
        margin: 10px 0 0 0;
        border-top: 1px solid #eeeeee;
    }


    .sl-user-button {
        width: 100%;
        justify-content: flex-start;
        padding: 10px 12px;
    }


    .sl-user-dropdown {
        position: static;
        width: 100%;
        box-sizing: border-box;
        margin-bottom: 10px;
        box-shadow: none;
    }


    .sl-main-content {
        padding: 15px;
    }
}
