/* topmenu.css */
@import url('https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css');

:root {
    --main-bg: #eee;
    --main-fg: #111;
    --hover-bg: #56a1d5;
    --width: 325px;
    --font-family-karla: "Karla", sans-serif;
    --trans: all 0.5s ease-out !important;
}

/* ========== Base / Utilities ========== */
.qtip-font-size {
    font-size: 15px !important;
    line-height: 1.3em !important;
    text-align: justify !important;
    word-wrap: break-word;
}

.ui-tooltip,
.qtip {
    max-width: 100vw;
}

:is(.ui-tooltip,.qtip) .ui-tooltip-content {
    text-align: justify;
}

.hidden, .topBanner, [for="smallFont"], #apiPage #smallFont, #smallFont {
    display: none;
}

    #smallFont + [for="smallFont"] {
        float: right;
        width: 2ch;
        padding-left: 1ch;
        transform: translateY(33%) rotate(-90deg);
        transition: transform .25s;
    }

    #smallFont:checked + [for="smallFont"] {
        transform: translateY(-33%) rotate(90deg);
    }

a {
    text-decoration: none;
    cursor: pointer;
}

    a[disabled] {
        pointer-events: auto;
        cursor: not-allowed;
        color: #888;
    }

.menu-label,
.menu-span {
    font-family: var(--font-family-karla) !important;
}

/* ========== Header Layout / Top Menu ========== */
header {
    background: var(--color-bg-light, #f6f6f6);
    height: 51px;
    border-bottom: 1px solid #88888888;
    z-index: 10;
    position: relative;
}

    header a {
        text-decoration: none;
    }

    header * {
        box-sizing: border-box;
    }

    header #msidebar #ulTop {
        margin: 0 !important;
        float: left;
        list-style: none;
        padding: 0;
        transition: var(--trans);
    }

        header #msidebar #ulTop .dropbtn {
            border: 1px solid color-mix(in hsl, var(--color-text), transparent 80%);
            border-top-width: 0;
            border-left-width: 0;
            background: var(--color-bg-light, #eee);
            cursor: pointer;
            display: inline-block;
            width: calc(var(--width) - 1px);
            height: 53px;
            line-height: 3em;
            position: relative;
            padding: 0 0 0 12px;
            margin: 0;
            z-index: 9;
            transition: var(--trans);
            border-bottom-right-radius: 8px;
        }

        header #msidebar #ulTop .menu-label {
            font-size: 1rem;
            font-weight: 600;
            padding-left: 10px;
            line-height: 3.15rem;
        }

        header #msidebar #ulTop > li {
            width: 100%;
            padding: 0 0 0 1px;
            position: relative;
            line-height: 1em;
        }

        header #msidebar #ulTop ul {
            padding: 10px 0;
            border: 1px solid color-mix(in hsl, var(--color-text), transparent 80%);
            border-radius: 20px !important;
            width: var(--width);
            background: var(--color-bg-dark);
            display: none;
            position: absolute;
            top: 50px;
            left: 0;
            min-width: 230px;
            background-color: var(--color-bg-light, #f6f6f6);
            box-shadow: 0 8px 16px 0 rgba(0, 0, 0, .2);
            z-index: 15000;
            padding: 10px 0;
            border-radius: 10px;
        }

            header #msidebar #ulTop ul li a {
                font-size: 17px !important;
                display: block;
                padding: 0 1ch;
                font-size: 0.95rem;
                line-height: 1.5em;
                color: var(--color-text, #000);
                border-radius: 10px;
            }

                header #msidebar #ulTop ul li a span {
                    padding-left: 5px;
                }

                header #msidebar #ulTop ul li a:hover {
                    background: var(--color-primary, #56a1d5);
                    text-decoration: none;
                }

        header #msidebar #ulTop .c-hamburger {
            display: block;
            position: relative;
            margin: 14px 0;
            padding: 0;
            width: 20px;
            height: 20px;
            font-size: 0;
            border: none;
            background: transparent;
            cursor: pointer;
            line-height: 65px;
            transition: background 0.3s;
        }

            header #msidebar #ulTop .c-hamburger:focus {
                outline: none;
            }

            header #msidebar #ulTop .c-hamburger span {
                display: block;
                position: absolute;
                top: 10px;
                left: 1px;
                right: 1px;
                height: 2px;
                background: var(--color-text);
                transition: background 0.3s;
            }

                header #msidebar #ulTop .c-hamburger span::before, header #msidebar #ulTop .c-hamburger span::after {
                    position: absolute;
                    left: 0;
                    width: 100%;
                    height: 2px;
                    background-color: var(--color-text);
                    content: "";
                    transition-duration: 0.3s;
                    transition-delay: 0;
                    transition-property: top, bottom, transform;
                }

                header #msidebar #ulTop .c-hamburger span::before {
                    top: -5px;
                }

                header #msidebar #ulTop .c-hamburger span::after {
                    bottom: -5px;
                }

        header #msidebar #ulTop #mnu:checked ~ .dropbtn .c-hamburger span {
            background: none;
        }

            header #msidebar #ulTop #mnu:checked ~ .dropbtn .c-hamburger span::before {
                top: 0;
                transform: rotate(45deg);
            }

            header #msidebar #ulTop #mnu:checked ~ .dropbtn .c-hamburger span::after {
                bottom: 0;
                transform: rotate(-45deg);
            }

    header #msidebar .logo {
        position: absolute;
        left: calc(var(--width) - 40px);
        top: 0;
        transform: translateX(-50%);
        margin: 2px 0;
        max-height: 44px;
        width: auto;
        transition: all 1s;
        pointer-events: none;
        z-index: 998;
        opacity: 1;
        transition: var(--trans);
    }

