/* RiverX V160 — final live-table composition and integrated seat controls. */

body.rx-v157[data-active-view="table"] {
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

body.rx-v157[data-active-view="table"] main {
  height: auto !important;
  min-height: calc(100dvh - var(--rx157-topbar, 64px)) !important;
  padding-top: 12px !important;
  padding-bottom: 24px !important;
  overflow: visible !important;
}

body.rx-v157 #view-table.rx-dedicated-game-screen {
  width: min(100%, 1680px) !important;
  max-width: 1680px !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 auto !important;
  padding: 0 18px 28px !important;
  overflow: visible !important;
}

body.rx-v157 #view-table .rx-dedicated-view-nav {
  width: min(100%, 1380px) !important;
  min-height: 36px !important;
  height: auto !important;
  margin: 0 auto 10px !important;
  display: flex !important;
  align-items: center !important;
}

body.rx-v157 #view-table .rx-game-back-button {
  min-height: 34px !important;
  height: 34px !important;
  padding: 0 13px !important;
  border-radius: 9px !important;
  font-size: 10px !important;
}

body.rx-v157 #view-table .table-shell {
  width: min(100%, 1380px) !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 auto !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto auto auto !important;
  grid-template-areas:
    "table-info"
    "poker-stage"
    "side-console" !important;
  align-items: stretch !important;
  gap: 12px !important;
  overflow: visible !important;
}

body.rx-v157 #view-table .table-info-card {
  grid-area: table-info !important;
  position: static !important;
  inset: auto !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 70px !important;
  margin: 0 !important;
  padding: 11px 14px !important;
  display: grid !important;
  grid-template-columns: auto minmax(220px, 1fr) minmax(560px, auto) !important;
  align-items: center !important;
  gap: 14px !important;
  overflow: hidden !important;
  border-radius: 16px !important;
  background: linear-gradient(135deg, rgba(11, 19, 32, .98), rgba(13, 12, 29, .97)) !important;
  border: 1px solid rgba(143, 120, 255, .2) !important;
  box-shadow: 0 15px 34px rgba(0, 0, 0, .26) !important;
}

body.rx-v157 #view-table .table-info-card .table-tier-badge {
  min-height: 28px !important;
  margin: 0 !important;
  padding: 0 10px !important;
  white-space: nowrap !important;
}

body.rx-v157 #view-table .table-info-card h2 {
  min-width: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  color: #f5f7ff !important;
  font-size: clamp(17px, 1.45vw, 24px) !important;
  line-height: 1.15 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.rx-v157 #view-table .table-info-card .table-meta {
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(110px, 1fr)) !important;
  gap: 7px !important;
  overflow: visible !important;
  background: transparent !important;
  border: 0 !important;
}

body.rx-v157 #view-table .table-info-card .table-meta > div {
  min-width: 0 !important;
  min-height: 46px !important;
  padding: 7px 9px !important;
  display: grid !important;
  align-content: center !important;
  justify-items: start !important;
  gap: 3px !important;
  overflow: hidden !important;
  background: rgba(255, 255, 255, .035) !important;
  border: 1px solid rgba(255, 255, 255, .065) !important;
  border-radius: 10px !important;
}

body.rx-v157 #view-table .table-info-card .table-meta span,
body.rx-v157 #view-table .table-info-card .table-meta strong {
  width: 100% !important;
  overflow: hidden !important;
  text-align: left !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.rx-v157 #view-table .poker-stage {
  grid-area: poker-stage !important;
  position: relative !important;
  width: min(100%, 1320px) !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 auto !important;
  padding: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 10px !important;
  align-items: start !important;
  justify-items: stretch !important;
  overflow: visible !important;
}

body.rx-v157 #view-table .poker-table,
body.rx-v157 #view-table .poker-table:not(.exact-art-mode),
body.rx-v157 #view-table .poker-table.exact-art-mode {
  position: relative !important;
  width: 100% !important;
  max-width: 1320px !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 16 / 9 !important;
  margin: 0 !important;
  overflow: hidden !important;
  border: 1px solid color-mix(in srgb, var(--accent, #7c63ff) 52%, rgba(255, 255, 255, .13)) !important;
  border-radius: 24px !important;
  outline: 0 !important;
  background: #02040a !important;
  box-shadow: 0 28px 70px rgba(0, 0, 0, .5), 0 0 54px color-mix(in srgb, var(--accent, #7c63ff) 13%, transparent) !important;
}

body.rx-v157 #view-table .poker-table .actual-table-art {
  position: absolute !important;
  inset: 0 !important;
  z-index: 0 !important;
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  max-height: none !important;
  object-fit: fill !important;
  object-position: center !important;
  border: 0 !important;
  border-radius: inherit !important;
  filter: saturate(1.04) contrast(1.035) brightness(1.02) !important;
  pointer-events: none !important;
}

body.rx-v157 #view-table .poker-table::before,
body.rx-v157 #view-table .poker-table::after,
body.rx-v157 #view-table .poker-table .table-image-layer,
body.rx-v157 #view-table .poker-table .table-vignette {
  pointer-events: none !important;
}

body.rx-v157 #view-table .poker-table::before { display: none !important; }

body.rx-v157 #view-table .poker-table::after {
  inset: 0 !important;
  z-index: 2 !important;
  border-radius: inherit !important;
  background: radial-gradient(ellipse at center, transparent 48%, rgba(0, 0, 0, .08) 75%, rgba(0, 0, 0, .28) 100%) !important;
}

