/*
 * Scrollable variant of the backend dropdown menu.
 * Usage: <ul class="dropdown-menu dropdown-scrollable">
 */

.dropdown-menu.dropdown-scrollable .dropdown-container {
    position: relative;
}

.dropdown-menu.dropdown-scrollable .dropdown-container > ul {
    /* 12.5 rows of 38.57px; the partly visible last row shows that the list scrolls */
    max-height: 482px;
    overflow-y: auto;
    /* Stops the wheel from scrolling the page once the list reaches its end */
    overscroll-behavior: contain;
}

/* A scrolling list clips the caret drawn above it, so the caret is drawn on the container instead */
.dropdown-menu.dropdown-scrollable .dropdown-container > ul:before,
.dropdown-menu.dropdown-scrollable .dropdown-container > ul:after {
    display: none;
}

.dropdown-menu.dropdown-scrollable .dropdown-container:before,
.dropdown-menu.dropdown-scrollable .dropdown-container:after {
    content: '';
    position: absolute;
    border-style: solid;
    border-color: transparent;
}

.dropdown-menu.dropdown-scrollable .dropdown-container:before {
    top: -9px;
    left: 14px;
    z-index: 600;
    border-width: 0 8.5px 9px;
    border-bottom-color: rgba(0, 0, 0, 0.2);
}

.dropdown-menu.dropdown-scrollable .dropdown-container:after {
    top: -8px;
    left: 15px;
    z-index: 601;
    border-width: 0 7.5px 8px;
    border-bottom-color: #fff;
}
