/* Caboodle Spreadsheet – Copyright (C) 2026 the Caboodle authors – GNU GPL v3, see LICENSE.txt
   SPDX-License-Identifier: GPL-3.0-only */
/* The left and right panels (shared/dock.js): the same look in every program – sections that minimize, lines that
   resize, columns (right), and an inner edge that makes the panel wider or narrower. */
.cmd-side { position: relative; flex: none; display: flex; min-height: 0; background: var(--panel); color: var(--text); }
.cmd-side.right { border-left: 1px solid var(--line); }
.cmd-side.left { border-right: 1px solid var(--line); }
.dock { flex-direction: row !important; align-items: stretch; }
.dock-col { flex: 1 1 auto; min-width: 0; min-height: 0; display: flex; flex-direction: column; position: relative; }
.dock-multi .dock-col { flex: none; }
.dock-col + .dock-col { border-left: 1px solid var(--line); }
.dock-pane { display: flex; flex-direction: column; min-height: 0; overflow: hidden; border-top: 0 !important; border-bottom: 0 !important; }
.dock-wrap > .dock-inner { flex: 1 1 auto; min-height: 0; max-height: none; border: 0; }
/* one header for every section: 32 px, the section's icon and name, its own buttons, and the minimize arrow */
.dock-head { display: flex; align-items: center; gap: 6px; flex: none; height: 32px; min-height: 32px; padding: 0 6px 0 10px; border-bottom: 1px solid var(--line-soft); cursor: grab; user-select: none; -webkit-user-select: none; font-size: 12.5px; font-weight: 600; color: var(--text); background: var(--panel); }
.dock-head > .material-symbols-outlined:first-child { font-size: 17px; color: var(--accent-strong); }
.dock-head .pane-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock-head .pane-sub, .dock-head .pane-count { font-weight: 400; color: var(--muted); font-size: 12px; white-space: nowrap; }
.dock-head.panel-title { text-transform: none; letter-spacing: 0; }
.dock-moving, .dock-moving * { cursor: grabbing !important; }
.dock-resizing, .dock-resizing * { cursor: row-resize !important; user-select: none !important; }
.dock-widening, .dock-widening * { cursor: col-resize !important; user-select: none !important; }
.dock-toggle { flex: none; margin-left: auto; width: 24px; height: 24px; border: 0; border-radius: 6px; background: none; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.dock-head .pane-btn + .dock-toggle, .dock-head input + .dock-toggle, .dock-head button + .dock-toggle { margin-left: 2px; }
.dock-toggle:hover { background: var(--hover); color: var(--text); }
.dock-toggle .material-symbols-outlined { font-size: 18px; transition: transform 0.15s; }
.dock-collapsed > :not(.dock-head) { display: none !important; }
.dock-collapsed .dock-toggle .material-symbols-outlined { transform: rotate(-90deg); }
.dock-collapsed .dock-head { border-bottom-color: transparent; }
/* small buttons and fields that sections put in their header */
.pane-btn { flex: none; width: 24px; height: 24px; border: 0; border-radius: 6px; background: none; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.pane-btn:hover { background: var(--hover); color: var(--text); }
.pane-btn .material-symbols-outlined { font-size: 18px; }
.pane-filter { flex: 1 1 80px; min-width: 40px; height: 24px; margin-left: auto; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--text); font: inherit; font-size: 12px; font-weight: 400; }
.pane-filter:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
/* the line between two sections: a 7 px handle with a 1 px line in the middle */
.dock-split { flex: none; height: 7px; margin: -3px 0; position: relative; z-index: 2; cursor: row-resize; touch-action: none; background: linear-gradient(to bottom, transparent 3px, var(--line) 3px, var(--line) 4px, transparent 4px); }
.dock-split:hover, .dock-split.active { background: linear-gradient(to bottom, transparent 2px, var(--accent) 2px, var(--accent) 5px, transparent 5px); }
.dock-split.inert { cursor: default; }
.dock-split.inert:hover { background: linear-gradient(to bottom, transparent 3px, var(--line) 3px, var(--line) 4px, transparent 4px); }
.dock-split[hidden] { display: none; }
/* the panel's inner edge: drag to make it wider or narrower */
.dock-edge { position: absolute; top: 0; bottom: 0; width: 7px; z-index: 6; cursor: col-resize; touch-action: none; }
.cmd-side.right > .dock-edge { left: -4px; }
.cmd-side.left > .dock-edge { right: -4px; }
.dock-edge:hover, .dock-edge.active { background: linear-gradient(to right, transparent 2px, var(--accent) 2px, var(--accent) 5px, transparent 5px); }
.dock-dragging { opacity: 0.45; }
.dock-drop { position: absolute; left: 6px; right: 6px; height: 3px; margin-top: -2px; border-radius: 2px; background: var(--accent); pointer-events: none; z-index: 5; }
.dock-empty { margin: 12px; padding: 18px 10px; border: 1.5px dashed var(--line); border-radius: 10px; text-align: center; font-size: 12px; color: var(--muted); }
/* small windows: the panels lie over the page instead of squeezing it */
@media (max-width: 900px) {
  .cmd-side.right { position: absolute; top: 0; right: 0; bottom: 0; z-index: 30; box-shadow: -8px 0 24px rgba(24, 24, 27, .14); }
  .dock-edge { display: none; }
}
