.casino-poker-panel {
  --poker-gold: #d5a93c;
  --poker-green: #174d35;
  --poker-green-bright: #2d8a59;
  --poker-red: #8f3131;
}

.casino-game-grid {
  grid-template-rows: none;
  grid-auto-rows: minmax(142px, auto);
}

.game[data-view="map"].map-action-mode .location-panel.location-panel-casino {
  grid-template-rows: minmax(0, 1fr);
}

@media (max-width: 1400px) {
  .game[data-view="map"].map-action-mode .world-panel {
    grid-template-columns: 1fr;
    grid-template-areas: "location";
  }

  .location-panel-casino .casino-main {
    grid-template-rows: auto auto;
  }

  .location-panel-casino .casino-tab-panel:not([hidden]),
  .location-panel-casino #casinoGamesPanel,
  .location-panel-casino #casinoRobberyPanel {
    grid-template-rows: auto;
  }

  .location-panel-casino .casino-roulette-panel {
    min-height: 0;
    overflow: visible;
  }

  .game[data-view="map"].map-action-mode .location-panel.location-panel-casino {
    overflow-y: auto;
  }

  .game[data-view="map"].map-action-mode .location-panel.location-panel-casino .location-action-section.casino-panel {
    grid-template-rows: auto;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .location-panel-casino .casino-panel,
  .location-panel-casino .casino-layout {
    height: auto;
    max-height: none;
    overflow: visible;
  }
}

.casino-poker-header,
.casino-poker-title-card,
.casino-poker-lobby,
.casino-poker-stage,
.casino-poker-rules {
  position: relative;
  z-index: 1;
}

.casino-poker-title-card {
  min-height: 88px;
}

.casino-poker-panel.is-lobby {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  height: 100%;
  min-height: 0;
}

.casino-poker-lobby {
  display: grid;
  grid-template-columns: minmax(250px, 330px) minmax(0, 1fr);
  align-items: stretch;
  gap: 12px;
  height: 100%;
  min-height: 0;
}

.casino-poker-create,
.casino-poker-table-list,
.casino-poker-controls {
  border: 1px solid rgba(183, 156, 83, 0.25);
  background: rgba(3, 8, 7, 0.9);
  padding: 12px;
}

.casino-poker-create,
.casino-poker-table-list {
  height: 100%;
  min-height: 0;
}

.casino-poker-stakes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 12px 0;
}

.casino-poker-stakes button,
.casino-poker-primary,
.casino-poker-secondary,
.casino-poker-danger,
.casino-poker-allin {
  min-height: 38px;
  border: 1px solid #3c463d;
  border-radius: 4px;
  background: #151a17;
  color: #ece5d3;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.casino-poker-stakes button[data-selected="true"] {
  border-color: var(--poker-gold);
  background: #2a2517;
  color: #fff3bd;
}

.casino-poker-primary {
  border-color: #35785a;
  background: #123b29;
}

.casino-poker-secondary {
  border-color: #4a5350;
}

.casino-poker-danger {
  border-color: #743d3d;
  background: #351818;
}

.casino-poker-allin {
  border-color: #8d6c29;
  background: #493716;
  color: #fff0b2;
}

.casino-poker-stakes button:hover:not(:disabled),
.casino-poker-primary:hover:not(:disabled),
.casino-poker-secondary:hover:not(:disabled),
.casino-poker-danger:hover:not(:disabled),
.casino-poker-allin:hover:not(:disabled) {
  filter: brightness(1.2);
}

.casino-poker-stakes button:disabled,
.casino-poker-primary:disabled,
.casino-poker-secondary:disabled,
.casino-poker-danger:disabled,
.casino-poker-allin:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.casino-poker-money-field {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 5px 8px;
  margin: 10px 0;
  color: #d9d4c7;
}

