/* free roulette: a strip of the wheel that runs under a pin, and the betting layout */
.fx-roulette { --rl-red: #C0262D; --rl-black: #14211C; --rl-green: #0D6B57; --rl-felt: #0F4F3B; }
.rl-wheel { display: grid; gap: 12px; border-radius: 18px; padding: 14px 0 12px; background: linear-gradient(180deg, #0e1b2b, #13283e); color: #fff; overflow: hidden; }
.rl-track { position: relative; height: 54px; overflow: hidden; }
.rl-strip { display: flex; height: 100%; will-change: transform; }
.rl-strip span { box-sizing: border-box; flex: 0 0 46px; width: 46px; height: 46px; margin-top: 4px; display: grid; place-items: center; font-weight: 800; font-size: 17px; color: #fff; border-inline-end: 1px solid #ffffff2e; }
.rl-strip .red, .rl-hist .red, .rl-result .red { background: var(--rl-red); }
.rl-strip .black, .rl-hist .black, .rl-result .black { background: var(--rl-black); }
.rl-strip .green, .rl-hist .green, .rl-result .green { background: var(--rl-green); }
.rl-pin { position: absolute; top: 0; bottom: 0; left: 50%; width: 46px; margin-left: -23px; border: 3px solid #F2B705; border-radius: 8px; box-shadow: 0 0 0 100vmax #0000002e; pointer-events: none; }
.rl-result { margin: 0; display: flex; align-items: center; justify-content: center; gap: 12px; direction: rtl; font-size: 15px; font-weight: 700; }
.rl-result b { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; border: 3px solid #ffffffd9; font-family: Lalezar, Vazirmatn, sans-serif; font-weight: 400; font-size: 30px; line-height: 1; color: #fff; }

.rl-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rl-chips-l { font-size: 14px; font-weight: 800; }
.fx-roulette .fx-chipbtn[aria-pressed="true"] { background: var(--fx-main); border-color: var(--fx-main); color: var(--fx-main-ink); }

.rl-table { display: grid; gap: 4px; grid-template-columns: 44px minmax(0, 1fr) 52px; grid-template-areas: "zero nums cols" ". dozens ." ". outs ."; padding: 10px; border-radius: 16px; background: var(--rl-felt); border: 5px solid var(--fx-rail); }
.rl-zero { grid-area: zero; }
.rl-nums { grid-area: nums; display: grid; gap: 4px; grid-auto-flow: column; grid-template-rows: repeat(3, 44px); grid-auto-columns: minmax(0, 1fr); }
@media (min-width: 641px) { .rl-nums .rl-cell { order: 0 !important; } }
.rl-cols { grid-area: cols; display: grid; gap: 4px; grid-template-rows: repeat(3, 44px); }
.rl-dozens { grid-area: dozens; display: grid; gap: 4px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rl-outs { grid-area: outs; display: grid; gap: 4px; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.rl-cell { direction: rtl; position: relative; min-width: 0; min-height: 44px; padding: 0 2px; border: 1.5px solid #ffffff59; border-radius: 6px; font-family: Vazirmatn, Tahoma, sans-serif; font-size: 15px; font-weight: 800; color: #fff; background: transparent; cursor: pointer; }
.rl-cell.red { background: var(--rl-red); }
.rl-cell.black { background: var(--rl-black); }
.rl-cell.green { background: var(--rl-green); }
.rl-cell.out { font-size: 14px; }
.rl-cell:hover { border-color: #fff; }
.rl-cell.has { border-color: #F2B705; }
.rl-cell.win { box-shadow: 0 0 0 3px #F2B705; z-index: 1; }
.rl-stack { position: absolute; top: -7px; left: -5px; min-width: 24px; height: 22px; padding: 0 5px; display: grid; place-items: center; border-radius: 999px; background: #F2B705; color: #1B1500; font-style: normal; font-size: 12px; font-weight: 800; line-height: 1; box-shadow: 0 1px 3px #00000066; pointer-events: none; }
.rl-total { margin: 0; align-self: center; font-size: 15px; font-weight: 700; }
.rl-total b { font-size: 17px; }
.rl-hist { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 5px; direction: ltr; }
.rl-hist li { min-width: 32px; height: 30px; padding: 0 6px; display: grid; place-items: center; border-radius: 8px; font-size: 14px; font-weight: 800; color: #fff; }
.rl-hist li:first-child { outline: 2px solid #F2B705; outline-offset: 1px; }

@media (max-width: 640px) {
  /* on a phone the layout stands upright: three numbers to a row, so the three columns stay real columns */
  .rl-table { grid-template-columns: minmax(0, 1fr); grid-template-areas: "zero" "nums" "cols" "dozens" "outs"; }
  .rl-nums { grid-auto-flow: row; grid-template-rows: none; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 42px; }
  .rl-cols { grid-template-rows: none; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rl-cols .rl-cell:nth-child(1) { order: 3; }
  .rl-cols .rl-cell:nth-child(2) { order: 2; }
  .rl-cols .rl-cell:nth-child(3) { order: 1; }
  .rl-outs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* two rows of three, each bet above its opposite: 1-18 / 19-36, even / odd, red / black */
  .rl-outs .rl-cell[data-k="high"] { order: 4; }
  .rl-outs .rl-cell[data-k="odd"] { order: 5; }
  .rl-outs .rl-cell[data-k="black"] { order: 6; }
}
@media (prefers-reduced-motion: reduce) { .rl-strip { transition: none !important; } }
