selector {
    display: block;
    position: relative;
    padding: 0;
    width: 100%;
    cursor: pointer;
}

selected {
    width: 100%;
    display: flex;
    align-items: center;
    background-color: #fff;
    border-radius: 10px;
    min-height: 40px;
    padding: 0 12px;
    transition: border 0.3s;
    position: relative;
}

/* Styles for when the selector is open */
selector.open selected {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

selector selected items {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

selector item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
    color: #000;
    font-size: 16px;
}

/* Dropdown Options Container */
selector options {
    position: absolute;
    left: 0;
    top: 100%;
    width: 100%;
    height: 0;
    opacity: 0;
    background-color: #fff;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 10px 10px;
    z-index: 999;
    overflow: hidden;
    transition: height 0.3s ease, opacity 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Show options when open */
selector.open options,
selector.selectorIntro options {
    opacity: 1;
    height: auto; /* JS will override this with specific px value */
    border-color: #ccc;
}

selector options item {
    border-bottom: 1px solid #f0f0f0;
}

selector options item:last-child {
    border-bottom: none;
}

selector options item:hover {
    background-color: #e3d2ff;
}

selector options item.selectedItem {
    background-color: #dac3ff;
    font-weight: 600;
}

/* Arrow Icon */
selected::after {
    content: "";
    width: 10px;
    height: 10px;
    border-right: 2px solid #666;
    border-bottom: 2px solid #666;
    transform: rotate(45deg);
    position: absolute;
    right: 15px;
    top: 40%;
    transition: transform 0.3s;
    pointer-events: none;
}

selector.open selected::after {
    transform: rotate(-135deg);
    top: 50%;
}
/* Search Component Styles */
selector options search {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
    position: sticky; /* Keeps search at top if options scroll */
    top: 0;
    background-color: #fff;
    z-index: 10;
}

selector options search input {
    width: 100%;
    padding: 8px 35px 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    outline: none;
    font-size: 14px;
    transition: border-color 0.2s;
}

selector options search input:focus {
    border-color: #dac3ff;
}

selector options search .icon {
    position: absolute;
    right: 22px;
    color: #999;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Adjust options padding if search exists */
selector options {
    padding-top: 0;
    max-height: 250px; /* Recommended height with scroll */
    overflow-y: auto;
}