/*----------- CUSTOM DROPDOWN -----------------------*/

.customdropdown {
    width: 100%;
    display: block;
    position: relative;
}

/* Toggle (tampilan utama seperti select) */
.customdropdown .dropdown-toggle {
    width: 100%;
    text-align: left;
    background-color: #fff;
    border: 1px solid #e6ebf1;
    color: #495057;
    height: 38px;
    padding: 6px 12px;
    padding-right: 35px;
    display: flex;
    align-items: center;
    border-radius: 4px;
    position: relative;
    font-size: 14px;
}

/* Focus state */
.customdropdown .dropdown-toggle:focus {
    box-shadow: none;
    border-color: #409eff;
}


/* Dropdown menu */
.customdropdown .dropdown-menu {
    width: 100%;
    min-width: unset;
    border-radius: 8px;
    border: 1px solid #e4e7ed;
    margin-top: 4px;
}

/* Item */
.customdropdown .dropdown-menu .dropdown-item {
    width: 100%;
    min-height: 42px;
    padding: 8px 12px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Active item */
.customdropdown .dropdown-menu .dropdown-item.active {
    background-color: rgba(64, 158, 255, 0.15);
    border-radius: 0;
}

/* Divider antar active */
.customdropdown .dropdown-item.active + .dropdown-item.active {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* Check icon */
.customdropdown .check-icon {
    font-size: 14px;
    color: #409eff;
    margin-left: 8px;
}

/* Scroll */
.customdropdown .dropdown-scroll {
    max-height: 300px;
    overflow-y: auto;
}

/* Search input */
.customdropdown .dropdown-search {
    background-color: #fff;
    border: 1px solid #dcdfe6 !important;
    color: #495057;
    height: 36px;
    border-radius: 6px;
}

.customdropdown .dropdown-search::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

.customdropdown .dropdown-search:focus {
    border-color: #409eff;
    box-shadow: 0 0 0 0.15rem rgba(64, 158, 255, 0.25);
    background-color: #fff;
    color: #495057;
}

/* Clear search */
.customdropdown .clear-search {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 16px;
    color: rgba(0,0,0,0.4);
}

.customdropdown .clear-search:hover {
    color: #000;
}

/* Select / Deselect button */
.customdropdown .btn.active {
    background-color: #409eff;
    color: #fff;
    border-color: #409eff;
}

/* Divider item */
.customdropdown .dropdown-menu li:not(:last-child) .dropdown-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/*----------- CUSTOM DROPDOWN -----------------------*/


.customdropdown .select2-selection__arrow {
    position: absolute;
    right: 10px;
    top: 0;
    height: 100%;
    width: 20px;
}

.customdropdown .select2-selection__arrow b {
    border-color: #728096 transparent transparent transparent;
    border-style: solid;
    border-width: 5px 4px 0 4px;

    position: absolute;
    top: 50%;
    left: 50%;

    transform: translate(-50%, -50%);
}

.customdropdown.open .select2-selection__arrow b {
    border-color: transparent transparent #728096 transparent;
    border-width: 0 4px 5px 4px;
}

.customdropdown .dropdown-toggle::after {
    display: none !important;
}

.customdropdown .expired {
    color: gray;
    font-style: italic;
}

.customdropdown .is-expired {
    opacity: 0.7;
}

.customdropdown .selected-text.is-placeholder {
    color: #b4bed1 !important;
}
