/* The disc behind the pockets shows as the rim the ball runs on. */
.wheel-wrap {
  width: min(100%, 20rem);
  border-radius: 50%;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
}

.wheel {
  will-change: transform;
}

.ball-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.ball {
  fill: #fff;
  stroke: rgb(10 15 35 / 0.45);
  stroke-width: 0.4;
  filter: drop-shadow(0 0.4px 0.6px rgb(0 0 0 / 0.5));
}

.wheel-hub {
  width: 50%;
  height: 50%;
}

.board-scroll {
  width: 100%;
  padding: 0.5rem 0.5rem 0.25rem;
  overflow-x: auto;
}

.board {
  display: grid;
  grid-template-columns: repeat(14, minmax(2.4rem, 1fr));
  grid-template-rows: repeat(3, 2.75rem) repeat(2, 2.5rem);
  gap: 3px;
  min-width: 36rem;
}

.spot {
  position: relative;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: var(--surface-2);
  font-weight: 700;
}

.spot:hover {
  filter: brightness(1.15);
}

.spot.red {
  background: var(--chip-red);
  color: #fff;
}

.spot.black {
  background: var(--chip-black);
  color: #fff;
}

.spot.green {
  background: var(--chip-green);
  color: #fff;
}

.spot.hit {
  outline: 3px solid var(--brass);
  outline-offset: 1px;
  z-index: 1;
}

.chip {
  position: absolute;
  top: -0.55rem;
  right: -0.55rem;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.25rem;
  border-radius: 99px;
  border: 1.5px dashed rgb(255 255 255 / 0.8);
  background: var(--chip-gold);
  box-shadow: 0 0 0 2px var(--chip-gold), 0 2px 4px rgb(0 0 0 / 0.4);
  color: #2b1d00;
  font-size: 0.7rem;
  font-style: normal;
}

.wheel-hub[data-color="red"] {
  color: var(--chip-red);
}

.wheel-hub[data-color="green"] {
  color: var(--accent);
}

.hint {
  color: var(--muted);
  font-size: 0.875rem;
}

.total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.total dt {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.total dd {
  font: 700 1.5rem/1.2 var(--display);
}

/* Numbers the chips on the table win on stay lit; the rest fade. */
.spot {
  transition: opacity 0.15s;
  user-select: none;
  touch-action: manipulation;
}

.board:is(.has-bets, .previewing) .number:not(.covered, .preview, .hit) {
  opacity: 0.3;
}

.number.covered {
  box-shadow: inset 0 0 0 2px rgb(255 255 255 / 0.9);
}

.spot.staked:not(.number) {
  box-shadow: inset 0 0 0 2px var(--brass);
}

.spot.staked {
  cursor: grab;
}

.spot.lifting .chip {
  opacity: 0.3;
}

.spot.drop {
  outline: 3px dashed var(--brass);
  outline-offset: 1px;
  z-index: 1;
}

/* The stack being dragged; follows the pointer. */
.chip-ghost {
  position: fixed;
  right: auto;
  z-index: 10;
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.35);
  transform: translate(-50%, -50%) scale(1.4);
  pointer-events: none;
}
