/* assistant-places.css (12/11/2026): where the assistant sits. Chris 12/11: "ai chat mặc định mở, nằm ở bên trái, sidebar menu
 * sẽ collapse lại; tắt ai chat thì menu tự động expand ra… thêm một kiểu hiển thị", "collapse lại là thành hình button chat chứ
 * không phải cái panel". Canvas board GemDockModes (page 3.1), screens 1, 2, 3 and 5.
 *
 *   .gb-dock-left    the full-height panel on the LEFT of the page, beside the rail and under the topbar; the page makes room
 *   .gb-dock-place   where it sits, the first group of the panel's ⋯: on the right · on the left · floating window · full screen
 *   .gb-dock-knob    folded: the round black chat button bottom right (the admin's chat corner's look), with a status dot
 *
 * Its own entry, imported by assistant/host.tsx after assistant.css: assistant.css is in the frozen compatibility bundle
 * (gemboss-ui.css, at its ceiling). A plain page with assistant-plain.js links it beside assistant.css. Two classes
 * (`.gb-dock.gb-dock-left`) where a rule must beat `.gb-dock`'s own (base and phone), whichever file a bundler loads last.
 */

/* The popup and the floating window are solid too (12/11/2026): assistant.css frosts `.gb-dock` (93% and a blur), and the rail's
   rows and the page's shapes showed through behind the messages, which read as dirty, not clean (review of #7320's shots). */
.gb-dock.gb-dock-dock { background: var(--gemboss-surface); -webkit-backdrop-filter: none; backdrop-filter: none; }

/* ── Left: the side panel's column on the other side of the page ─────────────────────────────────────────────────────────
   Below the rail (200), so a rail opened OVER the page (the admin's » while the chat folds it) lies over the chat, as the
   canvas draws it ("menu mở đè lên chat"); above the page and the holding screen (5). Solid, like the side panel: nothing
   sits behind it to show through. Its left edge is the rail's (`--gb-rail-w`: 56 where the rail is folded, else 240). */
