/* Design overrides for the built-in table games. Owned by one work session at a time (qa-tables, 2026-11-18).
   Every rule is scoped to html[data-game="<id>"], set by tables.js for: blackjack, multiplayer-blackjack, baccarat,
   caribbean-poker, casino-holdem, video-poker, sic-bo, horse-racing, european-roulette, american-roulette,
   multiplayer-roulette. The games are compiled vendor bundles, so this only restyles what they draw.
   Palette and fonts come from design v2: lime rgb(198,242,78) on dark green rgb(10,18,14). */

/* ---------- card tables: Blackjack, Multiplayer Blackjack, Baccarat, Caribbean Poker, Casino Hold'em ---------- */

/* the maroon backdrop around the table becomes the site's dark green with a soft light above the felt */
html[data-game] .card-game-container {
  background:
    radial-gradient(90% 70% at 50% 28%, rgba(28, 92, 62, .38) 0%, rgba(28, 92, 62, 0) 62%),
    radial-gradient(140% 100% at 50% 0%, rgb(14, 30, 22) 0%, rgb(10, 18, 14) 70%) !important;
}

/* the table picture: same layout, recoloured to emerald felt and a graphite rail (tables.js swaps it where
   `content` on images is not supported) */
html[data-game] .card-game-table > img:first-child {
  content: url('/design/spa/tables/felt-311e134d.jpg');
}

/* round action buttons (Deal, Hit, Stand, Double, Split, Call, Fold, Rebet, New bet): copper coins become
   silver-graphite, the playable ones get a lime glow */
html[data-game] .card-game-table .btns-panel .sprite img {
  filter: grayscale(1) brightness(1.08) contrast(1.08);
}
html[data-game] .card-game-table .btns-panel .button:not(.disabled) .sprite {
  filter: drop-shadow(0 0 7px rgba(198, 242, 78, .45));
  transition: filter .15s ease, transform .15s ease;
}
html[data-game] .card-game-table .btns-panel .button:not(.disabled):hover .sprite {
  filter: drop-shadow(0 0 11px rgba(198, 242, 78, .75));
  transform: translateY(-1px);
}
html[data-game] .card-game-table .btns-panel .btn-title {
  font-family: var(--font-body, 'Geist', system-ui, sans-serif) !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  line-height: 1.05;
  color: rgba(240, 240, 230, .5) !important;
}
html[data-game] .card-game-table .btns-panel .button:not(.disabled) .btn-title {
  color: rgb(198, 242, 78) !important;
}

/* the Caribbean Poker and Casino Hold'em logos are dark green lettering made for the old bright felt; lift them */
html[data-game="caribbean-poker"] .card-game-table img.logo,
html[data-game="casino-holdem"] .card-game-table img.logo {
  filter: brightness(3.4) saturate(.55);
}

/* bet spots: the grey Impact captions become quiet lime lettering on the felt */
html[data-game] .card-game-table .bet-container .label {
  font-family: var(--font-display, 'Bricolage Grotesque', sans-serif) !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: rgba(198, 242, 78, .55) !important;
}

/* paytable plaque text */
html[data-game] .card-game-table .paytable-min,
html[data-game] .card-game-table .paytable-max {
  font-family: var(--font-body, 'Geist', system-ui, sans-serif) !important;
  font-weight: 600;
  color: rgb(220, 246, 150) !important;
}

/* result plaque ("You win", "You lose", "Push"): the wooden board with orange Impact letters becomes a dark
   glass card in the site's type; lime glow for a win, coral for a loss, amber for a push */