.casino-poker-money-field > span {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.casino-poker-money-field input {
  width: 116px;
  min-width: 0;
  border: 1px solid #3c4842;
  border-radius: 3px;
  background: #050806;
  color: #f2ead8;
  padding: 8px;
  text-align: right;
}

.casino-poker-money-field small {
  grid-column: 1 / -1;
  color: #7f8984;
}

.casino-poker-table-list {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

.casino-poker-lobby-row {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) 90px 120px 90px auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  border: 1px solid #27352e;
  border-radius: 3px;
  background: rgba(7, 13, 10, 0.9);
  color: #dad8ce;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
}

.casino-poker-lobby-row:hover {
  border-color: #807040;
  background: #111810;
}

.casino-poker-lobby-row em {
  color: #98a39d;
  font-style: normal;
}

.casino-poker-seat-dots {
  display: flex;
  justify-content: flex-end;
  gap: 3px;
}

.casino-poker-seat-dots i {
  width: 7px;
  height: 7px;
  border: 1px solid #56625b;
  border-radius: 50%;
}

.casino-poker-seat-dots i[data-filled="true"] {
  border-color: #caa64f;
  background: #caa64f;
}

.casino-poker-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(285px, 330px);
  align-items: start;
  gap: 12px;
}

.casino-poker-table-scroll {
  min-width: 0;
  overflow-x: auto;
  border: 1px solid #2d382f;
  background: #020403;
}

.casino-poker-table {
  position: relative;
  width: 100%;
  min-width: 720px;
  aspect-ratio: 1024 / 683;
  overflow: hidden;
  isolation: isolate;
  background: #040706;
}

.casino-poker-table::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(0, 0, 0, 0.08);
  content: "";
  pointer-events: none;
}

.casino-poker-table-image {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
}

.casino-poker-dealer {
  position: absolute;
  top: 3.5%;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
  border: 1px solid rgba(222, 193, 111, 0.55);
  border-radius: 4px;
  background: rgba(2, 6, 4, 0.88);
  color: #ede4ca;
  padding: 5px 9px;
  white-space: nowrap;
}

.casino-poker-dealer-portrait {
  position: relative;
  display: grid;
  width: 36px;
  height: 36px;
  min-width: 36px;
  flex: 0 0 36px;
  place-items: center;
  border: 1px solid #b7913e;
  border-radius: 50%;
  background: #1d1810;
  color: #f6d878;
  font-weight: 800;
  overflow: hidden;
}

.casino-poker-dealer .phone-blackchat-avatar.casino-poker-dealer-portrait img {
  position: absolute;
  top: -24px;
  left: 50%;
  width: 114px;
  height: 114px;
  object-fit: contain;
  transform: translateX(-50%);
}

.casino-poker-dealer > span:last-child {
  display: grid;
}

.casino-poker-dealer small {
  color: #939b94;
  font-size: 0.65rem;
}

.casino-poker-board {
  position: absolute;
  top: 34%;
  left: 50%;
  display: flex;
  gap: 0.5%;
  transform: translateX(-50%);
}

.casino-poker-card {
  position: relative;
  display: inline-grid;
  width: 30px;
  aspect-ratio: 2 / 3;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(214, 206, 177, 0.75);
  border-radius: 3px;
  background: #15241d;
  color: #d6bd72;
  font-size: 0.75rem;
  font-weight: 800;
}

.casino-poker-card.is-board-card {
  width: clamp(42px, 5.2vw, 66px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.7);
}

.casino-poker-card.is-empty {
  border-color: rgba(188, 181, 145, 0.26);
  background: rgba(2, 10, 7, 0.48);
}

.casino-poker-card.is-hidden {
  border-color: #9e843b;
  background: #251f13;
  color: #b99d52;
}

.casino-poker-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.casino-poker-pot {
  position: absolute;
  top: 58%;
  left: 50%;
  display: grid;
  min-width: 100px;
  transform: translateX(-50%);
  border: 1px solid rgba(197, 159, 63, 0.5);
  border-radius: 3px;
  background: rgba(3, 8, 5, 0.9);
  padding: 4px 9px;
  text-align: center;
}

.casino-poker-pot span {
  color: #ad9b68;
  font-size: 0.6rem;
}

.casino-poker-pot strong {
  color: #f1d076;
}

.casino-poker-seat {
  position: absolute;
  top: var(--seat-y);
  left: var(--seat-x);
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 2px solid #6f653e;
  border-radius: 50%;
  background: rgba(4, 9, 6, 0.96);
  color: #ece5d2;
  padding: 0;
  font: inherit;
}

