/* Context-menu script window: a compact flyout twin of the script window, re-sizing its
   script-* classes (scriptEditor.css). On coarse pointers the entry opens the full window. */
.ctx-script-sub { padding: 6px 0; }
.ctx-script-plain .ctx-arrow { display: none; }
.ctx-script-plain > .ctx-sub { display: none !important; }
.ctx-script {
    /* The five action buttons plus the 12px gutters, edge to edge. */
    width: 403px;
    max-width: calc(100vw - 40px);
    box-sizing: border-box;
    padding: 2px 12px 6px;
    /* A fixed tall height; the editor flexes into what the strip and actions leave. */
    display: flex;
    flex-direction: column;
    height: min(58vh, 440px);
    /* The menu is user-select:none; code (and the textarea) must be selectable. */
    user-select: text;
}
/* Never under 150px; flex-basis 0 so the strip and actions are subtracted. */
#ctx-script-wrap { flex: 1 1 0; min-height: 150px; }
/* The two layers share every metric that places a glyph. */
#ctx-script-highlight, #ctx-script-editor {
    inset: 6px 8px;
    font-size: 12px;
    padding: 1px 3px 10px;
}
#ctx-script-editor { cursor: text; }
#ctx-script-diag { padding: 6px 2px 0; font-size: 11.5px; }
/* Scoped through .ctx-script so its tighter gap outranks the shared .chat-settings-actions. */
.ctx-script-row { display: flex; justify-content: flex-start; padding-bottom: 8px; }
.ctx-script .ctx-script-actions { flex-wrap: wrap; gap: 6px; }
.ctx-script .ctx-script-actions .btn-icon-text { font-size: 12px; padding: 4px 9px; }
