/* One popover, one direct choice. Original selects remain the form source. */
.reference-ui-shell select.direct-choice-native{display:none!important}
.reference-ui-shell .direct-choices{min-width:0;width:100%;color:var(--ref-text)}
.reference-ui-shell .direct-choices [hidden]{display:none!important}
.reference-ui-shell .direct-choices-options{display:grid;grid-template-columns:1fr;gap:7px;min-width:0}
.reference-ui-shell .direct-choices .direct-choice{position:relative;display:flex;align-items:center;justify-content:flex-start;gap:12px;width:100%;min-width:0;min-height:48px;padding:10px 12px!important;border:1px solid var(--ref-border)!important;border-radius:8px!important;background:var(--ref-surface)!important;color:var(--ref-text)!important;text-align:left;font-size:13px!important;line-height:1.4;cursor:pointer;box-shadow:none!important}
.reference-ui-shell .direct-choice:hover:not(:disabled){border-color:var(--ref-border-2)!important;background:var(--ref-bg-2)!important}
.reference-ui-shell .direct-choice[aria-checked=true]{border-color:var(--ref-primary)!important;background:var(--refine-soft)!important;color:var(--ref-primary)!important}
.reference-ui-shell .direct-choice:disabled{opacity:.5;cursor:not-allowed}
.reference-ui-shell .direct-choice-copy{display:grid;gap:2px;min-width:0;flex:1}
.reference-ui-shell .direct-choice-copy strong{font-size:13px!important;font-weight:600;line-height:1.5;overflow-wrap:anywhere;color:inherit!important}
.reference-ui-shell .direct-choice-copy small{font-size:11px!important;line-height:1.4;color:var(--ref-muted)!important}
.reference-ui-shell .direct-choice-check{width:16px;flex:0 0 16px;font-size:15px!important;font-weight:700;visibility:hidden;color:var(--ref-primary)!important}
.reference-ui-shell .direct-choice[aria-checked=true] .direct-choice-check{visibility:visible}
.reference-ui-shell .direct-choices-ratio .direct-choices-options{grid-template-columns:repeat(2,minmax(0,1fr))}
.reference-ui-shell .direct-choices-ratio .direct-choice{gap:9px;min-height:64px;padding:9px!important}
.reference-ui-shell .direct-choice-ratio{display:block;flex-shrink:0;border:1.5px solid currentColor;border-radius:3px;opacity:.8}
.reference-ui-shell .direct-choices-ratio .direct-choice-check{position:absolute;right:5px;top:3px;width:auto;font-size:11px!important}
.reference-ui-shell .direct-choices-project .direct-choices-options{max-height:min(260px,40dvh);overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:3px;margin:-3px}
.reference-ui-shell .direct-choices .direct-choices-search{display:block;box-sizing:border-box;width:100%;min-width:0;height:38px;margin:0 0 10px;padding:0 11px;border:1px solid var(--ref-border)!important;border-radius:7px;background:var(--ref-surface)!important;color:var(--ref-text)!important;font-size:13px}
.reference-ui-shell .direct-choices-empty{padding:14px 4px;margin:0;color:var(--ref-muted);font-size:13px;text-align:center}
.reference-ui-shell .direct-choice-fixed{display:flex;align-items:center;min-height:38px;padding:7px 10px;border:1px solid var(--ref-border);border-radius:7px;background:var(--ref-bg-2);font-size:13px;color:var(--ref-sub)}
.reference-ui-shell .direct-choices-audio .direct-choices-options{grid-template-columns:repeat(2,minmax(0,1fr))}
.reference-ui-shell .direct-choices-audio .direct-choice{min-height:44px;padding:8px 10px!important;gap:5px}
.reference-ui-shell #referenceComposerProjectPanel .project-row{display:block}
/* Titles already name these sections; let options use the full popover body. */
.reference-ui-shell #referenceComposerSettingsPanel:is([data-active-section=resolution],[data-active-section=ratio]) #videoParamGrid{padding:0!important;background:transparent!important;border:0!important}
.reference-ui-shell #referenceComposerSettingsPanel[data-active-section=resolution] #resolutionControl>label,
.reference-ui-shell #referenceComposerSettingsPanel[data-active-section=ratio] #ratioControl>label{display:none!important}
@media(max-width:700px){
  .reference-ui-shell .direct-choices-audio .direct-choices-options{grid-template-columns:1fr}
  .reference-ui-shell .direct-choices-project .direct-choices-options{max-height:min(230px,36dvh)}
}
