.panel-search {
    box-sizing: border-box;
    position: relative;
    min-width: 0;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 5px;
    border: 1px solid var(--theme-control-border, var(--theme-border));
    border-radius: 9px;
    background: var(--theme-input, var(--theme-surface));
}
.panel-search > .form-control {
    min-height: 44px;
    flex: 1 1 140px;
    width: 140px;
    min-width: 0;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}
.panel-search-clear {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--theme-muted);
    font-size: 24px;
    cursor: pointer;
}
.panel-search-clear:hover {
    background: var(--theme-hover);
}
.panel-search-results {
    position: absolute;
    z-index: 1100;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    max-height: 280px;
    overflow: auto;
    padding: 6px;
    border: 1px solid var(--theme-border);
    border-radius: 10px;
    background: var(--theme-surface);
    box-shadow: var(--theme-shadow);
}
.panel-search-results[hidden],
.panel-search-clear[hidden] {
    display: none !important;
}
.panel-search-results > button {
    display: block;
    width: 100%;
    text-align: left;
    min-height: 44px;
    padding: 10px 12px;
    border: 0;
    border-radius: 6px;
    color: var(--theme-text);
    background: transparent;
    font: inherit;
    line-height: 1.5;
    white-space: normal;
    cursor: pointer;
}
.panel-search-results > button:hover,
.panel-search-results > [data-active],
.panel-search-results > [aria-selected='true'] {
    background: var(--theme-active);
    color: var(--theme-link);
}
.panel-search-empty {
    padding: 14px;
    color: var(--theme-muted);
    font-size: 13px;
}
.panel-search :focus-visible {
    outline: 3px solid var(--theme-focus);
    outline-offset: 2px;
}
select[hidden] {
    display: none !important;
}

.panel-search:focus-within {
    border-color: var(--theme-focus);
    box-shadow: var(--theme-focus-ring);
}
.panel-search-chip {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-width: 0;
    border: 1px solid var(--theme-primary);
    border-radius: 7px;
    color: var(--theme-link);
    background: var(--theme-active);
}
.panel-search-chip-label {
    padding: 8px 4px 8px 12px;
    overflow-wrap: anywhere;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    cursor: pointer;
}
.panel-search-chip[hidden] {
    display: none !important;
}
.panel-search:has(input:disabled) {
    opacity: 0.65;
}

html:is([data-theme-page^='admin-'], [data-theme-page^='public-'])
    .choices__list--single
    .choices__item:not(.choices__placeholder) {
    border: 1px solid var(--theme-primary);
    border-radius: 7px;
    background: var(--theme-active);
    color: var(--theme-link);
    padding: 6px 10px;
    font-weight: 600;
    overflow-wrap: anywhere;
}
html:is([data-theme-page^='admin-'], [data-theme-page^='public-'])
    :is(.suite-chip, .filter-chip) {
    border-color: var(--theme-primary);
}
