/* Admin Menu Filter */

.wp-admin .admin-menu-filter-input {
    box-sizing: border-box;
    width: calc(100% - 10px);
    padding: 4px 8px;
    margin: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background: #fff;
    transition: border-color 0.2s ease;
}

.wp-admin .admin-menu-filter-input:focus {
    outline: 2px solid transparent; /* stays visible in forced-colors / high contrast mode */
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.wp-admin .admin-menu-filter-input.fill {
    background: #f0f6fc;
    border-color: #2271b1;
}

/* Items that do not match the search */
#adminmenu li.amfed {
    display: none !important;
}

/* Items whose own label matches the search (nothing is highlighted while the box is empty) */
#adminmenu li.amf-match > a {
    box-shadow: inset 3px 0 0 #2271b1;
}

/*
 * Show the submenu of every visible item while filtering, so matching children are
 * reachable without hovering. Folded / auto-folded menus keep WordPress' flyouts.
 */
@media screen and (min-width: 961px) {
    body:not(.folded) #adminmenu li.menu-top.amf-expanded > .wp-submenu {
        position: relative;
        top: auto;
        left: auto;
        z-index: 3;
        width: auto;
        min-width: 0;
        margin-top: 0;
        border: 0 none;
        box-shadow: none;
    }
}

/* The box is useless in the folded (icon only) menu */
@media screen and (min-width: 783px) {
    .folded .admin-menu-filter {
        display: none;
    }
}

@media screen and (min-width: 783px) and (max-width: 960px) {
    .auto-fold .admin-menu-filter {
        display: none;
    }
}
