/* Poker table felt, player plates, cards */

.functional-8001 #poker-table {
  width: min(780px, calc(100% - 2rem));
  height: min(400px, 100%);
  min-width: 280px;
  min-height: 220px;
  margin: 0 auto;
  background:
    radial-gradient(ellipse at center, rgba(34, 170, 105, 0.16) 0%, rgba(6, 91, 62, 0.9) 42%, rgba(5, 55, 43, 0.98) 100%),
    linear-gradient(135deg, #0a5f42, #073527);
  border: 10px solid #171a21;
  border-radius: 200px;
  position: relative;
  overflow: visible;
  box-shadow:
    0 0 0 5px var(--warn),
    0 0 0 9px #2b1d10,
    inset 0 0 70px rgba(0, 0, 0, 0.65),
    var(--shadow-lg);
}

.functional-8001 #poker-table::before {
  content: "";
  position: absolute;
  inset: 24px 36px;
  border-radius: 180px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  z-index: 0;
}

.functional-8001 #poker-table::after {
  content: "";
  position: absolute;
  inset: 60px 140px;
  border-radius: 130px;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.08), transparent 68%);
  pointer-events: none;
  z-index: 0;
}

.functional-8001 .board-area {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: 100%;
  z-index: 2;
}

.functional-8001 .pot {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(4, 8, 12, 0.82);
  border: 1px solid var(--border-strong);
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--warn);
  margin-bottom: 0.65rem;
  box-shadow: var(--shadow-sm);
}

.functional-8001 .cards {
  display: flex;
  gap: 0.45rem;
  justify-content: center;
  margin-bottom: 0.25rem;
  min-height: 36px;
}

