/* The drag handles: the boundary between two column heads, the sidebar's right edge and the action panel's left edge. A handle is a thin hit
   area that shows a line while it is hovered, focused or dragged. The panel never takes more than leaves the list its columns (ui/panel-room.js), and where no list says
   what they need, 420 px (`LIST_LEAST` in ui/layout-store.js). */

.resizer { position: relative; flex: none; z-index: 6; cursor: col-resize; touch-action: none; }
.resizer:focus-visible { outline: none; }
.resizer::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; border-radius: 1px; background: transparent; }
.resizer:hover::after, .resizer.is-dragging::after { background: var(--accm); }
.resizer:focus-visible::after { width: 3px; margin-left: -1.5px; background: var(--accm); }
.is-resizing, .is-resizing * { cursor: col-resize !important; user-select: none !important; }

.table { position: relative; }
/* Above the stuck cells of the rows (z-index 4 in list.css), so that a handle is never covered; the strip itself takes no press. */
.col-handles {
  position: absolute; top: 0; left: 0; z-index: 5; display: grid; grid-template-columns: var(--columns); gap: var(--gap);
  width: 100%; min-width: var(--table-min); height: 30px; padding: 0 12px 0 var(--pad); pointer-events: none;
}
.table.is-narrow .col-handles { grid-template-columns: var(--columns-narrow); min-width: var(--table-min-narrow); padding: 0 8px 0 var(--pad); }
.col-cell { position: relative; min-width: 0; }
/* The first column stays in view while the table scrolls (list.css), so the handle on its right edge does too. */
.col-handles > .col-cell:nth-child(2) { position: sticky; left: calc(var(--pad) + 22px + var(--gap)); }
.col-cell .resizer { position: absolute; top: 0; bottom: 0; right: -10px; width: 12px; pointer-events: auto; }
.table.is-narrow .col-wide, .table.is-narrow .is-last-narrow .resizer { display: none; }
/* A column the person made narrower clips what does not fit instead of drawing it over the next column. */
.table.is-sized .row > [role="cell"], .table.is-sized .row-pick { min-width: 0; overflow: clip; overflow-clip-margin: 4px; }

.resizer.is-side { position: sticky; top: 0; align-self: flex-start; width: 10px; height: 100vh; margin: 0 -5px; z-index: 30; }
.resizer.is-panel { align-self: stretch; width: 10px; margin: 0 -5px; }
.panel { max-width: calc(100% - 420px); }
/* On a wide window the panel is docked over the right of the window (panel.css), so its handle is docked on the panel's left edge, above it. */
@media (min-width: 1081px) {
  .resizer.is-panel { position: fixed; top: var(--bar-height); bottom: 0; right: calc(var(--panel-drawn) - 5px); margin: 0; z-index: 11; }
}

@media (max-width: 1080px) {
  .resizer.is-panel { display: none; }
  .panel { max-width: none; }
}
@media (max-width: 899px) { .resizer.is-side { display: none; } }
@media (max-width: 599px) { .col-handles { display: none; } }
