.custom-dropdown {
    position: relative;
    min-height: 50px;
}
    .custom-dropdown > div[value] {
        display: none;
    }
.custom-dropdown-input,
.custom-dropdown-textarea {
    width: 100%;
    padding: 16px 36px 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    cursor: pointer;
    background: transparent;
    resize: none;
    box-sizing: border-box;
}
[dir="rtl"] .custom-dropdown-input,
.custom-dropdown-textarea {
    padding: 16px 10px 5px 36px;
}
.custom-dropdown-popup {
    position: absolute;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    margin-top: 4px;
    display: none;
    z-index: 99999;
    max-height: 180px;
    overflow-y: auto;
    width: 100%;
    box-sizing: border-box;
}
.custom-dropdown.open .custom-dropdown-popup {
    display: block;
}
.custom-dropdown-item {
    padding: 8px 10px;
    cursor: pointer;
    transition: background 0.2s;
}
    .custom-dropdown-item:hover {
        background: #f0f0f0;
    }
    .custom-dropdown-item.custom-dropdown-selected {
        background: #007bff;
        color: white;
    }
    .custom-dropdown-item.highlighted {
        background: #e6f2ff;
        border: 1px solid #007bff;
    }
    .custom-dropdown-item.custom-dropdown-hover {
        color: #333;
        background-color: #ccc;
    }
.custom-dropdown-search {
    padding: 5px;
    border-bottom: 1px solid #ddd;
}
    .custom-dropdown-search input {
        width: 100%;
        padding: 6px 8px;
        border: 1px solid #ccc;
        border-radius: 4px;
        box-sizing: border-box;
    }
.custom-dropdown-remove-btn {
    position: absolute;
    gap: 4px;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    color: #888;
    display: none;
    padding: 5px;
}
    .custom-dropdown-remove-btn:hover {
        color: red;
    }
[dir="rtl"] .custom-dropdown-remove-btn {
    right: unset;
    left: 10px;
}
.custom-dropdown-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px 30px 5px 4px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: transparent;
    min-height: 50px;
    cursor: pointer;
    align-items: center;
}
[dir="rtl"] .custom-dropdown-tags {
    padding: 8px 4px 5px 30px
}
.custom-dropdown-tag {
    display: inline-flex;
    align-items: center;
    background: #007bff;
    color: white;
    border-radius: 12px;
    margin: 4px 0px;
    padding: 3px 10px;
    font-size: 13px;
    z-index: 9999;
}
    .custom-dropdown-tag button {
        border: none;
        background: none;
        color: white;
        margin-left: 4px;
        cursor: pointer;
        font-weight: bold;
        line-height: 1;
        padding: 0;
        width: 16px;
        height: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
[dir="rtl"] .custom-dropdown-tag button {
    margin-left: unset;
    margin-right: 4px;
}
[data-theme="dark"] .custom-dropdown-item {
    background-color : black;
}

[data-theme="dark"] .custom-dropdown-item:hover {
    background-color: #ccc;
    color: black;
}