button.casino-poker-seat {
  cursor: pointer;
}

.casino-poker-seat.is-empty {
  border-style: dashed;
  border-color: rgba(204, 189, 135, 0.56);
  background: rgba(2, 8, 5, 0.74);
}

.casino-poker-seat.is-empty:hover:not(:disabled) {
  border-color: #f0cf72;
  background: rgba(37, 47, 27, 0.92);
}

.casino-poker-empty-seat-icon {
  color: #c9b162;
  font-size: 1.5rem;
}

.casino-poker-seat[data-turn="true"] {
  border-color: #65d88f;
  box-shadow: 0 0 0 3px rgba(71, 188, 112, 0.2), 0 0 14px rgba(71, 188, 112, 0.72);
}

.casino-poker-seat[data-status="folded"] {
  filter: grayscale(0.75);
  opacity: 0.58;
}

.casino-poker-seat[data-self="true"] {
  border-color: #e1bc59;
}

.casino-poker-seat .casino-poker-avatar,
.casino-poker-seat .phone-blackchat-avatar {
  width: 50px;
  height: 50px;
  min-width: 50px;
  border: 0;
  border-radius: 50%;
  overflow: hidden;
}

.casino-poker-seat .casino-poker-avatar img,
.casino-poker-seat .phone-blackchat-avatar img {
  position: absolute;
  top: -33px;
  left: 50%;
  width: 158px;
  height: 158px;
  object-fit: contain;
  transform: translateX(-50%);
}

.casino-poker-seat-info {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  display: grid;
  width: 112px;
  transform: translateX(-50%);
  border: 1px solid rgba(87, 99, 89, 0.8);
  border-radius: 3px;
  background: rgba(2, 6, 4, 0.94);
  padding: 3px 6px;
  text-align: center;
  line-height: 1.15;
}

.casino-poker-seat-info strong {
  overflow: hidden;
  color: #eee7d4;
  font-size: 0.69rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.casino-poker-seat-info span {
  color: #d5b85f;
  font-size: 0.66rem;
}

.casino-poker-seat-markers {
  position: absolute;
  top: -8px;
  right: -12px;
  display: flex;
  gap: 2px;
}

.casino-poker-seat-markers b {
  display: grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid #c7a13e;
  border-radius: 50%;
  background: #eee2bd;
  color: #19150e;
  font-size: 0.55rem;
}

.casino-poker-hole-cards {
  position: absolute;
  right: calc(100% - 8px);
  bottom: 32px;
  display: flex;
  gap: 2px;
}

.casino-poker-seat[data-self="true"] .casino-poker-hole-cards {
  z-index: 8;
}

.casino-poker-seat[data-self="true"] .casino-poker-hole-cards .casino-poker-card {
  cursor: zoom-in;
  transform-origin: bottom center;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.casino-poker-seat[data-self="true"] .casino-poker-hole-cards .casino-poker-card:hover {
  z-index: 2;
  transform: translateY(-5px) scale(1.8);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.85);
}

.quick-poker-button {
  border-color: rgba(218, 177, 76, 0.58);
  background:
    radial-gradient(circle at 50% 20%, rgba(218, 177, 76, 0.2), transparent 58%),
    rgba(8, 9, 9, 0.9);
  color: #e8c568;
}

.quick-poker-button:hover,
.quick-poker-button:focus-visible {
  border-color: rgba(244, 211, 119, 0.9);
  color: #ffe6a0;
}

.casino-poker-seat-action {
  position: absolute;
  bottom: calc(100% + 20px);
  left: 50%;
  min-width: 68px;
  transform: translateX(-50%);
  border-radius: 3px;
  background: rgba(4, 10, 7, 0.94);
  color: #d8d5ca;
  padding: 2px 5px;
  font-size: 0.6rem;
  text-align: center;
  white-space: nowrap;
}

.casino-poker-seat-bet {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  color: #f4d16d;
  font-size: 0.66rem;
  font-weight: 800;
  text-shadow: 0 1px 2px #000;
  white-space: nowrap;
}

.casino-poker-seat[data-seat="0"] .casino-poker-hole-cards {
  right: auto;
  left: calc(100% - 8px);
}

.casino-poker-seat[data-seat="0"] .casino-poker-seat-bet {
  top: -14px;
  left: calc(100% + 24px);
}

.casino-poker-seat[data-seat="5"] .casino-poker-seat-bet {
  top: -14px;
  right: calc(100% + 24px);
  left: auto;
  transform: translateX(50%);
}

.casino-poker-table-notice {
  position: absolute;
  top: 15%;
  bottom: auto;
  left: 50%;
  width: min(70%, 540px);
  transform: translateX(-50%);
  color: #b7b9b3;
  font-size: 0.68rem;
  text-align: center;
  text-shadow: 0 1px 2px #000;
}

.casino-poker-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.casino-poker-meta {
  grid-template-columns: 1fr;
}

.casino-poker-own-stack {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-block: 1px solid #28342d;
  padding: 10px 2px;
}

.casino-poker-own-stack span {
  color: #9da59f;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.casino-poker-own-stack strong {
  color: #e5c86e;
}

.casino-poker-last-result {
  display: grid;
  gap: 5px;
  border: 1px solid #52472b;
  background: #100f09;
  padding: 8px;
}

.casino-poker-last-result > strong {
  color: #d5b85f;
  font-size: 0.68rem;
  text-transform: uppercase;
}

.casino-poker-last-result > span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
  align-items: center;
}

