:root {
    --menu-item-hov-color: #90c8ee;
    --menu-opener-hov-bg-color: rgba(144, 200, 238, 0.15);
    --menu-links-color: #eee;
}

.page-fader-tis {
    position: fixed;
    margin-left: -100vw;
    z-index: 1;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: var(--body-color);
    opacity: 0.6;
}

.responsive-menu {
    /* mainmenu & submenus */
    list-style-type: none;
    list-style: none;
    padding: 0;
    margin: 0;
    width: 90%;
}

.responsive-menu a:hover {
    color: var(--menu-item-hov-color);
    text-decoration: none;
    background-color: rgba(0, 0, 80, 0.8);
    border-radius: 0 8px 0 0;
    border-bottom: 3px solid rgba(255, 255, 255, 1);
}

.responsive-menu a {
    display: block;
    text-decoration: none;
    padding: 8px 0 8px 10px;
    color: var(--menu-links-color);
    border-bottom: 3px solid rgba(255, 255, 255, 0);
    margin-top: 5px;
}

.responsive-menu a:visited {
    color: var(--menu-links-color);
}

.responsive-submenu {
    /* mainmenu & submenu classes */
    list-style-type: none;
    list-style: none;
    padding: 0;
    font-size: 78%;
    background-color: rgba(0, 0, 80, 0.8);
    border-radius: 0 0 8px;
}

.responsive-menu li:hover .responsive-submenu {
    display: block;
    max-height: 500px;
    -webkit-transition: all 0.4s ease-out 0.2s;
}

/* Now overwrite bg-color for .submenu links only. CSS reads down the page so code at bottom will overwrite earlier code */
.responsive-submenu a {
    background-image: linear-gradient(to right, var(--menu-left-color), var(--submenu-left-color), var(--submenu-right-color));
}

.responsive-submenu a:hover {
    background-image: linear-gradient(to right, var(--menu-left-color), var(--submenuitem-hover-left-color), var(--submenuitem-hover-right-color));
    color: var(--menu-item-hov-color);
}

/* initial state of submenus: max-height ZERO & overflow HIDDEN */
.responsive-submenu {
    padding-left: 8px;
    overflow: hidden;
    max-height: 0;
    -webkit-transition: all 0.8s ease-out 1.5s;
}

/* Tweak appearance of list elements to enhance clarity for users: */
.vmenu .responsive-submenu {
    margin: 0 0 0 0;
}

.vmenu {
    display: block;
    z-index: 10;
    min-width: var(--menu-width);

    /* min-height: 100%; */
    margin-left: 0;
}

/* Toggle code for vertical menu */
.vmenu-input {
    display: none;
}

.vmenu-opener {
    /* background-color: rgba(100, 100, 100, 0.2); */
    position: absolute;
    z-index: 3;
    color: #181818;
    width: 1.8em;
    height: 1.8em;
    border: 1px solid #181818;
    text-align: center;
    font-size: 1.2em;
    border-radius: 5px;
    margin-left: var(--menu-opener-posn-fix);
    margin-top: 2px;
    margin-bottom: 0;
    font-weight: 700;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.vmenu-opener span {
    margin: auto;
}

/* Unable to get correct hamburger appearance on Samsung (Chromium) Browser 
    AND cannot identify hamburger code in main TIS pages to copy/paste into training pages
@media (max-width: 767px) and (min-resolution: 1.5dppx) {
    .hamburger-tis {
        margin-top: -5px; 
        background-color: brown;
    }
} */
@media (max-width: 767px) {
    .responsive-menu {
        display: block;
        margin-top: 35px;
    }

    #toggling-content {
        display: none;
    }

    /* If box CHECKED, hide menu */
    #vmenu-checkbox:checked~#toggling-content {
        display: none;
    }

    #vmenu-checkbox:checked~.page-fader-tis {
        margin-left: -100vw;
    }

    /* If box CHECKED, burger-bg */
    #vmenu-checkbox:checked~.vmenu-opener:hover {
        /* background-color: var(--menu-opener-bg-hover); */
        color: var(--menu-item-hov-color);
        border-color: var(--menu-item-hov-color);
        background-color: var(--menu-opener-hov-bg-color);
    }

    /* If box CHECKED display hamburger & hide x */
    #vmenu-checkbox:checked~.vmenu-opener>span:nth-of-type(1) {
        display: none;
    }

    #vmenu-checkbox:checked~.vmenu-opener>span:nth-of-type(2) {
        display: block;
        font-weight: 900;
    }

    /* If box UNCHECKED hide hamburger & display x */
    #vmenu-checkbox~.vmenu-opener>span:nth-of-type(1) {
        display: block;
        margin-top: -3px;
        font-weight: 300;
    }

    #vmenu-checkbox~.vmenu-opener>span:nth-of-type(2) {
        display: none;
    }

    /* menu-opener color to match Menu text color: */
    #vmenu-checkbox~.vmenu-opener {
        color: #eee;
        border-color: #eee;
        display: flex;
        align-items: center;
        justify-content: center;
        align-content: center;
    }

    /* If box UNCHECKED, burger-bg GREY on hover */
    #vmenu-checkbox~.vmenu-opener:hover {
        border-color: var(--menu-item-hov-color);
        background-color: var(--menu-opener-hov-bg-color);
    }

    /* If box UNCHECKED show menu */
    #vmenu-checkbox~#toggling-content {
        margin-top: 0;
        display: block;
        position: absolute;
        top: 0;
        margin-left: var(--menu-width);
        width: 50vw;
        min-height: 100vh;

        /* width: var(--menu-width); */
        background-image: linear-gradient(to right, var(--menu-left-color), var(--toggled-menu-mid-color), var(--toggled-menu-right-color));

        /* background-image: linear-gradient(to right, #111, #777 90%, #ccc); */
        box-shadow: 0px 4px 15px 8px var(--toggled-menu-shadow-color);
        border-radius: 0 6px 6px 0;
    }

    #vmenu-checkbox~#page-fader-tis {
        margin-left: 0;
    }

    .vmenu {
        display: block;
        position: absolute;

        /* width: 50%; */
        z-index: 10;
        margin-left: var(--menu-offset);
    }

    .main-editable-area {
        margin-left: 30px;
    }
}

@media (min-width:768px) {
    .vmenu-opener {
        display: none;
    }

    .page-fader-tis {
        margin-left: -100vw;
    }

    #toggling-content {
        width: var(--menu-width);
    }
}