.gb-dock.gb-dock-left {
  z-index: 195;
  top: 56px;
  bottom: 0;
  left: var(--gb-rail-w, 240px);
  right: auto;
  width: var(--gb-dock-side-w, 400px);
  background: var(--gemboss-surface);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border: 0;
  border-right: 1px solid var(--gemboss-divider);
  border-radius: 0;
  box-shadow: none;
  overflow: visible;         /* the seam's touch band reaches past the right edge */
}
@starting-style { .gb-dock-left { transform: translateX(-12px); opacity: 0; } }
.gb-dock-left .gb-dock-body, .gb-dock-left .gb-dock-pane { overflow: hidden; }
.gb-dock-left .gb-dock-header, .gb-dock-left .gb-dock-header:active { cursor: default; touch-action: auto; }
/* The status word stands down, as in the side panel (assistant.css): the dot says it, the word stays for a screen reader. */
.gb-dock-left .gb-dock-status {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
/* The seam is the RIGHT edge (host.tsx: dragging right widens it, ArrowRight too). */
.gb-dock-left > .gb-dock-sidegrip { position: absolute; top: 0; bottom: 0; left: auto; right: -3px; width: 5px; z-index: 3; }
/* THE SEAM'S REACH, both panels (13/11/2026, Chris on the left panel: "stick on the left cũng phải có resize như stick on the right").
   The drag, the arrows, the cursor and the remembered width were already the right panel's (measured at 1280 and 1440, rail folded
   and opened over the chat). What differed is the seam's neighbour inside the panel: on the right it is the list's 16px padding,
   on the left it is the chat's scrollbar (an 11px gutter, its thumb a grey bar flush with the border) and, in the header, the ×
   3px away. So the bar a seller sees at the left panel's edge was the scrollbar, and the 5px seam beside it was found only by
   chance. Under a mouse the seam now reaches 8px further over the PAGE side (the page's 24px padding, nothing to press there), a
   13px target, and the grip shows anywhere in it: hovering the band is hovering the seam (ui.css `.ui-resizer:hover::before`).
   The visible line and the grip stay centred on the border. A finger already has ui.css' 28px band (`pointer: coarse`). */
@media (pointer: fine) {
  .gb-dock:is(.gb-dock-left, .gb-dock-side) > .gb-dock-sidegrip::after { content: ""; position: absolute; top: 0; bottom: 0; width: 8px; }
  .gb-dock.gb-dock-left > .gb-dock-sidegrip::after { left: 100%; }
  .gb-dock.gb-dock-side > .gb-dock-sidegrip::after { right: 100%; }
}
/* The page makes room: its left margin is the rail and the panel (`--gb-assistant-left-w`, its own variable: right-anchored things read
   `--gb-assistant-side-w` as a panel on the right). Three classes and <body>: the folded rail's own margin
   (rail-mini.css, rail-fold.css: `.gemboss-platform-shell[data-rail…] .gemboss-platform-main`) weighs three. */
@media (min-width: 1100px) {
  body.gemboss-assistant-left .gemboss-platform-main,
  body.gemboss-assistant-left .gemboss-platform-shell .gemboss-platform-main {
    margin-left: calc(var(--gb-rail-w, 240px) + var(--gb-assistant-left-w, 400px));
  }
}
/* Not offered under 1100px (host.tsx SIDE_FITS_QUERY), so the reducer never draws it there; if it ever is, it covers the content
   area like the side panel does at that width, and there is nothing to drag. */
@media (max-width: 1099.98px) {
  .gb-dock.gb-dock-left { right: 0; width: auto; }
  .gb-dock-left > .gb-dock-sidegrip { display: none; }
}
@media (max-width: 760px) {
  .gb-dock.gb-dock-left { left: 0; border-right: 0; }
}

/* ── Where it sits: the first group of the panel's ⋯ (12/11/2026) ──────────────────────────────────────────────────────────────
   Four rows (`menuitemradio`), the person's place checked, on the menu's own row (shell.css `.ui-menu__item`) with the check at the right.
   They were four buttons in the header until Chris saw them on prod ("cái top bar đó ko ổn đâu nhìn rối"). A place the window cannot fit
   is off and says why under its name; on a phone (≤760) the two panels cannot stand beside a page, so their rows are not drawn. */
.gb-dock-menu-group { display: grid; }
/* A place: its mark in the kit menu's icon slot (menu-extras.css), the name taking the row, the check at the end. */
.gb-dock-menu-group > .ui-menu__item { border-radius: 8px; flex-wrap: nowrap; }   /* the kit's rows wrap; an off place's reason stays beside its mark */
.gb-dock-place-name { display: grid; flex: 1 1 auto; }
.gb-dock-place-why { font-size: 12px; line-height: 16px; color: var(--gemboss-text-muted); white-space: nowrap; }
.gb-dock-place[aria-checked="true"] { font-weight: 600; color: var(--gemboss-text-strong); }
.gb-dock-place > svg { flex: none; width: 16px; height: 16px; }
/* Off, its reason read: the kit's menu fades an off row to half (menu.css), which put the reason at about 2:1 on white. */
.gb-dock-menu-group > .gb-dock-place[aria-disabled="true"] { opacity: 1; color: var(--gemboss-text-muted); cursor: not-allowed; }
@media (hover: hover) { .gb-dock-place[aria-disabled="true"]:hover { background: transparent; } }
/* The header's own icon buttons (＋, ⋯, ×) are Polaris' 32px under a mouse from 768px (§9.1's mouse tier), 44px under a finger. */
.gb-dock-header .gb-dock-actions > .gb-dock-icon, .gb-dock-header .gb-dock-actions > .gb-dock-menu > .gb-dock-icon { width: 32px; height: 32px; }
@media (pointer: coarse), (max-width: 47.9975em) {
  .gb-dock-header .gb-dock-actions > .gb-dock-icon, .gb-dock-header .gb-dock-actions > .gb-dock-menu > .gb-dock-icon { width: 44px; height: 44px; }
}
@media (max-width: 760px) {
  .gb-dock-place-side, .gb-dock-place-left { display: none; }
}

/* ── Folded: the chat button ─────────────────────────────────────────────────────────────────────────────────────────────
   52px, black, the chat glyph of the kit's set, 24px from the corner (Chris 29/10/2026,
   "như trên gemboss.ai"): the folded form of every shape (canvas GemDockModes 2–3). A control under a finger and
   under a mouse alike (≥ 44). The dot: working (iris, pulsing), a failure (red), a question waiting (amber), an answer
   waiting (green). The shell is the 52px box; the button fills it. */
.gb-dock.gb-dock-mini {
  left: auto;
  right: 24px;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
  overflow: visible;
}
/* A phone: 16px from the corner (52 + 16 = 68 is what a surface keeps free at the foot for it, the admin's editors do). */
@media (max-width: 760px) {
  .gb-dock.gb-dock-mini { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
}
.gb-dock-knob {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--gemboss-primary);
  color: var(--gemboss-on-primary, #fff);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 12px 28px -8px rgba(86, 97, 245, 0.45), 0 2px 24px rgba(0, 0, 0, 0.16);
  transition: transform 160ms cubic-bezier(0.33, 0, 0, 1);
}
@media (hover: hover) { .gb-dock-knob:hover { transform: scale(1.06); } }
.gb-dock-knob:active { transform: scale(0.94); }
.gb-dock-knob:focus-visible { outline: 3px solid var(--ui-focus, #5661f5); outline-offset: 3px; }
.gb-dock-knob svg { width: 22px; height: 22px; }
.gb-dock-knob-dot {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--gemboss-surface);
}
.gb-dock-knob-busy { background: var(--gemboss-accent-strong); animation: gb-dock-pulse 1.4s ease-in-out infinite; }
.gb-dock-knob-failed { background: var(--gemboss-danger); }
.gb-dock-knob-waiting { background: var(--gemboss-warning); }
.gb-dock-knob-unread { background: var(--gemboss-success-strong); }
/* The header's dot says the same (host.tsx `dotClass`): a failure, a question waiting. After assistant.css's `.gb-dock-dot`, as this file is. */
.gb-dock-dot-failed { background: var(--gemboss-danger); }
.gb-dock-dot-waiting { background: var(--gemboss-warning); }
@media (prefers-reduced-motion: reduce) {
  .gb-dock-knob { transition: none; }
  .gb-dock-knob-busy { animation: none; }
}
