/* Off-canvas mobile menu for the static mirror.
   Uses #id selectors so it wins over the theme rule `.mobilemenu{display:none}`. */

#mobilemenu {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    width: 280px;
    max-width: 85%;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #1e73be;
    box-shadow: 6px 0 20px rgba(48, 48, 60, .3);
    transform: translateX(-100%);
    transition: transform .28s ease;
    visibility: hidden;
}

#mobilemenu.is-open {
    transform: translateX(0);
    visibility: visible;
}

#mobilemenu ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

#mobilemenu li {
    position: relative;
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}

#mobilemenu li:before {
    content: none;
    display: none;
}

#mobilemenu li a {
    display: block;
    padding: 13px 46px 13px 20px;
    color: #fff;
    font-size: 15px;
    line-height: 20px;
    text-decoration: none;
}

#mobilemenu li a:hover,
#mobilemenu li a:focus {
    background: rgba(0, 0, 0, .16);
    color: #fff;
}

#mobilemenu .current-menu-item > a,
#mobilemenu .current_page_item > a {
    background: rgba(0, 0, 0, .22);
}

/* submenus stay collapsed until their toggle is pressed.
   !important is required: the theme's jQuery sets an inline display:none on
   .sub-menu, and an inline declaration would otherwise win over these rules. */
#mobilemenu ul.sub-menu {
    display: none !important;
    background: rgba(0, 0, 0, .18);
}

#mobilemenu li.is-expanded > ul.sub-menu {
    display: block !important;
}

#mobilemenu ul.sub-menu li a {
    padding-left: 36px;
    font-size: 14px;
}

#mobilemenu ul.sub-menu ul.sub-menu li a {
    padding-left: 52px;
}

/* caret button injected next to parent items */
#mobilemenu .mm-subtoggle {
    position: absolute;
    top: 0;
    right: 0;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 0;
    border-left: 1px solid rgba(255, 255, 255, .12);
    background: transparent;
    color: #fff;
    font-size: 16px;
    line-height: 46px;
    cursor: pointer;
}

#mobilemenu .mm-subtoggle:before {
    content: "\203A";
    display: block;
    transition: transform .2s ease;
    transform: rotate(90deg);
}

#mobilemenu li.is-expanded > .mm-subtoggle:before {
    transform: rotate(-90deg);
}

#mobilemenu .mm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 12px 14px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, .2);
    color: #fff;
    font-size: 14px;
    text-transform: uppercase;
}

#mobilemenu .mm-close {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 3px;
    background: rgba(0, 0, 0, .2);
    color: #fff;
    font-size: 22px;
    line-height: 32px;
    cursor: pointer;
}

#mm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
    width: 100%;
    height: 100%;
    background: rgba(20, 24, 34, .55);
    opacity: 0;
    visibility: hidden;
    transition: opacity .28s ease;
}

#mm-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

body.mm-locked {
    overflow: hidden;
}

/* the burger itself is shown by the theme only below 900px */
#mob a {
    cursor: pointer;
}

/* on wide screens the off-canvas panel must never appear */
@media only screen and (min-width: 901px) {
    #mobilemenu,
    #mm-overlay {
        display: none;
    }
}
