/* Dockable panels of the timing desks (fs-dock.js, FS.dock): columns of panels, a panel taken by its grip. */
.fs-dock { display: flex; align-items: flex-start; gap: 0; min-width: 0; }
.fs-dock-col { flex: 1 1 0; min-width: 240px; display: flex; flex-direction: column; gap: .5rem; padding-bottom: 1.5rem; align-self: stretch; }
.fs-dock-col > .fs-dock-panel > .card { margin-bottom: 0 !important; }
/* A panel whose content is hidden or empty (the page shows it only while a run is timed, a course without splits) takes no room. */
.fs-dock-panel:not(:has(> :not([hidden]):not(:empty):not(.fs-dock-bar))) { display: none; }
/* So does a column with nothing shown (and the edge before it): the other columns fill the width. */
.fs-dock-col:not(:has(> .fs-dock-panel > :not([hidden]):not(:empty):not(.fs-dock-bar))) { display: none; }
.fs-dock-split:has(+ .fs-dock-col:not(:has(> .fs-dock-panel > :not([hidden]):not(:empty):not(.fs-dock-bar)))) { display: none; }
.fs-dock-panel.fs-dock-moving { opacity: .35; }
.fs-dock-parking { display: none; }

/* The edge between two columns: drag to share their width. */
.fs-dock-split { flex: none; align-self: stretch; width: 14px; cursor: col-resize; position: relative; touch-action: none; }
.fs-dock-split::after { content: ""; position: absolute; top: 0; bottom: 0; left: 6px; width: 2px; border-radius: 1px; background: transparent; transition: background .15s; }
.fs-dock-split:hover::after, body.fs-dock-resizing .fs-dock-split::after { background: var(--dbn-border); }
body.fs-dock-resizing, body.fs-dock-resizing * { cursor: col-resize !important; user-select: none; }

/* The grip: in the card's header, or in a slim bar of a panel without one. */
.fs-dock-grip {
    flex: none; display: inline-block; width: 14px; height: 18px; margin-right: 4px; cursor: grab; touch-action: none; vertical-align: middle;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='10'%3E%3Cg fill='%23000'%3E%3Ccircle cx='1' cy='1' r='1'/%3E%3Ccircle cx='5' cy='1' r='1'/%3E%3Ccircle cx='1' cy='5' r='1'/%3E%3Ccircle cx='5' cy='5' r='1'/%3E%3Ccircle cx='1' cy='9' r='1'/%3E%3Ccircle cx='5' cy='9' r='1'/%3E%3C/g%3E%3C/svg%3E") center / 6px 10px no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='10'%3E%3Cg fill='%23000'%3E%3Ccircle cx='1' cy='1' r='1'/%3E%3Ccircle cx='5' cy='1' r='1'/%3E%3Ccircle cx='1' cy='5' r='1'/%3E%3Ccircle cx='5' cy='5' r='1'/%3E%3Ccircle cx='1' cy='9' r='1'/%3E%3Ccircle cx='5' cy='9' r='1'/%3E%3C/g%3E%3C/svg%3E") center / 6px 10px no-repeat;
    color: var(--dbn-text-dim); opacity: .5;
}
.fs-dock-grip:hover { opacity: .95; }
.fs-dock-grip:active { cursor: grabbing; }
.fs-dock-head { align-items: center; }
.fs-dock-head > .fs-dock-grip { align-self: center; }
/* The header's title stays left, next to the grip (the header spreads its items apart). */
.fs-dock-head > .fs-dock-grip + * { margin-right: auto; }
.fs-dock-head > .fs-dock-grip { margin-right: 2px; }
.fs-dock-bar { display: flex; align-items: center; gap: 2px; font-size: .75rem; color: var(--dbn-text-dim); padding: 0 2px 2px; }
.fs-dock-locked .fs-dock-grip, .fs-dock-locked .fs-dock-bar, .fs-dock-locked .fs-dock-split { display: none; }
.fs-dock-locked .fs-dock-col + .fs-dock-col { margin-left: 14px; }

/* While a panel is dragged: where it would go, and its name at the pointer. */
.fs-dock-indicator { position: fixed; z-index: 1090; pointer-events: none; border-radius: var(--dbn-radius); background: color-mix(in srgb, var(--dbn-accent, #2563eb) 22%, transparent); border: 2px solid var(--dbn-accent, #2563eb); }
.fs-dock-ghost { position: fixed; z-index: 1091; pointer-events: none; padding: 4px 10px; border-radius: var(--dbn-radius); background: var(--dbn-popup, var(--dbn-raised)); border: 1px solid var(--dbn-border); box-shadow: 0 6px 18px rgba(0, 0, 0, .18); font-weight: 600; font-size: .85rem; }
body.fs-dock-dragging, body.fs-dock-dragging * { cursor: grabbing !important; user-select: none; }

/* The Panels menu. */
.fs-dock-menu { z-index: 1085; min-width: 260px; max-width: 300px; }
.fs-dock-menu label.dropdown-item { cursor: pointer; }
.fs-dock-menu-note { white-space: normal; font-size: .78rem; }

/* Narrow: one column, the panels in their order. */
@media (max-width: 899.98px) {
    .fs-dock { flex-direction: column; align-items: stretch; }
    .fs-dock-col { min-width: 0; padding-bottom: .5rem; }
    .fs-dock-split { display: none; }
}
