/* Resizable panels (part 7a): the splitters js/panels.js lays over the 2px grooves between panels. Tokens only. */
.app { position: relative; }
.split { position: absolute; z-index: 8; touch-action: none; }
.split.x { width: 8px; margin-left: -4px; cursor: col-resize; }
.split.y { height: 8px; margin-top: -4px; cursor: row-resize; }
/* the groove lights up under the pointer, and in blue (focus) while dragged or focused */
.split::after { content: ""; position: absolute; background: transparent; transition: background var(--t); }
.split.x::after { top: 0; bottom: 0; left: calc(50% - var(--gutter) / 2); width: var(--gutter); }
.split.y::after { left: 0; right: 0; top: calc(50% - var(--gutter) / 2); height: var(--gutter); }
.split:hover::after { background: var(--edge3); }
.split.on::after, .split:focus-visible::after { background: var(--blue); }
.split:focus-visible { outline: none; }
/* while dragging: no text selection, the resize cursor everywhere, nothing in the panels catching the pointer */
.app.resizing { user-select: none; }
.app.resizing:has(.split.x.on), .app.resizing:has(.split.x.on) * { cursor: col-resize !important; }
.app.resizing:has(.split.y.on), .app.resizing:has(.split.y.on) * { cursor: row-resize !important; }
.app.resizing > .panel { pointer-events: none; }
/* double-click reset eases back over --t-panel */
.app.easing { transition: grid-template-columns var(--t-panel) ease, grid-template-rows var(--t-panel) ease; }
@media (max-width: 820px) { .split { display: none; } }

/* ---------- Part 7b: maximise, collapse, docking (js/dock.js). Tokens only. ---------- */
/* the backquote key: one panel over the whole working area; the rest wait underneath */
.app.maxed > .panel:not(.max), .app.maxed > .split { visibility: hidden; }
.app.maxed > .panel.max { position: absolute; grid-area: auto !important; z-index: 9;  /* out of its area, so it's placed against the whole grid */ top: calc(var(--bar-h) + var(--gutter)); left: var(--gutter); right: var(--gutter); bottom: var(--gutter); }
/* a collapsed side column: a strip with the panel's name, which opens it (desktop only: a phone has one column) */
@media (min-width: 821px) {
  .app > .panel.collapsed { cursor: pointer; align-items: center; }
  .app > .panel.collapsed > * { display: none !important; }
  .app > .panel.collapsed::before { content: attr(data-name); writing-mode: vertical-rl; padding: 12px 0; color: var(--dim); font-size: var(--fs); white-space: nowrap; }
  .app > .panel.collapsed:hover::before { color: var(--bright); }
  .app > .panel.collapsed:hover { background: var(--hover); }
  .app:not(.maxed) > .panel > .tabs { cursor: grab; }
}
/* docking: drag a panel by its tab row onto another; the target rings blue and says what will happen */
.app.docking, .app.docking * { cursor: grabbing !important; user-select: none; }
.app.docking > .panel.docksrc { opacity: .5; }
.app > .panel.docktarget { box-shadow: inset 0 0 0 2px var(--blue); }
.app > .panel.docktarget::after { content: attr(data-dock); position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; pointer-events: none;
  background: color-mix(in srgb, var(--blue) 10%, transparent); color: var(--bright); font-size: var(--fs-m); font-weight: var(--fw-on); }
.dockghost { position: fixed; left: 0; top: 0; z-index: 100; padding: 4px 10px; border-radius: var(--r-s); background: var(--menu-bg); color: var(--bright);
  box-shadow: var(--shadow-menu); font-size: var(--fs); pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .app.easing { transition: none; } }