html[data-game] .card-game-container .modal-wrap .modal {
  background: linear-gradient(180deg, rgba(27, 40, 32, .96), rgba(12, 20, 16, .96)) !important;
  border: 3px solid rgba(198, 242, 78, .35);
  border-radius: 40px !important;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
html[data-game] .card-game-container .modal-wrap .modal.glow-win {
  border-color: rgba(198, 242, 78, .8);
  box-shadow: 0 0 90px 0 rgba(198, 242, 78, .45) !important;
}
html[data-game] .card-game-container .modal-wrap .modal.glow-lose {
  border-color: rgba(255, 123, 92, .55);
  box-shadow: 0 0 80px 0 rgba(255, 123, 92, .28) !important;
}
html[data-game] .card-game-container .modal-wrap .modal.glow-push {
  border-color: rgba(245, 184, 65, .7);
  box-shadow: 0 0 80px 0 rgba(245, 184, 65, .3) !important;
}
html[data-game] .card-game-container .modal-wrap .modal h5,
html[data-game] .card-game-container .modal-wrap .modal h6,
html[data-game] .card-game-container .modal-wrap .modal p {
  font-family: var(--font-display, 'Bricolage Grotesque', sans-serif) !important;
  font-weight: 800 !important;
  letter-spacing: -.01em;
  color: rgb(240, 240, 230) !important;
  text-shadow: none !important;
}
html[data-game] .card-game-container .modal-wrap .modal.glow-win h5,
html[data-game] .card-game-container .modal-wrap .modal.glow-win h6,
html[data-game] .card-game-container .modal-wrap .modal.glow-win p {
  color: rgb(198, 242, 78) !important;
}
html[data-game] .card-game-container .modal-wrap .modal.glow-lose h5,
html[data-game] .card-game-container .modal-wrap .modal.glow-lose h6,
html[data-game] .card-game-container .modal-wrap .modal.glow-lose p {
  color: rgb(255, 160, 136) !important;
}
html[data-game] .card-game-container .modal-wrap .modal.glow-push h5,
html[data-game] .card-game-container .modal-wrap .modal.glow-push h6,
html[data-game] .card-game-container .modal-wrap .modal.glow-push p {
  color: rgb(245, 184, 65) !important;
}
html[data-game] .card-game-container .modal-wrap .modal button {
  font-family: var(--font-body, 'Geist', system-ui, sans-serif) !important;
  font-weight: 700;
  background: rgb(198, 242, 78) !important;
  color: rgb(10, 18, 14) !important;
  border-radius: 999px !important;
}
html[data-game] .card-game-container .modal-wrap .modal button:hover {
  background: rgb(216, 247, 134) !important;
}

/* ---------- Sic Bo:the board was lime text on lime fields; now dark fields with lime lines and text ---------- */

html[data-game="sic-bo"] .game-sic-bo .game-board .board-row-1 > .d-flex > .d-flex,
html[data-game="sic-bo"] .game-sic-bo .game-board .board-row-2,
html[data-game="sic-bo"] .game-sic-bo .game-board .board-row-3,
html[data-game="sic-bo"] .game-sic-bo .game-board .board-row-4 {
  background-color: rgba(18, 28, 22, .92) !important;
  border-color: rgba(198, 242, 78, .28) !important;
}
html[data-game="sic-bo"] .game-sic-bo .game-board .btn-big,
html[data-game="sic-bo"] .game-sic-bo .game-board .btn-total,
html[data-game="sic-bo"] .game-sic-bo .game-board .btn-single {
  background-color: rgba(27, 40, 32, .95) !important;
  border-color: rgba(198, 242, 78, .28) !important;
}
html[data-game="sic-bo"] .game-sic-bo .game-board .btn {
  transition: background-color .12s ease, box-shadow .12s ease;
}
html[data-game="sic-bo"] .game-sic-bo .game-board .btn:hover {
  background-color: rgba(40, 58, 22, .95) !important;
  box-shadow: inset 0 0 0 1px rgba(198, 242, 78, .55);
}
html[data-game="sic-bo"] .game-sic-bo .game-board .text-h4 {
  font-family: var(--font-display, 'Bricolage Grotesque', sans-serif) !important;
  font-weight: 700;
}
html[data-game="sic-bo"] .game-sic-bo .game-board .caption {
  color: rgba(220, 246, 150, .8) !important;
}
html[data-game="sic-bo"] .game-sic-bo .game-board .btn-mid {
  background-color: rgba(27, 40, 32, .95) !important;
  border: 1px solid rgba(198, 242, 78, .28) !important;
}

/* ---------- Video Poker: paytable row above the cards (built by tables.js from the game's config) ---------- */

html[data-game="video-poker"] .game-video-poker > .tbl-vp-paytable {
  order: -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  max-width: 820px;
  margin: 4px auto 0;
  padding: 0 12px;
  font-family: var(--font-body, 'Geist', system-ui, sans-serif);
}
html[data-game="video-poker"] .tbl-vp-paytable .tbl-vp-row {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(240, 240, 230, .1);
  background: rgba(18, 28, 22, .85);
  color: rgb(170, 182, 170);
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
html[data-game="video-poker"] .tbl-vp-paytable .tbl-vp-row b {
  font-family: var(--font-mono, 'Geist Mono', ui-monospace, monospace);
  font-weight: 600;
  color: rgb(198, 242, 78);
}
html[data-game="video-poker"] .tbl-vp-paytable .tbl-vp-row.is-hit {
  background: rgb(198, 242, 78);
  border-color: rgb(198, 242, 78);
  color: rgb(10, 18, 14);
}
html[data-game="video-poker"] .tbl-vp-paytable .tbl-vp-row.is-hit b {
  color: rgb(10, 18, 14);
}
/* the result badge in the site's colours instead of the theme's error red */
html[data-game="video-poker"] .game-video-poker .hand-result {
  background: rgb(198, 242, 78) !important;
  color: rgb(10, 18, 14) !important;
  font-family: var(--font-display, 'Bricolage Grotesque', sans-serif);
  font-weight: 800;
  letter-spacing: .04em;
  border-radius: 999px !important;
}
@media (max-height: 520px) {
  html[data-game="video-poker"] .tbl-vp-paytable .tbl-vp-row { padding: 3px 8px; font-size: 11px; }
}

/* ---------- "rotate your device" screen of the landscape-only card tables (shown by the game in portrait) ---------- */

html[data-game] .card-game-container .portrait-warn {
  flex-direction: column;
  gap: 22px;
  padding: 0 32px;
  background:
    radial-gradient(80% 50% at 50% 42%, rgba(28, 92, 62, .45) 0%, rgba(28, 92, 62, 0) 70%),
    rgb(10, 18, 14) !important;
  color: rgb(240, 240, 230);
  font-family: var(--font-display, 'Bricolage Grotesque', sans-serif) !important;
  font-weight: 700;
  font-size: 21px !important;
  line-height: 1.3;
}
html[data-game] .card-game-container .portrait-warn::before {
  content: '';
  width: 76px;
  height: 76px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 76 76' fill='none' stroke='%23c6f24e' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='26' y='10' width='24' height='42' rx='5'/%3E%3Cpath d='M35 46h6'/%3E%3Cpath d='M12 50a26 26 0 0 0 22 18'/%3E%3Cpath d='M29 63l5 5-6 3'/%3E%3C/svg%3E") center / contain no-repeat;
  animation: tbl-turn 2.6s ease-in-out infinite;
}
@keyframes tbl-turn {
  0%, 25% { transform: rotate(0deg); }
  55%, 85% { transform: rotate(-90deg); }
  100% { transform: rotate(0deg); }
}
@media (prefers-reduced-motion: reduce) {
  html[data-game] .card-game-container .portrait-warn::before { animation: none; }
}

/* ---------- Blackjack rules under the logo (tables.js writes them, translated; since 2026-11-18: 6:5, H17) ---------- */

html[data-game="blackjack"] .card-game-table .tbl-bj-rules {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: .32em;
  pointer-events: none;
  text-align: center;
  line-height: 1.1;
  white-space: nowrap;
}
html[data-game="blackjack"] .tbl-bj-rules .l1 {
  font-family: var(--font-display, 'Bricolage Grotesque', sans-serif);
  font-weight: 800;
  font-size: 1.12em;
  letter-spacing: .01em;
  color: rgb(198, 242, 78);
  text-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}
html[data-game="blackjack"] .tbl-bj-rules .l2 {
  font-family: var(--font-body, 'Geist', system-ui, sans-serif);
  font-weight: 600;
  font-size: .9em;
  padding: .28em .9em;
  border-radius: 999px;
  border: .06em solid rgba(198, 242, 78, .45);
  background: rgba(10, 18, 14, .5);
  color: rgba(240, 240, 230, .92);
}
html[data-game="blackjack"] .tbl-bj-rules .l3 {
  font-family: var(--font-body, 'Geist', system-ui, sans-serif);
  font-weight: 600;
  font-size: .82em;
  color: rgba(220, 246, 150, .78);
}

/* ---------- dialogs of the card tables (Payout rules, insurance, info): black with gold Impact -> site style ---------- */

html[data-game] .v-overlay .modal {
  background: linear-gradient(180deg, rgba(27, 40, 32, .97), rgba(12, 20, 16, .97)) !important;
  border-color: rgba(198, 242, 78, .45) !important;
  box-shadow: 0 0 40px -8px rgba(198, 242, 78, .35) !important;
  border-radius: 24px !important;
}
html[data-game] .v-overlay .modal h5,
html[data-game] .v-overlay .modal h6 {
  font-family: var(--font-display, 'Bricolage Grotesque', sans-serif) !important;
  font-weight: 800 !important;
  color: rgb(198, 242, 78) !important;
  text-shadow: none !important;
}
html[data-game] .v-overlay .modal th {
  font-family: var(--font-body, 'Geist', system-ui, sans-serif) !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: rgb(170, 182, 170) !important;
}
html[data-game] .v-overlay .modal td {
  font-family: var(--font-body, 'Geist', system-ui, sans-serif) !important;
  color: rgb(240, 240, 230);
}
html[data-game] .v-overlay .modal .paytable td:last-child {
  font-family: var(--font-mono, 'Geist Mono', ui-monospace, monospace) !important;
  color: rgb(220, 246, 150) !important;
}
