/* v0.9.98 · contextual English help, immediate Blackjack results and layout refinement */

/* ---------- Contextual help content ---------- */
#rulesDrawer {
  overflow-y: auto !important;
  overscroll-behavior: contain;
}
#rulesDrawer .rules-subheading {
  margin: 24px 0 10px;
  padding-bottom: 7px;
  border-bottom: 2px solid rgba(255,255,255,.14);
  color: #f7d66b;
  font-size: .9rem;
  letter-spacing: .09em;
  text-transform: uppercase;
}
#rulesDrawer .rule-card-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 14px 0 20px;
}
#rulesDrawer .rule-playing-card {
  width: 68px;
  min-height: 88px;
  padding: 8px 6px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  border: 2px solid #071116;
  border-radius: 10px;
  background: #fffdf4;
  color: #111820;
  box-shadow: 3px 3px 0 #071116;
  font-size: 1.15rem;
  font-weight: 1000;
  box-sizing: border-box;
}
#rulesDrawer .rule-playing-card.red { color: #ad2438; }
#rulesDrawer .rule-playing-card small {
  color: inherit;
  font-size: .55rem;
  line-height: 1.1;
  text-align: center;
}
#rulesDrawer .poker-ranking-list {
  display: grid;
  gap: 9px;
  margin: 14px 0 22px;
}
#rulesDrawer .poker-ranking {
  padding: 10px;
  display: grid;
  grid-template-columns: 112px minmax(0,1fr);
  gap: 6px 10px;
  align-items: center;
  border: 2px solid #071116;
  border-radius: 12px;
  background: rgba(255,255,255,.055);
  box-sizing: border-box;
}
#rulesDrawer .poker-ranking > strong {
  color: #fff2bd;
  font-size: .73rem;
}
#rulesDrawer .poker-ranking > small {
  grid-column: 1 / -1;
  color: #aebcc9;
  font-size: .64rem;
  line-height: 1.35;
}
#rulesDrawer .rule-card-line {
  min-width: 0;
  display: flex;
  gap: 4px;
  justify-content: flex-end;
}
#rulesDrawer .rule-card-line i {
  width: 31px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid #071116;
  border-radius: 6px;
  background: #fffdf4;
  color: #111820;
  box-shadow: 2px 2px 0 #071116;
  font-size: .58rem;
  font-style: normal;
  font-weight: 1000;
}

/* ---------- Poker: remove the green top bar and use the gained room ---------- */
body.poker-live #pokerApp .poker-roombar {
  display: none !important;
}
body.poker-live #pokerApp {
  margin-top: 12px !important;
}
@media (min-width: 801px) {
  body.poker-live #pokerApp .poker-layout {
    align-items: stretch !important;
  }
  body.poker-live #pokerApp .poker-main-column {
    display: grid !important;
    grid-template-rows: minmax(0, 1fr) auto !important;
    align-content: stretch !important;
  }
  body.poker-live #pokerApp .poker-felt {
    min-height: 720px !important;
  }
  body.poker-live #pokerApp .poker-table-shell,
  body.poker-live #pokerApp .poker-table-rim {
    height: 100% !important;
    box-sizing: border-box !important;
  }
  body.poker-live #pokerApp .poker-controls {
    position: relative !important;
    min-height: 128px !important;
    padding: 14px 192px 14px 14px !important;
    box-sizing: border-box !important;
  }
  body.poker-live #pokerApp .poker-controls > :not(.poker-utility-actions):not(.hidden) {
    min-height: 100px !important;
  }
  body.poker-live #pokerApp .poker-utility-actions {
    position: absolute !important;
    top: 14px !important;
    right: 14px !important;
    bottom: 14px !important;
    width: 164px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 8px !important;
  }
  body.poker-live #pokerApp .poker-utility-actions > button:not(.hidden) {
    width: 100% !important;
    min-height: 46px !important;
    flex: 1 1 0 !important;
    margin: 0 !important;
  }
  body.poker-live #pokerApp .poker-sidebar {
    position: static !important;
    align-self: stretch !important;
    height: auto !important;
    max-height: none !important;
    padding: 16px 12px !important;
    overflow: hidden !important;
  }
  body.poker-live #pokerApp .poker-sidebar > section:first-child {
    padding-inline: 4px !important;
    overflow: visible !important;
  }
  body.poker-live #pokerApp .poker-player-list {
    width: calc(100% - 8px) !important;
    max-height: 366px !important;
    margin: 10px 4px 0 !important;
    padding: 0 1px 4px !important;
    gap: 7px !important;
    overflow-y: auto !important;
    scrollbar-gutter: stable both-edges !important;
    box-sizing: border-box !important;
  }
  body.poker-live #pokerApp .poker-player-row {
    width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }
}

/* ---------- Blackjack and Roulette table/control right-edge alignment ---------- */
@media (min-width: 1181px) {
  body.multiplayer-live #multiplayerApp .multi-table-rim {
    width: calc(100% - 10px) !important;
    justify-self: start !important;
  }
  body.multiplayer-live #multiplayerApp .multi-controls {
    width: 100% !important;
  }
  #rouletteApp .roulette-table-rim {
    width: calc(100% - 10px) !important;
    justify-self: start !important;
    box-sizing: border-box !important;
  }
  #rouletteApp .roulette-controls {
    width: 100% !important;
    box-sizing: border-box !important;
  }
}

/* Result labels are visible as soon as the server publishes the result. */
body.multiplayer-live #multiSeats .multi-hand-result,
body.multiplayer-live #multiSeats .seat-round-profit {
  animation: none !important;
  transition: none !important;
  animation-delay: 0s !important;
  transition-delay: 0s !important;
}

/* ---------- Slots chip rack: one horizontal baseline ---------- */
#slotsApp .slots-chip-palette {
  align-items: center !important;
}
#slotsApp .slots-chip-palette .chip,
#slotsApp .slots-chip-palette .chip-5,
#slotsApp .slots-chip-palette .chip.selected {
  position: relative !important;
  top: auto !important;
  bottom: auto !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  translate: none !important;
  transform: none !important;
  vertical-align: middle !important;
}

@media (max-width: 800px) {
  #rulesDrawer .poker-ranking {
    grid-template-columns: 1fr !important;
  }
  #rulesDrawer .rule-card-line {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 3px;
  }
  body.poker-live #pokerApp .poker-controls,
  body.poker-live #pokerApp .poker-controls:has(.poker-lobby-controls:not(.hidden)) {
    height: 356px !important;
    min-height: 356px !important;
    max-height: 356px !important;
    padding: 9px 9px 72px !important;
  }
  body.poker-live #pokerApp .poker-controls > :not(.poker-utility-actions):not(.hidden) {
    position: absolute !important;
    inset: 9px 9px 72px !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }
  body.poker-live #pokerApp .poker-utility-actions {
    position: absolute !important;
    right: 9px !important;
    bottom: 9px !important;
    left: 9px !important;
    height: 54px !important;
    display: flex !important;
    gap: 8px !important;
  }
  body.poker-live #pokerApp .poker-utility-actions > button:not(.hidden) {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    height: 54px !important;
    margin: 0 !important;
  }
}