body.rx-v157 #view-table .poker-table .table-image-layer,
body.rx-v157 #view-table .poker-table .table-vignette,
body.rx-v157 #view-table .poker-table .felt-pattern,
body.rx-v157 #view-table .poker-table .live-table-title,
body.rx-v157 #view-table .poker-table .integrated-art-badge,
body.rx-v157 #view-table .poker-table .chair {
  display: none !important;
}

body.rx-v157 #view-table .poker-table .pot-display {
  z-index: 18 !important;
  min-width: 92px !important;
  padding: 6px 12px !important;
  border-radius: 12px !important;
  background: rgba(4, 8, 18, .82) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

body.rx-v157 #view-table .poker-table .pot-display span { font-size: 9px !important; }
body.rx-v157 #view-table .poker-table .pot-display strong { font-size: clamp(14px, 1.25vw, 20px) !important; }

body.rx-v157 #view-table .poker-table .community-cards,
body.rx-v157 #view-table .poker-table .dealer-chip,
body.rx-v157 #view-table .poker-table .seat {
  position: absolute !important;
  z-index: 20 !important;
}

/* Empty seats are small targets embedded in the felt, never floating cards. */
body.rx-v157 #view-table .poker-table .seat.is-open-seat {
  width: clamp(54px, 4.8vw, 66px) !important;
  height: clamp(54px, 4.8vw, 66px) !important;
  min-width: 0 !important;
  min-height: 0 !important;
  display: grid !important;
  place-items: center !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  opacity: 1 !important;
  overflow: visible !important;
}

body.rx-v157 #view-table .poker-table .seat.is-open-seat::before,
body.rx-v157 #view-table .poker-table .seat.is-open-seat::after {
  display: none !important;
  content: none !important;
}

body.rx-v157 #view-table .seat-ripple-target {
  position: relative !important;
  isolation: isolate !important;
  width: 56px !important;
  height: 56px !important;
  min-width: 56px !important;
  min-height: 56px !important;
  margin: 0 !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  overflow: visible !important;
  color: #fff6d8 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 50% !important;
  box-shadow: none !important;
  cursor: pointer !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  transform: translateZ(0) !important;
}

body.rx-v157 #view-table .seat-ripple-target::before,
body.rx-v157 #view-table .seat-ripple-target::after {
  content: "" !important;
  position: absolute !important;
  z-index: -1 !important;
  inset: 4px !important;
  border: 1px solid color-mix(in srgb, var(--accent, #8a63ff) 70%, #ffffff 14%) !important;
  border-radius: 50% !important;
  opacity: 0 !important;
  pointer-events: none !important;
  animation: rxSeatRipple 2.35s cubic-bezier(.18, .66, .32, 1) infinite !important;
}

body.rx-v157 #view-table .seat-ripple-target::after { animation-delay: 1.15s !important; }

body.rx-v157 #view-table .seat-ripple-core {
  position: relative !important;
  z-index: 2 !important;
  width: 48px !important;
  height: 48px !important;
  display: grid !important;
  grid-template-rows: 23px 12px !important;
  place-content: center !important;
  place-items: center !important;
  gap: 0 !important;
  border-radius: 50% !important;
  color: #fff7d9 !important;
  background: radial-gradient(circle at 35% 24%, rgba(255, 255, 255, .2), transparent 34%), linear-gradient(145deg, color-mix(in srgb, var(--accent, #8a63ff) 82%, #22133a), #24123e 78%) !important;
  border: 1px solid rgba(255, 222, 137, .72) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24), inset 0 -8px 14px rgba(0, 0, 0, .24), 0 6px 18px rgba(0, 0, 0, .5), 0 0 18px color-mix(in srgb, var(--accent, #8a63ff) 35%, transparent) !important;
  transition: transform 170ms ease, filter 170ms ease, box-shadow 170ms ease !important;
}

body.rx-v157 #view-table .seat-ripple-plus {
  height: 23px !important;
  display: block !important;
  font-family: Arial, sans-serif !important;
  font-size: 24px !important;
  font-weight: 300 !important;
  line-height: 22px !important;
}

body.rx-v157 #view-table .seat-ripple-label {
  display: block !important;
  font-size: 8px !important;
  font-weight: 900 !important;
  line-height: 10px !important;
  letter-spacing: .13em !important;
  text-transform: uppercase !important;
}

body.rx-v157 #view-table .seat-ripple-target .open-seat-sr {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

body.rx-v157 #view-table .seat-ripple-target:hover .seat-ripple-core,
body.rx-v157 #view-table .seat-ripple-target:focus-visible .seat-ripple-core {
  filter: brightness(1.16) saturate(1.12) !important;
  transform: scale(1.09) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .32), 0 8px 22px rgba(0, 0, 0, .54), 0 0 0 4px color-mix(in srgb, var(--accent, #8a63ff) 20%, transparent), 0 0 30px color-mix(in srgb, var(--accent, #8a63ff) 58%, transparent) !important;
}

body.rx-v157 #view-table .seat-ripple-target:focus-visible {
  outline: 2px solid #fff0a8 !important;
  outline-offset: 7px !important;
}

body.rx-v157 #view-table .seat.is-seat-joining .seat-ripple-target { cursor: wait !important; }
body.rx-v157 #view-table .seat.is-seat-joining .seat-ripple-core { animation: rxSeatJoining .72s ease-in-out infinite alternate !important; }

body.rx-v157 #view-table .seat:not(.is-open-seat) {
  width: clamp(118px, 10vw, 158px) !important;
  min-height: 0 !important;
  pointer-events: none !important;
}

