.res-catalog.res-ui .res-select-wrap.is-enhanced > svg { display: none; }
/* Keep native controls and their JS replacements in the same layout slot. */
.res-catalog.res-ui .res-filter-select .res-select-wrap { height: 36px; flex: 0 1 auto; }
.res-catalog.res-ui .res-select-wrap[data-selected-label]::before { content: attr(data-selected-label); visibility: hidden; white-space: nowrap; font-size: 12px; font-weight: 500; line-height: 20px; padding: 7px 35px 7px 9px; border: 1px solid transparent; box-sizing: border-box; }
.res-catalog.res-ui .res-select-wrap[data-selected-label] > select,
.res-catalog.res-ui .res-select-wrap[data-selected-label] > .res-select-trigger { position: absolute; inset: 0; width: 100%; max-width: none; }
.res-catalog.res-ui .res-catalog-results .res-select-wrap { height: 36px; flex: 0 1 auto; }
.res-catalog.res-ui .res-catalog-results .res-select-wrap::before { font-size: 11px; }
.res-catalog.res-ui .res-select-wrap > svg,
.res-catalog.res-ui .res-select-trigger > svg { position: absolute; right: 10px; top: 50%; margin-top: -7px; }
.res-catalog.res-ui .res-select-wrap > svg { right: 11px; }
.res-catalog.res-ui .res-select-wrap > .res-select-trigger { padding-right: 35px; }
.res-catalog.res-ui .res-select-wrap > select,
.res-catalog.res-ui .res-select-wrap > .res-select-trigger { box-sizing: border-box; height: 36px; min-height: 36px; line-height: 20px; }
@media (max-width: 760px) {
    .res-catalog.res-ui .res-filter-select .res-select-wrap { width: 100%; height: 40px; flex: 0 0 auto; }
    .res-catalog.res-ui .res-filter-select .res-select-wrap[data-selected-label]::before { display: none; }
    .res-catalog.res-ui .res-filter-select .res-select-wrap > select,
    .res-catalog.res-ui .res-filter-select .res-select-wrap > .res-select-trigger { height: 40px; min-height: 40px; }
}
@media (max-width: 480px) {
    .res-catalog.res-ui .res-catalog-results .res-select-wrap::before { font-size: 10px; }
}
.res-dialog .res-select-wrap { display: block; min-width: 0; }
.res-dialog .res-select-trigger {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    width: 100%; min-height: 42px; padding: 10px 14px; font: inherit; font-size: 12px; text-align: left;
    color: var(--res-text); background: var(--res-bg); border: 1px solid var(--res-border); border-radius: 10px; cursor: pointer;
}
.res-dialog .res-select-trigger > svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--res-muted); }
html .res-dialog .res-select-trigger:focus-visible, .res-dialog .res-select-trigger[aria-expanded="true"] { outline: none; box-shadow: none; border-color: var(--res-focus-border); }
.res-dialog .res-select-trigger:hover { border-color: var(--res-hover-border); background: var(--res-hover-bg); }
.res-dialog .res-select-menu { margin: 0; background: var(--res-panel); }
.res-dialog .res-select-menu .res-select-option { font-size: 12px; }
:is(.res-profile-library, .res-page[data-res-library-view]) .res-select-wrap { display: block; min-width: 0; }
.res-ui .res-library-filters select {
    appearance: none; -webkit-appearance: none; padding-right: 38px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16' fill='none' stroke='%238d9ab2' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 14px center; background-repeat: no-repeat;
}
:is(.res-profile-library, .res-page[data-res-library-view]) .res-select-trigger {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    width: 100%; height: 42px; min-width: 0; padding: 10px 14px;
    border: 1px solid var(--res-border); border-radius: 10px;
    background: var(--res-bg); color: var(--res-text); font: inherit; font-size: 12px; cursor: pointer;
}
:is(.res-profile-library, .res-page[data-res-library-view]) .res-select-trigger > svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--res-muted); }
:is(.res-profile-library, .res-page[data-res-library-view]) .res-select-trigger:hover { background: var(--res-hover-bg); border-color: var(--res-hover-border); }
:is(.res-profile-library, .res-page[data-res-library-view]) .res-select-trigger:focus-visible, :is(.res-profile-library, .res-page[data-res-library-view]) .res-select-trigger[aria-expanded="true"] { outline: none; box-shadow: none; border-color: var(--res-focus-border); }
@media (max-width: 700px) {
    .res-profile-library .res-section-heading { padding-inline: 12px; }
    .res-profile-library .res-library-filters { display: grid; grid-template-columns: minmax(0, 1fr) 100px; gap: 8px; }
    .res-profile-library .res-library-filters input[type="search"] { grid-column: 1 / -1; width: 100%; min-width: 0; }
    .res-profile-library .res-library-filters > .res-button { width: 100%; min-width: 0; padding-inline: 12px; }
    .res-profile-library .res-select-wrap select { width: 100%; max-width: 100%; padding-right: 28px; }
}
.res-catalog.res-ui .res-select-trigger {
    display: inline-flex; align-items: center; justify-content: space-between; gap: 12px;
    width: 100%; min-width: 0; min-height: 36px; padding: 7px 9px;
    border: 1px solid transparent; border-radius: 8px; background: transparent;
    color: var(--res-text); font: inherit; font-size: 12px; font-weight: 500; cursor: pointer;
    transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}
