#rms-native-controls{position:absolute;z-index:24;display:flex;flex-wrap:wrap;align-items:center;gap:4px;box-sizing:border-box;padding:3px;max-width:calc(100% - 20px);border:0;border-radius:0;background:transparent;box-shadow:none;pointer-events:auto}
/* Only individual controls over the section; no shared backdrop or halo. */
#rms-native-controls{backdrop-filter:none;-webkit-backdrop-filter:none}
#rms-native-controls[hidden],#rms-native-controls [hidden],#rms-native-controls:not(.has-plot){display:none!important}
#rms-native-controls select,#rms-native-controls button{height:28px;min-width:0;max-width:135px;border:1px solid #d7e2ee9c;border-radius:14px;background:#ffffffb8;color:var(--text);font-size:11px;padding:0 8px}
#rms-native-controls select{flex:1 1 110px}
#rms-native-controls button{flex:0 0 auto}
#rms-native-controls select:hover,#rms-native-controls button:hover{background:#edf3ff}
#rms-native-controls :focus-visible{outline:2px solid #176cff;outline-offset:1px}
#rms-native-status{display:none;font-size:10px;color:var(--muted);max-width:90px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#rms-native-form p{font-size:12px;color:var(--muted)}
#rms-native-form textarea{min-height:62px;resize:vertical}
.rms-native-pair{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.rms-native-inspector{max-height:65vh;overflow:auto;font-size:11px;white-space:pre-wrap}
@media(max-width:760px){#rms-native-controls{gap:2px;padding:2px}#rms-native-controls select,#rms-native-controls button{height:26px;font-size:10px;padding:0 5px}}

#rms-closeout-provenance{position:absolute;z-index:23;pointer-events:none;font:8px/1.2 monospace;overflow-wrap:anywhere;padding:3px;background:#ffffffe0;color:#35475c;border-radius:5px;max-height:62px;overflow:hidden}
#rms-closeout-provenance[hidden]{display:none!important}

/* Scoped to RMS content: other shared dialogs retain their existing layout. */
#dialog:has(#rms-native-form,#rms-source-choice){width:min(820px,94vw);max-height:90dvh;overflow:hidden}
#dialog:has(#rms-native-form,#rms-source-choice) .dialog-head{box-sizing:border-box;flex-shrink:0}
#dialog:has(#rms-native-form,#rms-source-choice) #dialog-content{box-sizing:border-box;max-height:calc(90dvh - 54px);overflow:auto;overscroll-behavior:contain;scroll-padding:12px}
#dialog:has(#rms-source-choice) .rms-actions{align-items:start;gap:8px}
#dialog:has(#rms-source-choice) .rms-actions label{min-width:0;max-width:100%}
#dialog:has(#rms-source-choice) .rms-actions select{min-width:0;width:100%;max-width:100%;box-sizing:border-box}
#dialog:has(#rms-source-choice) .rms-actions label:first-child{flex:1 1 280px}
#dialog:has(#rms-source-choice) .rms-upload{flex:1 1 210px;overflow-wrap:anywhere}
#dialog:has(#rms-source-choice) .rms-upload input{max-width:100%}
#dialog:has(#rms-source-choice) .rms-table{font-size:11px;table-layout:fixed}
#dialog:has(#rms-source-choice) .rms-table td,#dialog:has(#rms-source-choice) .rms-table th{overflow-wrap:anywhere;padding:5px;text-align:left}
#dialog:has(#rms-source-choice) pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:35dvh;overflow:auto}
#rms-source-name{display:block;font-size:12px;overflow-wrap:anywhere;white-space:normal;margin:6px 0}
#rms-native-form .rms-native-pair{grid-template-columns:repeat(2,minmax(0,1fr))}
#rms-native-form label.field{display:grid;grid-template-columns:1fr;gap:4px;min-width:0}
#rms-native-form input,#rms-native-form select,#rms-native-form textarea{min-width:0;width:100%;box-sizing:border-box}
#rms-native-form .dialog-actions{position:sticky;bottom:-18px;padding:8px 0;background:#ffffffed;z-index:1}
@media(max-width:650px){#rms-native-form .rms-native-pair{grid-template-columns:1fr}}
#dialog:has(#rms-source-choice) .rms-source-bar{position:sticky;top:-18px;background:#fffffff5;z-index:2;padding:3px 0 6px;box-shadow:0 3px 6px #203b6109}
#dialog:has(#rms-source-choice) .rms-source-bar .rms-actions{margin:6px 0}
#dialog:has(#rms-source-choice) #rms-status{margin:4px 0;overflow-wrap:anywhere}
#dialog:has(#rms-source-choice) .rms-source-bar p.muted{font-size:11px;margin:4px 0}

#dialog:has(#rms-source-choice) #rms-catalog{max-height:24dvh;overflow:auto;overscroll-behavior:contain;border-radius:8px}
#dialog:has(#rms-source-choice) #rms-inspector>.rms-actions{margin:8px 0}
#dialog:has(#rms-source-choice) #rms-inspector input{width:64px;max-width:100%;box-sizing:border-box}

#rms-native-form input[type=checkbox]{width:auto;height:auto;display:inline-block;margin-right:6px}
#rms-native-form label:has(input[type=checkbox]){display:flex;align-items:center;gap:4px}
