/* Units (msls-units.js): the mm / in switch, the File menu choice and the inch twins of the length fields. */
.msu-hide{display:none!important}
.msu-twin{font-variant-numeric:tabular-nums;min-width:0;box-sizing:border-box}
.msu-twin.msu-invalid{outline:2px solid #e0a83a;outline-offset:-1px}
/* the twin stands where its mm field stood: the same rules the studio gives number fields */
.ms-polished .ux-number-field>input.msu-twin{grid-column:2;grid-row:1;padding:6px 7px;text-align:right;color:var(--ms-accent);width:78px}
.ms-polished .halo-field .ux-value-head input.msu-twin{width:78px}
.design-canvas .dc-pattern-field input.msu-twin{width:66px;min-width:0;height:32px;padding:5px 4px 5px 8px;font-size:12px;background:#fff;color:#183352;text-align:right}
.design-canvas .dc-pattern-value input.msu-twin{padding:7px}
:root:has(#printJump) :is(.field input.msu-twin,.range input.msu-twin){background:var(--input-fill);border-color:var(--control-line);color:var(--ink)}
.led-modules .lm-field input.msu-twin{width:100%}

/* header switch, next to the language menu */
.msu-switch{display:inline-flex;align-items:center;gap:0;margin:0 8px 0 0;padding:2px;border:1px solid var(--control-line,#33465f);border-radius:8px;background:var(--input-fill,rgba(15,26,42,.6));flex:0 0 auto;vertical-align:middle}
.msu-switch button{min-width:34px;min-height:28px;margin:0;padding:3px 8px;border:0;border-radius:6px;background:transparent;color:inherit;font:600 12px/1 inherit;font-family:inherit;cursor:pointer;opacity:.75}
.msu-switch button[aria-pressed=true]{background:var(--ms-accent,#2f7cf6);color:#fff;opacity:1}
.msu-switch button:focus-visible{outline:2px solid var(--ms-accent,#2f7cf6);outline-offset:1px}

/* File menu */
.msu-choice[aria-pressed=true]::before{content:'✓';display:inline-block;width:1.4em}
.msu-choice[aria-pressed=false]::before{content:'';display:inline-block;width:1.4em}
.msu-menu-note{display:block;max-width:280px;margin:2px 12px 6px;font-size:11px;line-height:1.35;opacity:.75;white-space:normal}

/* print files stay in mm */
.msu-export-note{margin:6px 0 0;font-size:12px;line-height:1.4;opacity:.8}
.msu-export-note[hidden]{display:none}

header .msu-switch{justify-self:start;align-self:center;width:auto;height:auto}
@media (max-width:640px){
  .msu-switch{margin-right:4px}
  .msu-switch button{min-width:30px;min-height:30px;padding:3px 6px}
}
/* phone: the studio's File menu opens flat in a two-column grid; mm and in share a row, the note takes the full width */
@media(max-width:760px),(max-width:960px) and (pointer:coarse){
  header.msm-studio-header .msu-choice[data-unit=mm]{grid-column:1}
  header.msm-studio-header .msu-menu-note{grid-column:1/-1;max-width:none;margin:0 4px}
}
