/* ShellGrove: the Virtual Machines screen (P3a, 2026-11-19). Loaded after shellgrove.css and built on its variables.
   New colors are the --vs-* variables below, given for both themes. tests/browser/samples/vm_sample.mjs checks
   that every text on this screen reaches 4.5:1 in both themes. No colored side stripes: full thin borders and
   tinted fills only. Classes start with vs- so nothing leaks into the rest of the page. */
:root{--vs-bar:#2B2445;--vs-fill:#9F86F7;--vs-bad-band:rgba(244,135,113,.12);--vs-field:#100D1A;--vs-sel:rgba(167,139,250,.16)}
html.light{--vs-bar:#E4DEF0;--vs-fill:#7C4DEB;--vs-bad-band:rgba(179,38,30,.07);--vs-field:#FFFFFF;--vs-sel:rgba(106,47,216,.1)}

.vs{display:flex;gap:6px;height:100%;min-height:0;min-width:0}
.vs h2,.vs h3,.vs p,.vs dl,.vs dd{margin:0}
.vs .btn{white-space:nowrap}
.vs .btn svg{width:15px;height:15px}
.vs .btn:hover{background:var(--sg-soft)}
.vs .vs-pri{background:var(--sg-btn);border-color:var(--sg-btn);color:var(--sg-btn-tx)}
.vs .vs-pri:hover{background:var(--sg-btn);filter:brightness(1.1)}
.vs .btn.small{height:28px;padding:0 10px;gap:6px;font-size:12.5px}
.vs .btn.small svg{width:14px;height:14px}
.vs .vs-caret{width:13px;height:13px;margin-right:-4px;color:var(--sg-dim)}
.vs .vs-morebtn{width:32px;padding:0;justify-content:center}
.vs .vs-danger,.vs .vs-danger:hover{color:var(--sg-bad);border-color:var(--sg-bad);background:var(--vs-bad-band)}

/* the list of VMs and the host usage */
.vs-side{width:260px;flex:none;display:flex;flex-direction:column;min-height:0}
/* under 1100 px wide the list gives the details more room, so the action row fits on one line (R4 C2-11) */
@media (max-width:1099px){.vs-side{width:220px}}
.vs-shead{display:flex;align-items:center;gap:8px;min-height:52px;padding:10px 10px 8px 14px}
.vs-shead h2{flex:1;font-size:13.5px;font-weight:650}
.vs-list{list-style:none;margin:0;padding:2px 8px 8px;flex:1;min-height:0;overflow:auto}
.vs-list li+li{margin-top:3px}
.vs-item{width:100%;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;column-gap:10px;row-gap:2px;padding:9px 10px;border:1px solid transparent;border-radius:5px}
.vs-item:hover{background:var(--sg-soft)}
.vs-item[aria-current="true"]{background:var(--vs-sel);border-color:var(--sg-accent)}
.vs-item:focus-visible{outline-offset:-3px}
.vs-ivm{grid-row:1 / 3;width:20px;height:20px;color:var(--sg-dim)}
.vs-item[aria-current="true"] .vs-ivm{color:var(--sg-accent)}
.vs-iname{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:650}
.vs-ios{grid-column:2 / 4;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12.5px;color:var(--sg-dim)}
.vs-state{display:inline-flex;align-items:center;gap:5px;font-size:12.5px;color:var(--sg-dim);white-space:nowrap}
.vs-state svg{width:14px;height:14px}
.vs-state.st-running svg{color:var(--sg-ok)}
.vs-state.st-paused svg{color:var(--sg-hint)}
.vs-state.st-saved svg{color:var(--sg-accent)}
.vs-state.big{height:26px;padding:0 10px;border:1px solid var(--sg-border);border-radius:999px;font-size:13px;font-weight:550;color:var(--sg-text)}
.vs-hostuse{flex:none;display:grid;gap:10px;padding:12px 14px 14px;border-top:1px solid var(--sg-border)}
.vs-hostuse h3{font-size:12.5px;font-weight:650}
.vs-mrow{display:flex;justify-content:space-between;gap:8px;margin-bottom:5px;font-size:12.5px}
.vs-mval{color:var(--sg-dim);white-space:nowrap}
.vs-bar{display:block;height:6px;border-radius:3px;background:var(--vs-bar);overflow:hidden}
.vs-fill{display:block;height:100%;border-radius:3px;background:var(--vs-fill)}
.vs-mnote{margin-top:5px;font-size:12px;line-height:1.35;color:var(--sg-dim);text-wrap:balance}

/* the chosen VM */
.vs-main{flex:1;min-width:0;overflow:auto;padding:18px 22px 22px}
.vs-wrap{max-width:820px}
.vs-head{display:flex;align-items:center;gap:12px;min-width:0}
.vs-head h2{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:20px;font-weight:650;letter-spacing:-.01em}
.vs-acts{display:flex;flex-wrap:wrap;gap:6px;margin:14px 0 16px}
/* the name and the buttons stay at the top while a long snapshot list scrolls (R4 C2-16). The pane has 18 px of padding on
   top: the sticky box reaches up over it, so nothing shows above the name. */
.vs-top{position:sticky;top:-18px;z-index:2;margin-top:-18px;padding:18px 0 16px;background:var(--sg-island)}
.vs-top > .vs-acts{margin-bottom:0}
.vs-err{display:flex;align-items:flex-start;gap:9px;margin:0 0 16px;padding:9px 12px;border:1px solid var(--sg-bad);border-radius:5px;background:var(--vs-bad-band);color:var(--sg-text);font-weight:500}
.vs-err svg{flex:none;margin-top:1px;color:var(--sg-bad)}
.vs .vs-facts{margin-bottom:24px;border:1px solid var(--sg-border);border-radius:5px;background:var(--sg-raise)}
.vs-fact{display:grid;grid-template-columns:150px minmax(0,1fr);gap:14px;padding:9px 14px}
.vs-fact+.vs-fact{border-top:1px solid var(--sg-border)}
.vs-fact dt{color:var(--sg-dim)}
.vs-fact dd{font-weight:600;overflow-wrap:anywhere}
.vs-fact small{display:block;margin-top:2px;font-size:12.5px;font-weight:400;color:var(--sg-dim)}
.vs-snaps h3{display:flex;align-items:center;gap:8px;margin-bottom:9px;font-size:14px;font-weight:650}
.vs-snaps h3 svg{color:var(--sg-dim)}
.vs-note{margin:0 0 9px}
.vs-dim{color:var(--sg-dim)}
.vs-slist{list-style:none;margin:0;padding:0;border:1px solid var(--sg-border);border-radius:5px;background:var(--sg-raise)}
.vs-snap{padding:9px 10px 9px 14px}
.vs-snap+.vs-snap{border-top:1px solid var(--sg-border)}
.vs-srow{display:flex;align-items:center;gap:8px}
.vs-sname{flex:1;min-width:0}
.vs-sname b{display:block;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.vs-sname span{display:block;font-size:12.5px;color:var(--sg-dim)}
.vs-snap .vs-err{margin:9px 0 1px}
.vs-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;min-height:70%;text-align:center;font-size:14.5px}
/* svg.vs-big: as strong as shellgrove.css svg.i (16 px) and loaded after it, so the icon is 44 px (R4 C2-5) */
svg.vs-big{width:44px;height:44px;stroke-width:1.4;color:var(--sg-dim)}
.vs-none{color:var(--sg-dim)}

/* forms */
.vs-sheet{max-width:600px;padding:18px 20px;border:1px solid var(--sg-border);border-radius:5px;background:var(--sg-raise)}
.vs-sheet h3{margin-bottom:14px;font-size:15.5px;font-weight:650}
.vs-sheet > p{margin:-6px 0 4px}
/* labels take only their own width, the boxes the rest (R4 C2-6) */
.vs-fields{display:grid;grid-template-columns:max-content minmax(0,1fr);align-items:center;gap:10px 14px}
.vs-field{display:contents}
.vs-field label{font-weight:550}
/* a row that is off (Internal network name for another network): its label stays in the grid, unseen and 0 px high, so the
   label column is as wide with it as without it; the 10 px gap it leaves is taken back (R4 C2-6) */
.vs-field.vs-off > label{visibility:hidden;height:0;overflow:hidden}
.vs-field.vs-off > .vs-ctl{display:none}
.vs-fields:has(> .vs-field.vs-off:last-child){margin-bottom:-10px}
/* SG14: a row after an off row (Adapter 2 after Internal network name) starts on the left again; old forms never have one */
.vs-field.vs-off + .vs-field > label{grid-column:1}
/* the control's own box: anything an extension adds next to it sits on the box's right edge, inside the same cell */
.vs-ctl{display:grid;min-width:0;max-width:320px}
.vs-ctl > *{grid-area:1/1;min-width:0}
.vs-ctl > :not(input):not(select){justify-self:end;align-self:center}
.vs-sheet input[type="text"],.vs-sheet select{width:100%;height:34px;padding:0 10px;border:1px solid var(--sg-border);border-radius:5px;background:var(--vs-field)}
.vs-sheet select{cursor:pointer}
.vs-sheet select option{background:var(--sg-menu);color:var(--sg-text)}
.vs-sheet .vs-err{margin:16px 0 0}
.vs-sheet input.vs-bad,.vs-sheet select.vs-bad{border-color:var(--sg-bad)}
.vs-row{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}

/* popup menus (the page's .menu look) */
.vs-menu{min-width:190px;max-width:330px}
.vs-menu .mi{align-items:flex-start}
.vs-menu .mi svg{margin-top:1px}
.vs-mtext{display:flex;flex-direction:column;gap:2px}
.vs-mtext b{font-weight:600}
.vs-mtext small{font-size:12px;font-weight:400;color:var(--sg-dim)}
.vs-menu .vs-dmi,.vs-menu .vs-dmi svg{color:var(--sg-bad)}
