.ombox-indexed-dropdown {
    position: relative;
    font-size: var(--widget-font-size, 14px);
    line-height: var(--widget-line-height, 1.571);
    z-index: 1;
}

.ombox-indexed-dropdown.is-open {
    z-index: 1200;
}

.ombox-indexed-field {
    position: relative;
}

.ombox-indexed-search {
    min-height: var(--widget-control-min-height, 38px);
    height: var(--widget-control-min-height, 38px);
    font-size: var(--widget-font-size, 14px);
    line-height: var(--widget-line-height, 1.571);
    padding-right: 34px;
    border-radius: var(--widget-control-radius, var(--radius-md, 8px));
}

.ombox-indexed-values {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}

.ombox-indexed-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 24px;
    height: 24px;
    max-width: 100%;
    padding: 2px 7px;
    color: var(--color-primary, #2563eb);
    background: var(--color-primary-light, #e8f2ff);
    border: 1px solid rgba(37, 99, 235, .22);
    border-radius: 999px;
    box-sizing: border-box;
    font-size: var(--widget-small-font-size, 12px);
    line-height: var(--widget-small-line-height, 1.5);
}

.ombox-indexed-chip > span {
    max-width: min(220px, calc(100vw - 120px));
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ombox-indexed-chip button {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: 0;
    color: currentColor;
    background: transparent;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
}

.ombox-indexed-chip button:hover,
.ombox-indexed-chip button:focus {
    background: rgba(37, 99, 235, .12);
    outline: 0;
}

.ombox-indexed-dropdown.is-multiple .ombox-indexed-field {
    min-height: var(--widget-control-min-height, 38px);
    height: var(--widget-control-min-height, 38px);
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    width: 100%;
    overflow: hidden;
    padding: 2px 34px 2px 8px;
    color: var(--color-text-primary, #1e293b);
    background: var(--color-white, #fff);
    border: 1px solid var(--color-border, #d7dde5);
    border-radius: var(--widget-control-radius, var(--radius-md, 8px));
    box-sizing: border-box;
}

.ombox-indexed-dropdown.is-multiple .ombox-indexed-field:focus-within {
    border-color: var(--color-primary, #2563eb);
    box-shadow: none;
}

.ombox-indexed-dropdown.is-invalid .ombox-indexed-field,
.ombox-indexed-dropdown.is-multiple .ombox-indexed-field:has(.is-invalid),
.ombox-indexed-dropdown.is-multiple .ombox-indexed-field:has(:invalid) {
    border-color: var(--color-border, #dee2e6);
    box-shadow: none;
}

.ombox-indexed-dropdown.is-invalid .ombox-indexed-field:focus-within,
.ombox-indexed-dropdown.is-multiple .ombox-indexed-field:has(.is-invalid):focus-within,
.ombox-indexed-dropdown.is-multiple .ombox-indexed-field:has(:invalid):focus-within {
    border-color: var(--color-primary, #2563eb);
    box-shadow: none;
}

.ombox-indexed-dropdown.is-multiple .ombox-indexed-values {
    display: contents;
}

.ombox-indexed-dropdown.is-multiple .ombox-indexed-chip {
    flex: 0 1 auto;
    min-width: 0;
    width: auto;
}

.ombox-indexed-dropdown.is-multiple .ombox-indexed-search {
    flex: 1 1 80px;
    min-width: 72px;
    width: auto;
    min-height: calc(var(--widget-control-min-height, 38px) - 6px);
    height: calc(var(--widget-control-min-height, 38px) - 6px);
    padding: 1px 0;
    font-size: var(--widget-font-size, 14px);
    line-height: var(--widget-line-height, 1.571);
    background: transparent !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

.ombox-indexed-dropdown.is-multiple .ombox-indexed-search:focus {
    background: transparent !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

.ombox-indexed-dropdown.is-multiple .ombox-indexed-search.is-invalid,
.ombox-indexed-dropdown.is-multiple .ombox-indexed-search:invalid {
    border: 0 !important;
    box-shadow: none !important;
}

.ombox-indexed-hidden-values {
    display: none;
}

.ombox-indexed-search-icon,
.ombox-indexed-clear {
    position: absolute;
    top: 50%;
    right: 11px;
    z-index: 2;
    transform: translateY(-50%);
}

.ombox-indexed-search-icon {
    color: var(--color-text-muted, #64748b);
    font-size: 13px;
    line-height: 1;
    pointer-events: none;
}

.ombox-indexed-dropdown.has-clear .ombox-indexed-search-icon {
    display: none;
}

.ombox-indexed-clear {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--color-text-muted, #64748b);
    background: var(--color-white, #fff);
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    line-height: 1;
    pointer-events: auto;
    z-index: 3;
}

.ombox-indexed-clear[hidden] {
    display: none;
}

.ombox-indexed-clear:hover,
.ombox-indexed-clear:focus {
    color: var(--color-text-primary, #1e293b);
    background: var(--color-surface-muted, #f8fafc);
    outline: 0;
}

.ombox-indexed-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    left: 0;
    z-index: 1600;
    max-height: var(--ombox-indexed-menu-max-height, 280px);
    display: none;
    overflow: auto;
    padding: 4px 0;
    background: var(--color-white, #fff);
    border: var(--border-width-thin, 1px) solid var(--color-border, #d7dde5);
    border-radius: var(--radius-md, 8px);
    box-shadow: var(--shadow-lg, 0 16px 38px rgba(15, 23, 42, .16));
}

.ombox-indexed-dropdown.is-open .ombox-indexed-menu {
    display: block;
}

.ombox-indexed-dropdown.is-dropup .ombox-indexed-menu {
    top: auto;
    bottom: calc(100% + 4px);
}

.ombox-indexed-option {
    width: 100%;
    min-height: var(--widget-option-min-height, 36px);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    gap: 0;
    padding: 7px 10px;
    background: var(--color-white, #fff);
    color: var(--color-text-primary, #1e293b);
    border: 0;
    text-align: left;
    cursor: pointer;
}

.ombox-indexed-option:hover,
.ombox-indexed-option:focus,
.ombox-indexed-option.is-active,
.ombox-indexed-option.is-selected {
    background: var(--color-primary-light, #e8f2ff);
    outline: 0;
}

.ombox-indexed-option.is-selected span::after {
    content: "已选";
    float: right;
    margin-left: 8px;
    color: var(--color-primary, #2563eb);
    font-size: var(--widget-small-font-size, 12px);
    font-weight: 650;
}

.ombox-indexed-option span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: var(--widget-font-size, 14px);
    line-height: var(--widget-line-height, 1.571);
}

.ombox-indexed-dropdown.is-readonly,
.ombox-indexed-dropdown.is-disabled {
    cursor: not-allowed;
}

.ombox-indexed-dropdown.is-readonly .ombox-indexed-search,
.ombox-indexed-dropdown.is-disabled .ombox-indexed-search {
    background: #eef1f4 !important;
    border-color: #cbd3dc !important;
    color: #667085 !important;
    cursor: not-allowed !important;
    pointer-events: none;
    box-shadow: none !important;
}

.ombox-indexed-dropdown.is-readonly.is-multiple .ombox-indexed-field,
.ombox-indexed-dropdown.is-disabled.is-multiple .ombox-indexed-field {
    background: #eef1f4 !important;
    border-color: #cbd3dc !important;
    color: #667085 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
}

.ombox-indexed-dropdown.is-readonly .ombox-indexed-menu,
.ombox-indexed-dropdown.is-disabled .ombox-indexed-menu {
    display: none !important;
}

body.eye-protection .ombox-indexed-menu {
    background: #faf8f3;
    border-color: #d9cbb8;
}

body.eye-protection .ombox-indexed-dropdown.is-multiple .ombox-indexed-field {
    color: #4a3c28;
    background: #faf8f3;
    border-color: #d9cbb8;
}

body.eye-protection .ombox-indexed-dropdown.is-multiple .ombox-indexed-field:focus-within {
    border-color: #c9965b;
    box-shadow: none;
}

body.eye-protection .ombox-indexed-chip {
    color: #4a3c28;
    border-color: #d9cbb8;
    background: #f5f1e8;
}

body.eye-protection .ombox-indexed-chip button:hover,
body.eye-protection .ombox-indexed-chip button:focus {
    background: #eadfce;
}

body.eye-protection .ombox-indexed-search-icon {
    color: #6b5d4f;
}

body.eye-protection .ombox-indexed-clear {
    color: #6b5d4f;
}

body.eye-protection .ombox-indexed-clear:hover,
body.eye-protection .ombox-indexed-clear:focus {
    color: #4a3c28;
    background: #f5f1e8;
}

body.eye-protection .ombox-indexed-dropdown.is-readonly .ombox-indexed-search,
body.eye-protection .ombox-indexed-dropdown.is-disabled .ombox-indexed-search {
    background: #e9e1d2 !important;
    border-color: #c9b99f !important;
    color: #6b5d4f !important;
}

body.eye-protection .ombox-indexed-dropdown.is-readonly.is-multiple .ombox-indexed-field,
body.eye-protection .ombox-indexed-dropdown.is-disabled.is-multiple .ombox-indexed-field {
    background: #e9e1d2 !important;
    border-color: #c9b99f !important;
    color: #6b5d4f !important;
}
