/* Kept separate from protected legacy styles. Native selects remain the fallback. */
.fp-control { display: block; width: 100%; min-width: 0; margin-top: 6px; }
.sf-page .sf-filters .fp-trigger, .sf-dialog .fp-trigger {
  box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; min-width: 0; height: 40px; min-height: 40px; margin: 0; padding: 0 12px;
  border:1px solid var(--border-strong); border-radius: 8px; background:#fff; color:var(--d-selected);
  font-size: 14px; font-weight: 400; line-height: 1.4; text-align: left; cursor: pointer;
}
.fp-selected { display: flex; align-items: center; gap: 7px; min-width: 0; flex: 1; }
.fp-selected .fp-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fp-badge { flex: 0 0 auto; border-radius: 4px; padding: 2px 5px; color:var(--text-muted); background:var(--canvas); font-size: 12px; line-height: 1.4; white-space: nowrap; }
.fp-arrow { flex: 0 0 auto; color:var(--text-muted); font-size: 17px; line-height: 1; }
.fp-trigger[aria-expanded="true"] { border-color:var(--g-400); box-shadow: 0 0 0 2px var(--accent-soft-border); }
.fp-trigger:focus-visible { outline:2px solid var(--g-400); outline-offset: 2px; }
.fp-trigger:disabled { background:var(--surface-hover); color:var(--text-muted); cursor: not-allowed; }
.fp-panel {
  box-sizing: border-box; position: fixed; inset: auto; margin: 0; padding: 8px;
  min-width: 0; border:1px solid var(--border); border-radius: 10px;
  background:#fff; color:var(--d-selected); box-shadow: var(--shadow-2);
  font-family: inherit; font-size: 14px; overflow: hidden;
}
.fp-panel:popover-open { display: flex; flex-direction: column; gap: 6px; }
.fp-panel::backdrop { background: transparent; }
.fp-panel .fp-search {
  box-sizing: border-box; flex: 0 0 auto; width: 100%; min-width: 0; height: 36px; min-height: 36px;
  padding: 0 10px; margin: 0; border:1px solid var(--border); border-radius: 6px; background:var(--surface-hover);
  color:var(--d-selected); font-size: 13px; line-height: normal;
}
.fp-panel .fp-search:focus-visible { outline:2px solid var(--g-400); outline-offset: -2px; box-shadow: none; }
.fp-list { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scroll-padding: 4px; }
.fp-option { display: flex; align-items: flex-start; gap: 8px; padding: 9px 8px; border-radius: 6px; cursor: pointer; line-height: 1.55; }
.fp-option-label { display: flex; align-items: flex-start; gap: 6px; min-width: 0; flex: 1; }
.fp-option .fp-name { min-width: 0; white-space: normal; overflow-wrap: anywhere; word-break: normal; }
.fp-option .fp-badge { margin-top: 2px; }
.fp-option.fp-active { background:var(--canvas); }
.fp-option[aria-selected="true"] { color:var(--accent); font-weight: 550; }
.fp-check { flex: 0 0 15px; color:var(--g-500); text-align: right; font-weight: 700; }
.fp-note { flex: 0 0 auto; padding: 5px 3px 1px; color:var(--text-muted); font-size: 12px; line-height: 1.5; }
@media (forced-colors: active) {
  .fp-panel, .fp-trigger { border-color: ButtonText; }
  .fp-option.fp-active { outline: 1px solid Highlight; outline-offset: -1px; }
  .fp-option[aria-selected="true"], .fp-check { color: Highlight; }
  .fp-badge { border: 1px solid CanvasText; }
}
