.autoload-select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
}

.autoload-select-wrapper input {
    flex: 1;
    min-width: 0;
    padding-right: 8px !important;
}

/* Dropdown toggle button */
.autoload-select-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    border-radius: 2px;
    transition: background-color 0.15s ease;
}

.autoload-select-toggle:hover {
    background-color: rgba(0, 0, 0, 0.08);
}

.autoload-select-toggle:focus {
    outline: 2px solid #0066cc;
    outline-offset: 1px;
}

.autoload-select-toggle:focus:not(:focus-visible) {
    outline: none;
}

.autoload-select-toggle:focus-visible {
    outline: 2px solid #0066cc;
    outline-offset: 1px;
}

.autoload-select-icon {
    width: 20px;
    height: 20px;
    color: #666;
    transition: transform 0.2s ease;
}

.autoload-select-wrapper.is-open .autoload-select-icon {
    transform: rotate(180deg);
}

/* Listbox dropdown */
.autoload-select-listbox {
    position: absolute;
    top: calc(100% + 4px);
    left: -17px;
    right: -17px;
    max-height: 240px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #8c8c8c;
    margin: 0;
    padding: 4px 0;
    list-style: none;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

.autoload-select-listbox[hidden] {
    display: none;
}

.autoload-select-option {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 0.875rem;
    line-height: 1.4;
    transition: background-color 0.1s ease;
}

.autoload-select-option:hover {
    background-color: #f5f5f5;
}

.autoload-select-option.highlighted {
    background-color: #0066cc;
    color: #fff;
}

.autoload-select-option[aria-selected="true"]:not(.highlighted) {
    background-color: #e6f3ff;
}

.autoload-select-no-results {
    padding: 10px 16px;
    color: #666;
    font-style: italic;
    font-size: 0.875rem;
}

.autoload-select-empty {
    padding: 10px 16px;
    color: #888;
    font-style: italic;
    font-size: 0.875rem;
    background-color: #f9f9f9;
    cursor: default;
}

.autoload-select-loading {
    padding: 10px 16px;
    color: #666;
    font-size: 0.875rem;
}

/* Focus styles for input */
.autoload-select-wrapper input:focus {
    outline: none;
}

.autoload-select-wrapper:focus-within {
}
