
/*
Sticky menu classes; activated when user starts scrolling
 */

/* White background to prevent content from showing between header and nav */
#container:before
{
    content: "";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    height: 90px;
    width: 100%;
    background: white;
    z-index: 999;
    transition: height .3s;
}

/* Offset nav when the admin bar is shown */
body.admin-bar.sticky #main-nav
{
    margin-top: 32px;
}

/* Add a transition */
body #main-nav
{
    transition: top .3s;
}

/* Set position to fixed, position is defined in media queries down below. May need some tweaking in theme CSS */
body.sticky #main-nav
{
    position: fixed;
    padding-top: 0 !important;
    width: 100%;
    z-index: 999;
}

/* Make nave float above the dropshadow below */
body.sticky #main-nav nav
{
    z-index: 9999;
}

/* Add a dropshadow do a pseudo element, turn it on in sticky mode */
#main-nav:after
{
    content: "";
    display: block;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    -webkit-box-shadow: 0px 5px 10px 0px rgba(0,0,0,0.3);
    -moz-box-shadow: 0px 5px 10px 0px rgba(0,0,0,0.3);
    box-shadow: 0px 5px 10px 0px rgba(0,0,0,0.3);

    pointer-events: none;

    opacity: 0;
    transition: opacity .2s;
}

/* Show menu dropshadow in sticky mode */
body.sticky #main-nav:after
{
    opacity: 1;
}

/* Limit inner header in sticky mode */
body.sticky #inner-header
{
    max-height: 43px;
    overflow: hidden;
}

/* Smaller logo for a bit more room in sticky mode */
body.sticky #inner-header #logo img
{
    max-height: 30px;
}

/* Show dropshadow on nav in sticky mode */
body.sticky #main-nav:after
{
    opacity: 1;
}

body.sticky #main-nav #burger #navicon
{
    /* padding: 10px 15px; */
}

/* Small screen */
@media only screen and ( max-width: 769px )
{
    body.sticky #main-nav
    {
        top: 46px;
    }

    body.sticky #inner-header #search input
    {
        margin-top: 6px;
    }

    /* hide submenu items */
    #main-nav ul.sub-menu
    {
        display: none;
    }
}

/* Big screen */
@media only screen and ( min-width: 768px )
{
    #main-nav
    {
        top: 69px;
    }

    body.sticky #main-nav
    {
        top: 44px;
    }

    body.sticky #inner-header #search input
    {
        margin-top: 0;
    }
}

@media screen and (max-width: 782px)
{

    body.sticky.admin-bar #main-nav
    {
        margin-top: 46px;
    }

    #wpadminbar
    {
        position: fixed;
        top: 0;
    }
}