/* bracket-map.css - the bracket tree / standings (bracket-map.js) */
.bm { display: flex; flex-direction: column; gap: var(--space-4, 16px); }
.bm-stage h4 { margin: 0 0 6px; font: 600 12px var(--font, sans-serif); text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted, #9ab); }
.bm-cols { position: relative; display: flex; gap: 24px; overflow-x: auto; padding-bottom: 6px; }
.bm-col { position: relative; z-index: 1; display: flex; flex-direction: column; min-width: 170px; flex: 0 0 auto; }
/* the lines between rounds (drawn behind the boxes; decided ones in green) */
.bm-lines { position: absolute; left: 0; top: 0; z-index: 0; pointer-events: none; }
.bm-lines path { fill: none; stroke: var(--text-faint, #789); stroke-width: 1.5; opacity: .6; }
.bm-lines path.done { stroke: #56d88a; opacity: .75; }
.bm-round { margin-bottom: 6px; font: 600 11px var(--font, sans-serif); color: var(--text-muted, #9ab); white-space: nowrap; }
.bm-col-body { flex: 1; display: flex; flex-direction: column; justify-content: space-around; gap: 8px; }
.bm-match { border: 1px solid var(--border, #345); border-radius: 8px; overflow: hidden; background: var(--surface-sunken, #12202a); }
.bm-match.playable { cursor: pointer; }
.bm-match.playable:hover, .bm-match.playable:focus-visible { border-color: var(--accent, #00bfff); outline: none; }
.bm-match.current { border-color: var(--accent, #00bfff); box-shadow: 0 0 0 2px rgba(0, 191, 255, .35); }
.bm-side { display: flex; align-items: center; gap: 6px; padding: 4px 8px; min-height: 26px; font: 13px var(--font, sans-serif); color: var(--text, #fff); }
.bm-side + .bm-side { border-top: 1px solid var(--border, #345); }
.bm-side img, .bm-nopic { width: 20px; height: 20px; border-radius: 4px; object-fit: cover; flex-shrink: 0; background: var(--surface-2, #234); }
.bm-side span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-side small { color: var(--text-muted, #9ab); font-size: 11px; }
.bm-side.won { font-weight: 700; background: rgba(46, 213, 115, .14); }
.bm-side.won span { color: #7ee2a8; }
.bm-side.lost { opacity: .45; }
.bm-side.bye, .bm-side.tbd { color: var(--text-faint, #789); font-style: italic; }
/* round robin */
.bm.rr { gap: var(--space-3, 12px); }
.bm-table { width: 100%; max-width: 420px; border-collapse: collapse; font: 13px var(--font, sans-serif); }
.bm-table th { text-align: left; color: var(--text-muted, #9ab); font-weight: 600; padding: 4px 6px; border-bottom: 1px solid var(--border, #345); }
.bm-table td { padding: 4px 6px; border-bottom: 1px solid var(--border, #345); }
.bm-table td img { width: 18px; height: 18px; border-radius: 3px; object-fit: cover; vertical-align: -4px; margin-right: 6px; }
.bm-table tr.champ td { color: #7ee2a8; font-weight: 700; }
.bm.rr .bm-cols { flex-wrap: wrap; }
/* zoom and pan (BracketMap.zoomable): the map is one plane, scaled from its top-left corner */
.bm-zoomable { position: relative; overflow: hidden; }
.bm-zoomable > .bm { width: max-content; transform-origin: 0 0; }
.bm-zoomable > .bm .bm-cols { overflow: visible; }
.bm-zoomable:not(.bm-fits) { cursor: grab; touch-action: none; }
.bm-zoomable.dragging { cursor: grabbing; user-select: none; }
.bm-zoom { position: absolute; top: 6px; right: 6px; z-index: 3; display: flex; align-items: center; gap: 2px; padding: 2px;
  background: var(--surface, #1d2b33); border: 1px solid var(--border, #345); border-radius: 8px; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); cursor: default; }
.bm-fits > .bm-zoom { display: none; }
.bm-zoom-btn { min-width: 28px; height: 26px; padding: 0 6px; border: 0; border-radius: 6px; background: transparent; color: var(--text, #fff);
  font: 600 15px var(--font, sans-serif); cursor: pointer; }
.bm-zoom-btn:hover, .bm-zoom-btn:focus-visible { background: var(--surface-2, #234); outline: none; }
.bm-zoom-pct { min-width: 48px; font-size: 12px; color: var(--text-muted, #9ab); }