[data-bs-theme="dark"] header #msidebar .logo {
    opacity: .5;
}

/* ========== User Profile Dropdown ========== */
.right_header_nopadding {
    float: right;
}

.nomargin {
    margin: 0 !important;
}

#userpro {
    background: var(--color-bg-light, #f6f6f6);
    margin: 0 !important;
    padding: 10px;
    border: 1px solid #88888888;
    border-top-width: 0 !important;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 5;
    min-width: 28ch;
    max-height: 52px;
    min-height: 52px;
    border-bottom-left-radius: 4px;
    transition: var(--trans);
    display: flex;
    flex-direction: column;
}

    #userpro .prolink {
        cursor: default;
        color: var(--color-primary);
    }

    #userpro ul {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    #userpro > ul {
        max-height: 0;
        overflow: hidden;
        width: 28ch !important;
        float: right;
        clear: both;
        opacity: 0;
        transition: var(--trans);
    }

        #userpro > ul > li {
            clear: both;
        }

            #userpro > ul > li > ul {
                padding-left: 2ch;
                overflow: hidden;
                border-left: 1px solid #ddd;
                margin-left: 1ch;
                clear: both;
                display: flex;
                flex-direction: column;
                align-items: start;
            }

    #userpro:hover {
        border-bottom-left-radius: 20px;
        max-height: 15em;
    }

        #userpro:hover > ul {
            margin-top: 10px;
            max-height: 15em;
            opacity: 1;
        }

/* ========== Sidebar / Submenu basics (nested) ========== */
#msidebar {
    height: 100%;
    float: left;
}

    #msidebar ul {
        list-style-type: none;
        margin: 0;
        padding: 0;
    }

        #msidebar ul li {
            display: inline-block;
            position: relative;
        }

            #msidebar ul li a {
                background: transparent;
                transition: var(--trans);
            }

    /* first-level submenu */
    #msidebar li ul {
        background-color: var(--color-bg-light, #f6f6f6);
        position: absolute;
        left: 0;
    }

    #msidebar li li {
        position: relative;
        margin: 0;
        display: block;
        padding: 0;
    }

        #msidebar li li:empty {
            height: .75em;
        }

        #msidebar li li ul {
            position: absolute;
            top: 0;
            left: 250px;
            margin: 0;
        }

/* generic sub-menu behaviour */
ul.sub-menu {
    display: none;
}

li.dropdown > a {
    background-position: right 20px;
    background-repeat: no-repeat;
}

li li.dropdown > a {
    background-position: right 16px;
}

@media (min-width: 768px) {
    [data-font-size="small"] .page-content {
        min-width: 1000px;
    }

    #header_content #msidebar #ulTop {
        border-radius: 0 0 20px 0 !important;
    }

        #header_content #msidebar #ulTop ul {
            max-height: 0 !important;
            background: var(--color-bg-light);
            border-bottom-width: 0;
            border-top-width: 0;
            border-radius: 0 0 20px 0 !important;
            overflow: hidden !important;
            padding: 0 !important;
            opacity: 0.5;
            display: block !important;
            transition: var(--trans) !important;
        }

    :is(#header_content #msidebar #ulTop:hover,#header_content #msidebar #ulTop #mnu:checked) ul, :is(#header_content #msidebar #ulTop:hover,#header_content #msidebar #ulTop #mnu:checked) ~ ul {
        border-bottom-width: 1px !important;
        max-height: 100vh !important;
        opacity: 1 !important;
        top: 50px !important;
    }

    :is(#header_content #msidebar #ulTop:hover,#header_content #msidebar #ulTop #mnu:checked) ~ .dropbtn, :is(#header_content #msidebar #ulTop:hover,#header_content #msidebar #ulTop #mnu:checked) .dropbtn {
        border-bottom-right-radius: 0;
    }
}

.topBanner ~ header .dropbtn {
    border-top: color-mix(in hsl, red, transparent 50%) 1px solid !important;
}

@media only screen and (max-width: 767px) {
    #header_content {
        background: transparent !important;
        border: none;
    }

        #header_content #msidebar {
            position: absolute;
            top: 0;
            left: 0;
            z-index: 0;
        }

            #header_content #msidebar #ulTop .dropbtn {
                background: transparent;
                margin: 0;
                border: none;
            }

            #header_content #msidebar #ulTop ul {
                transition: all 1s;
                opacity: 0;
                top: 0 !important;
                max-height: 0;
            }

    :is(#header_content #msidebar #ulTop:hover,#header_content #msidebar #ulTop #mnu:checked) ul, :is(#header_content #msidebar #ulTop:hover,#header_content #msidebar #ulTop #mnu:checked) ~ ul {
        transition: var(--trans);
        top: 50px !important;
        max-height: 100vh;
        opacity: 1;
        display: block;
        overflow: hidden;
    }

    :is(#header_content #msidebar #ulTop:hover,#header_content #msidebar #ulTop #mnu:checked) .dropbtn {
        border-bottom-right-radius: 0;
    }

    #header_content #msidebar .logo {
        left: 20ch;
        opacity: 1;
    }

    #header_content #userpro {
        background: color-mix(in hsl, var(--color-bg-light), transparent 5%);
        position: absolute !important;
        z-index: 9999 !important;
    }

        #header_content #userpro a {
            color: var(--color-primary);
        }

            #header_content #userpro a:hover {
                color: var(--color-secondary);
            }
}

@media only screen and (max-height: 550px) {
    #header_content #msidebar #ulTop #myDropdown {
        overflow: auto !important;
    }
}