.casino-poker-last-result b {
  min-width: 0;
  overflow: hidden;
  color: #ece5d2;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.casino-poker-last-result small {
  grid-column: 1;
  color: #8f9993;
  font-size: 0.62rem;
}

.casino-poker-last-result em {
  grid-column: 2;
  grid-row: 1 / span 2;
  color: #e2c366;
  font-style: normal;
  font-weight: 800;
}

.casino-poker-actions,
.casino-poker-hand-controls {
  display: grid;
  gap: 7px;
}

.casino-poker-play-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.casino-poker-turn-status {
  display: flex;
  min-height: 35px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #35453c;
  background: #08110c;
  padding: 6px 9px;
}

.casino-poker-turn-clock {
  color: #f0cc65;
  font-variant-numeric: tabular-nums;
}

.casino-poker-message {
  min-height: 18px;
  margin: 0;
}

.casino-poker-rules .casino-roulette-rule-list span {
  align-items: center;
}

.casino-poker-position-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px 10px;
  border: 1px solid rgba(var(--theme-line-strong-rgb), .14);
  border-radius: 3px;
  background: rgba(5, 7, 7, .62);
  padding: 8px 9px;
}

.casino-poker-position-legend i {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-style: normal;
  white-space: nowrap;
}

.casino-poker-position-legend i > b {
  display: grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid #c7a13e;
  border-radius: 50%;
  background: #eee2bd;
  color: #19150e;
  font-size: 0.55rem;
  line-height: 1;
}

.casino-poker-position-legend small {
  color: inherit;
  font-size: 0.64rem;
  font-weight: 900;
}

@media (max-width: 1120px) {
  .casino-poker-stage {
    grid-template-columns: 1fr;
  }

  .casino-poker-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .casino-poker-controls > .casino-roulette-board-header,
  .casino-poker-controls > .casino-poker-meta,
  .casino-poker-controls > .casino-poker-message {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1400px) and (min-width: 1101px) {
  .location-panel-casino .casino-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }

  .location-panel-casino .casino-main,
  .location-panel-casino .casino-tab-panel:not([hidden]),
  .location-panel-casino #casinoGamesPanel,
  .location-panel-casino #casinoRobberyPanel {
    height: auto;
    overflow: visible;
  }

  .location-panel-casino .casino-chat-panel {
    height: 300px;
    min-height: 250px;
    max-height: none;
  }

  .casino-poker-stage {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .casino-poker-lobby {
    grid-template-columns: 1fr;
  }

  .casino-poker-lobby-row {
    grid-template-columns: 1fr auto;
  }

  .casino-poker-lobby-row > :nth-child(3),
  .casino-poker-lobby-row > :nth-child(4) {
    font-size: 0.68rem;
  }

  .casino-poker-table {
    min-width: 650px;
  }

  .casino-poker-controls {
    display: flex;
  }

  .casino-poker-card.is-board-card {
    width: 43px;
  }
}
