/* Nested menu dropdown/flyout behaviour for the default theme's render_menu() output. */

.menu-item.has-children {
    position: relative;
}

.menu-item.has-children > .menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin: 0;
    min-width: 12rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 20;
}

/* Submenus nested two or more levels deep fly out to the side of their parent
   instead of dropping further down. The descendant combinator on the left
   matches any depth without needing to count levels. */
.menu-item.has-children .menu-item.has-children > .menu {
    top: 0;
    left: 100%;
}

.menu-item.has-children:hover > .menu,
.menu-item.has-children:focus-within > .menu,
.menu-item.has-children.is-open > .menu {
    display: block;
}

.menu a {
    display: block;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    transition: background-color 0.15s ease;
}

.menu a:hover,
.menu a:focus {
    background-color: #f3f4f6;
}