body.rx-v157 #view-table .seat:not(.is-open-seat) .player-card { pointer-events: none !important; }

body.rx-v157 #view-table .action-panel {
  position: relative !important;
  inset: auto !important;
  left: auto !important;
  bottom: auto !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 10px !important;
  display: grid !important;
  grid-template-columns: minmax(190px, .68fr) minmax(420px, 1.55fr) minmax(300px, 1fr) !important;
  align-items: stretch !important;
  gap: 10px !important;
  transform: none !important;
  border-radius: 16px !important;
  background: linear-gradient(145deg, rgba(7, 13, 25, .98), rgba(8, 8, 20, .98)) !important;
  border: 1px solid rgba(126, 104, 228, .18) !important;
  box-shadow: 0 15px 34px rgba(0, 0, 0, .28) !important;
  backdrop-filter: none !important;
}

body.rx-v157 #view-table .action-panel .turn-status,
body.rx-v157 #view-table .action-panel .bet-controls {
  min-width: 0 !important;
  min-height: 116px !important;
  margin: 0 !important;
  padding: 12px !important;
}

body.rx-v157 #view-table .action-panel .action-buttons {
  grid-column: auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  align-content: stretch !important;
  gap: 7px !important;
}

body.rx-v157 #view-table .action-panel .action-buttons button {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 42px !important;
  height: auto !important;
  margin: 0 !important;
  padding: 8px !important;
}

body.rx-v157 #view-table #dealBtn[hidden] { display: none !important; }

body.rx-v157 #view-table .action-panel.is-awaiting-seat {
  width: min(100%, 560px) !important;
  justify-self: center !important;
  margin-inline: auto !important;
  grid-template-columns: minmax(0, 1fr) !important;
}

body.rx-v157 #view-table .action-panel.is-awaiting-seat .bet-controls,
body.rx-v157 #view-table .action-panel.is-awaiting-seat .action-buttons { display: none !important; }

body.rx-v157 #view-table .action-panel.is-awaiting-seat .turn-status {
  min-height: 68px !important;
  place-content: center !important;
  text-align: center !important;
}

body.rx-v157 #view-table .side-console {
  grid-area: side-console !important;
  position: static !important;
  inset: auto !important;
  width: min(100%, 1320px) !important;
  min-width: 0 !important;
  margin: 0 auto !important;
  padding: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(190px, 220px)) minmax(0, 1fr) !important;
  align-items: stretch !important;
  gap: 10px !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
}

body.rx-v157 #view-table .side-console .wallet-card,
body.rx-v157 #view-table .side-console .log-card {
  min-width: 0 !important;
  min-height: 100px !important;
  margin: 0 !important;
  padding: 13px !important;
  border-radius: 14px !important;
  background: #091523 !important;
  border: 1px solid rgba(255, 255, 255, .07) !important;
  box-shadow: 0 12px 26px rgba(0, 0, 0, .2) !important;
}

body.rx-v157 #view-table .side-console .log-card { padding: 0 !important; overflow: hidden !important; }
body.rx-v157 #view-table .side-console .game-log { min-height: 58px !important; max-height: 82px !important; padding: 9px 12px !important; overflow: auto !important; }

