/* ============================= */
/* WRAPPER */
/* ============================= */
.searchable-dropdown-wrapper {
    position: relative;
    width: 100%;
    display: block;
    isolation: isolate;
    z-index: 100;
}

/* ============================= */
/* SELECT DISPLAY */
/* ============================= */
.select-display {
    width: 100%;
    padding: 9px 10px 9px 11px;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    border: 1px solid #ced4da;
    cursor: pointer;
}

.select-display:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

/* Hide arrow if not needed */
.select-arrow {
    display: none;
}

/* ============================= */
/* DROPDOWN CONTAINER */
/* ============================= */
.searchable-results {
    display: none;
    position: absolute;
    top: calc(100% - 1px);
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #dee2e6;
    box-shadow: 0 6px 14px rgba(0,0,0,.12);
    z-index: 1000;
}

/* Open state */
.searchable-dropdown-wrapper.active .searchable-results {
    display: block;
}

/* ============================= */
/* SEARCH BOX */
/* ============================= */
.dropdown-search {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: none;
    border-bottom: 1px solid #dee2e6;
    background: #f8f9fa;
    outline: none;
}

.dropdown-search:focus {
    background: #fff;
    border-bottom-color: #007bff;
}

/* ============================= */
/* SCROLLABLE RESULTS */
/* ============================= */
.searchable-scroll {
    max-height: 250px;
    overflow-y: auto;
    overflow-x: hidden;

    /* Firefox */
    scrollbar-width: none;

    /* IE / old Edge */
    -ms-overflow-style: none;
}

/* Chrome / Edge / Safari */
.searchable-scroll::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

/* ============================= */
/* ITEMS */
/* ============================= */
.searchable-item {
    padding: 10px 12px;
    font-size: 14px;
    cursor: pointer;
    border-bottom: 1px solid #f1f1f1;
    transition: background-color .15s ease;
}

.searchable-item:hover {
    background-color: #e9ecef;
}

.searchable-item.selected {
    background-color: #007bff;
    color: #fff;
}

.searchable-item:last-child {
    border-bottom: none;
}

/* ============================= */
/* TABLE OVERLAP FIX */
/* ============================= */
.card-body {
    position: relative;
    z-index: 1;
}

.filter-section {
    position: relative;
    z-index: 10;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
}

.table-container {
    position: relative;
    z-index: 1;
}

.table-container table {
    position: relative;
    z-index: 1;
}

/* ============================= */
/* SAFETY */
/* ============================= */
.searchable-dropdown-wrapper * {
    box-sizing: border-box;
}