/* ---------------------------------------------------------------- three card poker UI (#tcp-ui) */
/* Sits above #hud (z 10), below #screen (20), #modal (30) and #loading (100). */
#tcp-ui {
  position: fixed; inset: 0; z-index: 12; pointer-events: none;
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif; color: var(--text);
}
#tcp-ui button { pointer-events: auto; }
#tcp-ui .hidden { display: none !important; }
#tcp-ui .tcp-k { font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); }

/* ---- status strip (top-left) */
.tcp-status {
  position: absolute; top: 12px; left: 12px; pointer-events: auto;
  display: flex; flex-direction: column; gap: 6px; min-width: 200px; padding: 9px 14px;
  background: var(--panel); border: 1px solid var(--panel-border); border-radius: 12px;
  backdrop-filter: blur(8px); box-shadow: 0 10px 28px rgba(0,0,0,.45);
}
.tcp-stat { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.tcp-stat.hidden { display: none !important; }
.tcp-v { font: 700 15px Georgia, serif; color: var(--gold-2); white-space: nowrap; }
.tcp-progress {
  flex-basis: 100%; height: 4px; margin-top: 4px; border-radius: 2px; overflow: hidden;
  background: rgba(255,255,255,.1);
}
.tcp-progress i {
  display: block; height: 100%; width: 0; border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-2)); transition: width .4s ease;
}

/* ---- bottom panels (play/fold and stakes share one column) */
.tcp-bottom {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  width: min(560px, calc(100% - 24px)); display: flex; flex-direction: column; align-items: center; gap: 10px;
  pointer-events: none;
}
.tcp-panel {
  pointer-events: auto; width: 100%; padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 12px; align-items: center;
  background: var(--panel); border: 1px solid var(--panel-border); border-radius: 18px;
  backdrop-filter: blur(14px); box-shadow: 0 20px 60px rgba(0,0,0,.6);
  animation: tcpPanelIn .3s cubic-bezier(.2,1.3,.4,1);
}
.tcp-panel.hidden { display: none !important; }
@keyframes tcpPanelIn { from { opacity: 0; transform: translateY(24px); } }
.tcp-panel-title { font: 700 16px Georgia, serif; color: var(--gold-2); letter-spacing: .5px; }
.tcp-question { font-size: 14px; color: var(--muted); text-align: center; }
.tcp-question b { color: var(--gold-2); }
.tcp-buttons { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; width: 100%; }

/* generic tcp button: builds on .btn (styles.css) */
.tcp-btn { min-width: 0; padding: 10px 16px; flex-direction: row; gap: 8px; font-size: 14px; }
.tcp-btn span { white-space: nowrap; }
.tcp-btn kbd { margin-left: 0; }
.tcp-btn.big { padding: 14px 34px; font-size: 18px; }
.tcp-btn.tcp-tool { padding: 8px 14px; font-size: 13px; border-radius: 10px; }

/* play / fold buttons */
.tcp-decision .tcp-buttons .tcp-btn { flex: 1 1 180px; padding: 14px 16px; border: none; color: #fff; font-size: 15px; font-weight: 700;
  box-shadow: 0 6px 16px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.2); }
.tcp-btn.tcp-play { background: linear-gradient(180deg, #2f7d4c, #1b4f2f); }
.tcp-btn.tcp-fold { background: linear-gradient(180deg, #6b2b33, #44161c); }
.tcp-btn.tcp-play:hover:not(:disabled), .tcp-btn.tcp-fold:hover:not(:disabled) { filter: brightness(1.15); }
.tcp-btn.tcp-play:disabled { opacity: .35; filter: grayscale(.6); }

/* stakes panel: Ante / Pair Plus selectors */
.tcp-targets { display: flex; gap: 10px; width: 100%; justify-content: center; }
.tcp-target {
  flex: 1 1 0; max-width: 220px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 12px; border-radius: 12px; cursor: pointer;
  background: rgba(255,255,255,.04); border: 1px solid var(--panel-border); color: var(--text);
  transition: border-color .15s, background .15s;
}
.tcp-target.on { border-color: var(--gold-2); background: rgba(233,200,105,.12); }
.tcp-target kbd { margin-top: 2px; }
.tcp-target-amount { font: 700 22px Georgia, serif; color: var(--gold-2); text-shadow: 0 2px 10px rgba(0,0,0,.6); min-width: 70px; text-align: center; }
.tcp-chip-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.tcp-chip {
  position: relative; width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer; padding: 0;
  display: grid; place-items: center; font: 800 13px/1 Consolas, monospace; color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.85);
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--chip) 70%, white), var(--chip));
  box-shadow: 0 0 0 2px rgba(0,0,0,.6), 0 0 0 4px var(--chip), 0 0 0 6px rgba(255,255,255,.12), 0 8px 16px rgba(0,0,0,.5);
  transition: transform .12s, filter .15s;
}
.tcp-chip:hover:not(:disabled) { transform: translateY(-3px) scale(1.06); filter: brightness(1.1); }
.tcp-chip:active:not(:disabled) { transform: translateY(0) scale(.97); }
.tcp-chip:disabled { opacity: .35; cursor: default; filter: grayscale(.5); }
.tcp-chip-key {
  position: absolute; right: -4px; top: -4px; margin: 0; font-size: 9px; padding: 2px 4px; border-radius: 4px;
  background: rgba(0,0,0,.75); color: var(--muted); opacity: 1;
}
.tcp-deal { min-width: 180px; }

/* ---- hand labels placed by the 3D presenter */
.tcp-total {
  position: absolute; left: 0; top: 0; font: 700 13px Georgia, serif; padding: 2px 9px; border-radius: 12px;
  background: rgba(0,0,0,.7); color: var(--gold-2); white-space: nowrap; pointer-events: none;
}
.tcp-total.dealer { color: var(--text); border: 1px solid rgba(255,255,255,.18); }

/* ---- small screens */
@media (max-width: 760px) {
  .tcp-status { top: 8px; left: 8px; right: 8px; min-width: 0; flex-direction: row; flex-wrap: wrap; gap: 4px 14px; padding: 7px 10px; }
  .tcp-stat { gap: 4px; }
  .tcp-stat .tcp-k { font-size: 10px; }
  .tcp-progress { order: 10; }
  .tcp-v { font-size: 13px; }
  .tcp-bottom { bottom: 10px; width: calc(100% - 16px); }
  .tcp-panel { padding: 12px 12px 14px; border-radius: 16px; }
  .tcp-targets { gap: 8px; }
  .tcp-target-amount { font-size: 18px; }
  .tcp-chip { width: 46px; height: 46px; font-size: 11px; }
  .tcp-chip-row { gap: 8px; }
  .tcp-deal { min-width: 0; flex: 1 1 100%; }
  .tcp-decision .tcp-buttons .tcp-btn { min-width: 0; flex: 1 1 40%; padding: 12px 8px; font-size: 14px; }
  .tcp-btn.tcp-tool { flex: 1 1 0; padding: 8px 6px; }
}
