/* web_shim.css — MIRROR WEB Phase 1. Only what differs from the desktop window; every colour is MIRROR's own token
   (mirror.css / light.css), so dark and light follow by themselves. */

/* the desktop-only controls: the updater, the device tab, the broker pickers and their local bridges, the key box */
.vx-web #setup .tabs button[data-tab="dev"],
.vx-web #setup .tab[data-tab="dev"],
.vx-web #broker-pick, .vx-web #broker-tv-box, .vx-web #broker-nt-box, .vx-web #broker-px-box,
.vx-web #setup .tab[data-tab="vec"] > .hint,
.vx-web #setup .tab[data-tab="vec"] > label.row,
.vx-web #setup .tab[data-tab="vec"] > .rowacts,
.vx-web #setup .tab[data-tab="vec"] > div:has(#upd-check),
.vx-web #upd-check, .vx-web #upd-ver, .vx-web #upd-msg,
.vx-web #r-lcap-save, .vx-web #chip-px, .vx-web #cx-summary { display: none !important; }
.vx-web #r-lcap { pointer-events: none; opacity: .6; }

/* the bar: «WEB · View only» next to the brand */
#vxw-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; white-space: nowrap;
  padding: 3px 10px; border-radius: 999px; border: 1px solid var(--purple-dim, #5b3fa8); color: var(--dim, #9a92b0);
  background: rgba(139, 92, 246, .10); }
#vxw-pill b { color: var(--cyan, #22d3ee); letter-spacing: .06em; }

/* the ticket: the send / close / cancel buttons keep their place and colours, visibly off, with one plain line */
.vx-web .vxw-off { opacity: .45 !important; cursor: not-allowed !important; filter: saturate(.6); }
#rail #ticket > .tk-acts:has(#vxw-lock) { flex-wrap: wrap; }
#vxw-lock { flex: 1 0 100%; display: flex; align-items: center; gap: 8px; margin: 0 0 6px; padding: 7px 10px; font-size: 12px; line-height: 1.35;
  border-radius: var(--vx-r-group, 8px); border: 1px dashed var(--vx-border-group, #64707f);
  background: var(--vx-bg-group, #161d26); color: var(--vx-group-label, #b4bec9); }
#vxw-lock .vxw-lk { font-size: 14px; }

/* ⚙ notes that replace the desktop's broker / key boxes */
.vxw-note { margin: 0 0 12px; padding: 10px 12px; font-size: 12.5px; line-height: 1.5; border-radius: var(--vx-r-group, 8px);
  border: 1px solid var(--vx-border-group, #64707f); background: var(--vx-bg-group, #161d26); color: var(--ink, #ece9f3); }
.vxw-note .rowacts { margin-top: 8px; }

/* «opened in another browser» — the whole window, MIRROR's look */
#vxw-gone { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(8, 6, 12, .88); backdrop-filter: blur(3px); }
#vxw-gone .vxw-card { width: min(440px, 100%); text-align: center; padding: 26px 24px 20px; border-radius: var(--vx-r-frame, 10px);
  background: var(--panel, #141019); border: 1px solid var(--vx-frame, #8a96a3); color: var(--ink, #ece9f3);
  box-shadow: 0 16px 44px rgba(0, 0, 0, .5); }
#vxw-gone .vxw-brand { font-weight: 800; letter-spacing: .5px; font-size: 15px; }
#vxw-gone .vxw-brand span { color: var(--purple, #8b5cf6); margin: 0 4px; }
#vxw-gone .vxw-brand small { color: var(--cyan, #22d3ee); font-size: 11px; letter-spacing: .1em; }
#vxw-gone .vxw-ico { font-size: 34px; margin: 14px 0 4px; color: var(--amber, #f0a848); }
#vxw-gone h2 { margin: 6px 0 8px; font-size: 18px; }
#vxw-gone p { margin: 0 0 16px; color: var(--dim, #9a92b0); font-size: 13.5px; line-height: 1.5; }
#vxw-gone .vxw-go { display: inline-block; padding: 10px 22px; border-radius: var(--r, 9px); font-weight: 700; text-decoration: none;
  background: var(--purple, #8b5cf6); color: #fff; }
#vxw-gone .vxw-sub { margin: 10px 0 0; font-size: 11.5px; }

/* phone width (≤640 px): the desktop window's side-by-side layout is stacked — the chart on top at full width, the rail
   under it — and the page scrolls vertically. Layout only: no colour, font or control changes. */
@media (max-width: 640px) {
  html.vx-web, html.vx-web body { height: auto; min-height: 100%; overflow-x: hidden; overflow-y: auto; }
  .vx-web #bar { flex-wrap: wrap; height: auto; min-height: var(--bar, 46px); row-gap: 6px; padding: 6px 10px; }
  .vx-web #bar .fld.wide { min-width: 0; }
  #vxw-pill { order: 1; }
  .vx-web #bar .brand { white-space: normal; min-width: 0; max-width: 100%; }
  .vx-web #app-ver { display: block; margin: 2px 0 0 !important; white-space: normal; }
  .vx-web main { flex-direction: column; height: auto; }
  /* the toolbars get their own band ABOVE the chart (on the desktop they float over its top edge, with room to spare;
     at 390 px they need 4 rows, which would sit on the chart's cards) — the chart keeps its full height below them */
  .vx-web #chartwrap { flex: none; width: 100%; height: auto; display: flex; flex-direction: column; }
  .vx-web #chart { flex: none; height: 58vh; min-height: 320px; }
  .vx-web #ws-pos { position: static !important; }
  /* the chart's toolbars: each group is ONE row that scrolls sideways inside itself — never overlapping, never
     widening the page (the desktop lets them run past the chart edge at 1024+ px; a phone has no room for that) */
  .vx-web #ctools { order: -1; position: static; flex-wrap: wrap; row-gap: 5px; padding: 6px 8px; background: var(--panel, #141019);
    border-bottom: 1px solid var(--line, #2a2237); }
  .vx-web #ctools > .grp { flex: 0 1 auto; max-width: 100%; min-width: 0; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden;
    scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .vx-web #ctools > .grp::-webkit-scrollbar { display: none; }
  .vx-web #ctools > .grp > *, .vx-web #ctools > .grp > * > * { flex-shrink: 0; }
  .vx-web #ctools > .grp * { flex-wrap: nowrap !important; white-space: nowrap; }
  .vx-web #rail { width: 100%; flex: none; border-right: 0; border-top: 1px solid var(--line, #2a2237); overflow: visible; }
  .vx-web .ob-card, .vx-web .modal .sheet, .vx-web #bug-pop { max-width: calc(100vw - 16px) !important; }
  .vx-web .ob-card { left: 8px !important; right: 8px !important; transform: none !important; width: auto !important; }
}