@keyframes rxSeatRipple {
  0% { opacity: .68; transform: scale(.82); }
  70%, 100% { opacity: 0; transform: scale(1.72); }
}

@keyframes rxSeatJoining {
  from { filter: brightness(1); transform: scale(.96); }
  to { filter: brightness(1.34); transform: scale(1.08); }
}

@media (min-width: 1181px) and (min-height: 780px) {
  body.rx-v157 #view-table .poker-stage {
    width: min(100%, 1320px, calc((100dvh - 360px) * 1.7778)) !important;
  }
}

@media (max-width: 1180px) {
  body.rx-v157 #view-table .table-info-card { grid-template-columns: auto minmax(0, 1fr) !important; }
  body.rx-v157 #view-table .table-info-card .table-meta { grid-column: 1 / -1 !important; }
  body.rx-v157 #view-table .action-panel { grid-template-columns: minmax(170px, .6fr) minmax(0, 1.4fr) !important; }
  body.rx-v157 #view-table .action-panel .action-buttons { grid-column: 1 / -1 !important; grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
}

@media (max-width: 820px) {
  body.rx-v157[data-active-view="table"] main { min-height: calc(100dvh - 60px) !important; padding: 8px 0 84px !important; }
  body.rx-v157 #view-table.rx-dedicated-game-screen { padding: 0 10px 22px !important; }
  body.rx-v157 #view-table .rx-dedicated-view-nav { margin-bottom: 8px !important; }
  body.rx-v157 #view-table .table-info-card { min-height: 0 !important; padding: 10px !important; grid-template-columns: auto minmax(0, 1fr) !important; gap: 9px !important; }
  body.rx-v157 #view-table .table-info-card h2 { font-size: 16px !important; }
  body.rx-v157 #view-table .table-info-card .table-meta { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 6px !important; }
  body.rx-v157 #view-table .table-info-card .table-meta > div { min-height: 42px !important; padding: 6px 8px !important; }
  body.rx-v157 #view-table .poker-table,
  body.rx-v157 #view-table .poker-table:not(.exact-art-mode),
  body.rx-v157 #view-table .poker-table.exact-art-mode { aspect-ratio: 16 / 10.2 !important; border-radius: 15px !important; }
  body.rx-v157 #view-table .seat-ripple-target { width: 46px !important; height: 46px !important; min-width: 46px !important; min-height: 46px !important; }
  body.rx-v157 #view-table .seat-ripple-core { width: 40px !important; height: 40px !important; grid-template-rows: 18px 10px !important; }
  body.rx-v157 #view-table .seat-ripple-plus { height: 18px !important; font-size: 19px !important; line-height: 18px !important; }
  body.rx-v157 #view-table .seat-ripple-label { font-size: 7px !important; }
  body.rx-v157 #view-table .seat:not(.is-open-seat) { width: clamp(92px, 22vw, 126px) !important; }
  body.rx-v157 #view-table .action-panel,
  body.rx-v157 #view-table .action-panel.is-awaiting-seat { grid-template-columns: minmax(0, 1fr) !important; }
  body.rx-v157 #view-table .action-panel .action-buttons,
  body.rx-v157 #view-table .action-panel:not(.is-awaiting-seat) .action-buttons { grid-column: auto !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  body.rx-v157 #view-table .side-console { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  body.rx-v157 #view-table .side-console .log-card { grid-column: 1 / -1 !important; }
}

@media (max-width: 520px) {
  body.rx-v157 #view-table .table-info-card .table-tier-badge { min-height: 25px !important; padding: 0 8px !important; font-size: 8px !important; }
  body.rx-v157 #view-table .table-info-card .table-meta > div:first-child { display: none !important; }
  body.rx-v157 #view-table .table-info-card .table-meta { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  body.rx-v157 #view-table .poker-table,
  body.rx-v157 #view-table .poker-table:not(.exact-art-mode),
  body.rx-v157 #view-table .poker-table.exact-art-mode { aspect-ratio: 16 / 10.8 !important; }
  body.rx-v157 #view-table .poker-table .pot-display { min-width: 62px !important; padding: 4px 7px !important; }
  body.rx-v157 #view-table .poker-table .dealer-chip { width: 26px !important; height: 26px !important; font-size: 10px !important; }
  body.rx-v157 #view-table .side-console { grid-template-columns: minmax(0, 1fr) !important; }
  body.rx-v157 #view-table .side-console .log-card { grid-column: auto !important; }
}

@media (prefers-reduced-motion: reduce) {
  body.rx-v157 #view-table .seat-ripple-target::before,
  body.rx-v157 #view-table .seat-ripple-target::after,
  body.rx-v157 #view-table .seat.is-seat-joining .seat-ripple-core { animation: none !important; }
}
