/* The pick builder: a drawer, plus a floating button that shows the count.
 *
 * A drawer rather than a third column, because it has to work identically on
 * the board and on a player page, and the player page already uses its right
 * rail for the model.
 */

.slip-fab {
  position: fixed; right: var(--s4); bottom: var(--s4); z-index: 60;
  display: inline-flex; align-items: center; gap: var(--s2);
  padding: 11px var(--s4);
  border: 1px solid var(--accent); border-radius: var(--r-pill);
  background: var(--accent); color: var(--accent-ink);
  font-weight: 700; font-size: var(--fs-sm); cursor: pointer;
  box-shadow: var(--shadow-pop);
  transition: transform var(--t-fast), background var(--t-fast);
}
.slip-fab:hover { background: var(--accent-hover); transform: translateY(-1px); }
.slip-fab[hidden] { display: none; }
.slip-count {
  min-width: 18px; padding: 0 5px;
  border-radius: var(--r-pill);
  background: var(--accent-ink); color: var(--accent);
  font-size: var(--fs-micro); font-weight: 700; text-align: center;
}

/* Exactly the viewport, and it clips. The drawer slides within it, so parking
 * it off-screen cannot add to the page's scrollable width. Pointer events are
 * off so the invisible shell never swallows a click on the page beneath. */
.slip-shell {
  position: fixed; inset: 0; z-index: 70;
  overflow: hidden;
  pointer-events: none;
}
.slip-shell > * { pointer-events: auto; }

.slip {
  position: absolute; z-index: 1;
  top: 0; right: 0; bottom: 0; width: min(380px, 100vw);
  background: var(--panel);
  border-left: 1px solid var(--line-2);
  box-shadow: -18px 0 40px -26px rgb(0 0 0 / 0.9);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--t) var(--ease);
  /* Not just invisible: an off-screen drawer must not be tabbable. */
  visibility: hidden;
}
.slip { pointer-events: none; }
.slip[data-open] {
  transform: none; visibility: visible; pointer-events: auto;
}

.slip-head {
  display: flex; align-items: center; gap: var(--s2);
  padding: var(--s3) var(--s3) var(--s3) var(--s4);
  border-bottom: 1px solid var(--line);
}
.slip-head h2 { margin: 0; font-size: var(--fs-lg); }
.slip-head .micro { margin-left: auto; font-family: var(--font-num); }

.slip-legs {
  list-style: none; margin: 0; padding: var(--s2) var(--s3);
  overflow-y: auto; flex: 1;
  display: grid; gap: var(--s1); align-content: start;
}
.slip-leg {
  display: flex; align-items: center; gap: var(--s2);
  padding: var(--s2);
  border: 1px solid var(--line); border-radius: var(--r-chip);
  background: var(--panel-2);
}
.slip-leg-main { min-width: 0; flex: 1; }
.slip-player {
  display: block; font-size: var(--fs-sm); font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.slip-detail {
  display: block; font-size: var(--fs-micro); color: var(--ink-2);
}
.slip-detail .side-over  { color: var(--over); font-weight: 600; }
.slip-detail .side-under { color: var(--under); font-weight: 600; }
.slip-note {
  display: block; font-size: var(--fs-micro); color: var(--neutral);
}
.slip-p {
  font-size: var(--fs-body); font-weight: 600; flex: none;
  font-variant-numeric: tabular-nums;
}
.slip-p.hot  { color: var(--over); }
.slip-p.cold { color: var(--under); }
/* A promotional leg, where the land rate is the promotion rather than an
 * edge. Same badge as the board and the player page, so one word means one
 * thing everywhere. */
.slip-promo {
  flex: none; display: inline-flex; align-items: center; cursor: help;
  padding: 2px 7px; border-radius: var(--r-pill);
  font-size: var(--fs-micro); font-weight: 700;
  letter-spacing: var(--track-lab); text-transform: uppercase;
  color: var(--neutral);
  background: color-mix(in srgb, var(--neutral) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--neutral) 42%, transparent);
}
.slip-x {
  flex: none; width: 24px; height: 24px;
  border: 0; background: none; color: var(--dim);
  font-size: 18px; line-height: 1; cursor: pointer; border-radius: 4px;
}
.slip-x:hover { color: var(--under); background: var(--panel-3); }

.slip-empty, .slip-why {
  padding: 0 var(--s4); color: var(--ink-2);
  font-size: var(--fs-micro); line-height: 1.5;
}
.slip-empty { padding: var(--s5) var(--s4); text-align: center; color: var(--faint); }

.slip-foot {
  border-top: 1px solid var(--line);
  padding: var(--s3) 0 var(--s3);
  background: var(--panel-2);
  display: grid; gap: var(--s2);
}
.slip-headline {
  display: flex; align-items: baseline; gap: var(--s2);
  padding: 0 var(--s4);
}
.slip-big {
  margin-left: auto;
  font-size: 30px; font-weight: 600; color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.slip-actions { display: grid; gap: var(--s2); padding: var(--s2) var(--s4) 0; }

/* Below the layout's own single-column breakpoint the drawer takes the whole
 * width.
 *
 * It was 380px fixed, which on a 730px screen is a panel sitting over half
 * the board -- wide enough to hide the columns you are picking from and
 * narrow enough to look like it should not be. The board is already in card
 * mode at this width, so there is no two-column reading to preserve. */
@media (max-width: 860px) {
  .slip { width: 100vw; }
  .slip-fab { right: var(--s3); bottom: var(--s3); }
}

/* Room for the floating button, so it never rests on top of a row.
 *
 * It is fixed to the bottom-right corner, and on a wide screen the page
 * gutter kept it clear of anything. Below that the board runs to the edge and
 * the button covered the last row's own star -- the one control it was
 * sitting on. Reserving its height in the page is the fix that cannot drift,
 * because nothing has to know where the button is. */
@media (max-width: 1024px) {
  .main { padding-bottom: calc(var(--s7) + 56px); }
}

@media (prefers-reduced-motion: reduce) {
  .slip { transition: none; }
}