.functional-8001 .card,
.functional-8001 .mini-card {
  color: #fff;
  font-weight: bold;
  text-align: center;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.functional-8001 .card {
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  font-size: 1.75rem;
  width: 52px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.functional-8001 .mini-card {
  padding: 0.25rem 0.35rem;
  border-radius: 5px;
  font-size: 1rem;
  width: 36px;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.functional-8001 .spade, .functional-8001 .card.spade, .functional-8001 .mini-card.spade { background: #000 !important; }
.functional-8001 .heart, .functional-8001 .card.heart, .functional-8001 .mini-card.heart { background: #d32f2f !important; }
.functional-8001 .club, .functional-8001 .card.club, .functional-8001 .mini-card.club { background: #2e7d32 !important; }
.functional-8001 .diamond, .functional-8001 .card.diamond, .functional-8001 .mini-card.diamond { background: #1565c0 !important; }

.functional-8001 .card-back {
  min-width: 28px;
  height: 24px;
  background: repeating-linear-gradient(45deg, #b22222, #b22222 4px, #8b0000 4px, #8b0000 8px);
  border: 2px solid #fff;
  border-radius: 4px;
  display: inline-block;
}

.functional-8001 .player-box {
  position: absolute;
  background: linear-gradient(180deg, rgba(46, 54, 66, 0.96), rgba(10, 13, 20, 0.98));
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  padding: 0.4rem 0.5rem;
  text-align: center;
  width: 130px;
  min-height: 90px;
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%);
  z-index: 10;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.functional-8001 .player-box.action-flash-check { border-color: #27aee4; box-shadow: 0 0 10px #27aee4; }
.functional-8001 .player-box.action-flash-call { border-color: #24a328; box-shadow: 0 0 10px #24a328; }
.functional-8001 .player-box.action-flash-raise { border-color: #331abe; box-shadow: 0 0 10px #331abe; }
.functional-8001 .player-box.action-flash-fold { border-color: #333; box-shadow: 0 0 8px #333; }
.functional-8001 .player-box.action-flash-all-in { border-color: #f7b933; box-shadow: 0 0 12px #f7b933; }

.functional-8001 .player-position,
.functional-8001 .position-badge {
  position: absolute;
  top: -12px;
  right: -12px;
  background: linear-gradient(135deg, var(--warn), #b8860b);
  color: #000;
  font-weight: 900;
  font-size: 0.68rem;
  border: 2px solid #fff;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 20;
}

.functional-8001 .equity-badge {
  position: absolute;
  top: -28px; /* 6px Abstand + ~22px Badge-Hoehe (Padding 2*2 + Border 1*2 + Zeile 16px @ 0.8rem*1.2) */
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a2e;
  color: #4CAF50;
  border: 1px solid #4CAF50;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: bold;
  line-height: 1.2;
  z-index: 20;
  box-shadow: 1px 1px 3px rgba(0,0,0,0.5);
  white-space: nowrap;
}

.functional-8001 .equity-badge--dual {
  top: -41px; /* 6px Abstand + ~35px Badge-Hoehe (Padding 2*2 + Border 1*2 + 2 Zeilen a 14.4px @ 0.75rem*1.2) */
  font-size: 0.75rem;
}

.functional-8001 .badge-SB {
  background: linear-gradient(135deg, #6a0dad, #301934) !important;
  color: #fff !important;
}

.functional-8001 .badge-BTN {
  background: linear-gradient(135deg, #a9a9a9, #555) !important;
  color: #fff !important;
}

.functional-8001 .player-name {
  font-size: 0.72rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.functional-8001 .player-stack {
  font-weight: bold;
  color: var(--ok-glow);
  margin: 0.15rem 0;
  font-size: 0.75rem;
}

.functional-8001 .player-action {
  font-size: 0.68rem;
  color: var(--warn);
  min-height: 12px;
  font-weight: bold;
}

.functional-8001 .player-cards {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  margin-top: 0.25rem;
}

.functional-8001 .replayer-hud {
  display: flex;
  justify-content: center;
  gap: 2px;
  margin: 0.2rem 0;
  min-height: 20px;
}

.functional-8001 .replayer-hud-badge {
  min-width: 20px;
  min-height: 18px;
  padding: 2px;
  border-radius: 4px;
  color: #050505;
  font-size: 0.62rem;
  font-weight: 900;
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: help;
}

.functional-8001 .replayer-hud-badge[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  min-width: 160px;
  max-width: 260px;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(8, 10, 16, 0.96);
  color: #fff;
  border: 1px solid rgba(0, 255, 255, 0.55);
  box-shadow: 0 8px 18px rgba(0,0,0,0.65);
  font-size: 0.78rem;
  line-height: 1.4;
  white-space: pre-line;
  pointer-events: none;
  z-index: 9999;
}

.functional-8001 .replayer-hud-empty {
  color: var(--muted);
  font-size: 0.65rem;
}

.functional-8001 .seat-0 { top: 108%; left: 50%; }
.functional-8001 .seat-1 { top: 96%; left: 15%; }
.functional-8001 .seat-2 { top: 50%; left: -8%; }
.functional-8001 .seat-3 { top: 4%; left: 4%; }
.functional-8001 .seat-4 { top: -8%; left: 33%; }
.functional-8001 .seat-5 { top: -8%; left: 67%; }
.functional-8001 .seat-6 { top: 4%; left: 96%; }
.functional-8001 .seat-7 { top: 50%; left: 108%; }
.functional-8001 .seat-8 { top: 96%; left: 85%; }

.functional-8001 .card-deal {
  animation: card-deal-in 0.28s ease-out;
}

@keyframes card-deal-in {
  from { opacity: 0; transform: translateY(-8px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

#central-odds {
  color: var(--link);
  font-size: 0.95rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

@media (max-width: 900px) {
  .functional-8001 #poker-table {
    border-width: 6px;
    border-radius: 110px;
    min-width: 240px;
    min-height: 160px;
  }

  .functional-8001 .card {
    width: 30px;
    height: 44px;
    font-size: 1rem;
  }

  .functional-8001 .mini-card {
    width: 22px;
    height: 30px;
    font-size: 0.7rem;
  }

  .functional-8001 .player-box {
    width: 78px;
    min-height: 54px;
    border-radius: 12px;
  }
}
