/* ══ THE CHART'S ACCOUNT KEY AND ITS MENU — every style (js/chart/ui/account-menu.js) ═════════════════════════════
   Owner, 2026-09-19: first in style 3 (PR #323), then «هذا اضافه لكل مود» — the key, its menu, and the controls that
   are in the menu leaving the bar, in every style. The menu takes the look of the style it opens in: in styles 1 and
   2 the app's own menu surface (the chart's dropdowns: var(--card), var(--line), 12 px corners); in style 3 the flat
   surface of chart-style3.css (8 px corners, its ink). The three show/hide keys stay inside the tools group, which
   stays in the bar: they are hidden here; the language and Simple / Pro keys leave through the module's holder.
   ═══════════════════════════════════════════════════════════════════════════════════════════════════════════════ */
:root{--avm-card:var(--card,#ffffff);--avm-ink:var(--txt,#131722);--avm-ink2:var(--txt2,#5d6475);--avm-line:var(--line,#e0e3eb);
  --avm-hover:color-mix(in srgb,var(--txt,#131722) 7%,transparent);--avm-on:color-mix(in srgb,var(--txt,#131722) 11%,transparent);
  --avm-acc:var(--gold,#e23b3b);--avm-rad:12px}
html[data-pcstyle="3"]{--avm-card:var(--pcs3-card);--avm-ink:var(--pcs3-ink);--avm-ink2:var(--pcs3-ink2);--avm-line:var(--pcs3-line);
  --avm-hover:var(--pcs3-hover);--avm-on:var(--pcs3-on);--avm-acc:var(--pcs3-acc);--avm-rad:8px}

/* the three show/hide keys are menu rows now; the holder of the moved units is never drawn */
#v-charts .pccard .pchead #pcRailBtn,
#v-charts .pccard .pchead #pcBaToggle,
#v-charts .pccard .pchead #pcClToggle{display:none}
#pcAvStash{display:none!important}
/* the key: a round avatar one control high, no key face in any style */
#v-charts .pccard .pchead #pcAvKey{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;flex:none;align-self:center;
  inline-size:var(--pch-ctl,32px);width:var(--pch-ctl,32px);height:var(--pch-ctl,32px);padding:0;margin:0;border:0;border-radius:50%;
  background:transparent;box-shadow:none;cursor:pointer;transform:none}
#v-charts .pccard .pchead #pcAvKey:hover,
#v-charts .pccard .pchead #pcAvKey[aria-expanded="true"]{background:transparent}
#v-charts .pccard .pchead #pcAvKey .v-ava{width:32px;height:32px;border:0;font:700 13px/1 Inter,system-ui,sans-serif;
  color:var(--avm-ink);background:var(--avm-on);transition:box-shadow .12s}
#v-charts .pccard .pchead #pcAvKey:hover .v-ava,
#v-charts .pccard .pchead #pcAvKey[aria-expanded="true"] .v-ava{box-shadow:0 0 0 2px var(--avm-line)}
#v-charts .pccard .pchead #pcAvKey:focus-visible{outline:2px solid var(--avm-acc);outline-offset:2px}

/* the menu: a flat card, one row height (40 px), the toolbar's line icons, a switch on the rows that turn something on */
.pcavm{position:fixed;z-index:10000;box-sizing:border-box;min-width:260px;max-width:min(320px,calc(100vw - 16px));
  padding:6px 0;overflow-y:auto;background:var(--avm-card);color:var(--avm-ink);border:1px solid var(--avm-line);border-radius:var(--avm-rad);
  box-shadow:0 8px 28px rgba(0,0,0,.16);font:500 13.5px/1.25 Inter,Cairo,system-ui,sans-serif}
.pcavm[hidden]{display:none}
.pcavm-sub{min-width:180px}
.pcavm-i{display:flex;align-items:center;gap:12px;box-sizing:border-box;width:100%;min-height:40px;margin:0;padding:0 14px;
  border:0;background:transparent;color:inherit;font:inherit;text-align:start;cursor:pointer}
.pcavm-i:hover,
.pcavm-i:focus-visible,
.pcavm-i[aria-expanded="true"]{background:var(--avm-hover);outline:none}
.pcavm-ic{display:inline-flex;flex:none;color:var(--avm-ink)}
.pcavm-l{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pcavm-m{color:var(--avm-ink2);font-size:12.5px}
.pcavm-go{display:inline-flex;flex:none;color:var(--avm-ink2)}
.pcavm-go svg{width:16px;height:16px}
html[dir="rtl"] .pcavm-go svg{transform:scaleX(-1)}
.pcavm-sep{height:1px;margin:6px 0;background:var(--avm-line)}
.pcavm-me{min-height:52px}
.pcavm-me .v-ava{width:32px;height:32px;border:0;font:700 13px/1 Inter,system-ui,sans-serif;color:var(--avm-ink);background:var(--avm-on)}
.pcavm-me .pcavm-l{display:flex;flex-direction:column;gap:2px}
.pcavm-me b{font-weight:700;overflow:hidden;text-overflow:ellipsis}
.pcavm-me small{font-size:12px;color:var(--avm-ink2)}
.pcavm-out,
.pcavm-out .pcavm-ic{color:var(--avm-acc)}
.pcavm-kbd{font:600 11px/1 ui-monospace,monospace;padding:3px 6px;border:1px solid var(--avm-line);border-radius:4px;color:var(--avm-ink2)}
.pcavm-ck{font-weight:700}
/* the switch: a 34x18 track, the key's ink when on */
.pcavm-sw{position:relative;flex:none;width:34px;height:18px;border-radius:9px;background:var(--avm-line);transition:background .15s}
.pcavm-sw::after{content:"";position:absolute;top:2px;inset-inline-start:2px;width:14px;height:14px;border-radius:50%;
  background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.25);transition:inset-inline-start .15s}
.pcavm-i[aria-checked="true"] .pcavm-sw{background:var(--avm-ink)}
.pcavm-i[aria-checked="true"] .pcavm-sw::after{inset-inline-start:18px}
html[data-theme="dark"] .pcavm-i[aria-checked="true"] .pcavm-sw::after{background:#131722}
@media (pointer:coarse){.pcavm-i{min-height:44px}}