.res-select-trigger > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-catalog.res-ui .res-select-trigger > svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--res-muted); }
.res-catalog.res-ui .res-select-trigger:hover { background: var(--res-hover-bg); border-color: var(--res-hover-border); }
.res-catalog.res-ui .res-select-trigger[aria-expanded="true"], .res-catalog.res-ui .res-select-trigger:focus-visible {
    background: var(--res-panel); border-color: var(--res-focus-border); outline: none;
    box-shadow: none;
}
.res-select-trigger[aria-expanded="true"] > svg { transform: rotate(180deg); }
.res-catalog.res-ui .res-catalog-results .res-select-trigger { min-width: 0; font-size: 11px; color: var(--res-muted); border-color: var(--res-border); background: var(--res-panel); }
.res-select-menu { position: fixed; z-index: 10000; padding: 6px; overflow-y: auto; overscroll-behavior: contain;
    border: 1px solid var(--res-border); border-radius: 12px; background: var(--t-card, #111520);
    box-shadow: 0 14px 38px #00000038; scrollbar-width: thin; scrollbar-color: var(--res-border) transparent;
}
.res-select-menu[hidden] { display: none; }
.res-select-menu .res-select-option { display: flex; align-items: center; justify-content: space-between; gap: 16px;
    min-height: 36px; padding: 9px 10px; border-radius: 7px; color: var(--res-muted); font-size: 12px; line-height: 1.4; cursor: pointer;
}
.res-select-option > span { min-width: 0; overflow-wrap: anywhere; }
.res-select-menu .res-select-option + .res-select-option { margin-top: 3px; }
.res-select-menu .res-select-option > svg { width: 14px; height: 14px; flex-shrink: 0; visibility: hidden; }
.res-select-menu .res-select-option:hover, .res-select-menu .res-select-option.is-highlighted { background: var(--res-hover-bg); color: var(--res-hover-text); }
.res-select-menu .res-select-option[aria-selected="true"] { color: var(--res-hover-text); background: color-mix(in srgb, var(--ac) 10%, var(--t-card, #111520)); }
.res-select-menu .res-select-option[aria-selected="true"] > svg { visibility: visible; }
.res-select-menu .res-select-option[aria-disabled="true"] { opacity: .45; cursor: default; }
html[data-theme="light"] .res-select-menu { background: #fff; border-color: #d5e1ef; box-shadow: 0 16px 42px #2a44671f; }
html[data-theme="light"] .res-select-menu .res-select-option[aria-selected="true"] { color: #356fca; background: #e8f2ff; }
@media(max-width:760px) {
    .res-catalog.res-ui .res-filter-select .res-select-trigger { min-height: 40px; font-size: 11px; background: var(--res-panel); border-color: var(--res-border); }
    .res-select-menu .res-select-option { min-height: 42px; }
}
@media(max-width:480px) { .res-catalog.res-ui .res-catalog-results .res-select-trigger { min-width: 0; max-width: 174px; font-size: 10px; } }
@media(prefers-reduced-motion:reduce) { .res-catalog.res-ui .res-select-trigger { transition: none; } }
/* Collection sorting reuses the library select without changing profile layout. */
.res-page[data-res-library-view] .res-library-filters > .res-select-wrap { flex: 0 1 220px; max-width: 220px; }
@media (max-width: 700px) {
    .res-page[data-res-library-view] .res-library-filters > .res-select-wrap { flex: 1 1 0; max-width: none; }
}
