/* Hold'em Bonus (#hb-ui) and Ultimate Texas Hold'em (#ult-ui). Same layout as threecard.css. */
/* ---------------------------------------------------------------- three card poker UI (#hb-ui) */
/* Sits above #hud (z 10), below #screen (20), #modal (30) and #loading (100). */
#hb-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);
}
#hb-ui button { pointer-events: auto; }
#hb-ui .hidden { display: none !important; }
#hb-ui .hb-k { font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); }

/* ---- status strip (top-left) */
.hb-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);
}
.hb-stat { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.hb-stat.hidden { display: none !important; }
.hb-v { font: 700 15px Georgia, serif; color: var(--gold-2); white-space: nowrap; }
.hb-progress {
  flex-basis: 100%; height: 4px; margin-top: 4px; border-radius: 2px; overflow: hidden;
  background: rgba(255,255,255,.1);
}
.hb-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) */
.hb-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;
}
.hb-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: hbPanelIn .3s cubic-bezier(.2,1.3,.4,1);
}
.hb-panel.hidden { display: none !important; }
@keyframes hbPanelIn { from { opacity: 0; transform: translateY(24px); } }
.hb-panel-title { font: 700 16px Georgia, serif; color: var(--gold-2); letter-spacing: .5px; }
.hb-question { font-size: 14px; color: var(--muted); text-align: center; }
.hb-question b { color: var(--gold-2); }
.hb-buttons { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; width: 100%; }

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

/* play / fold buttons */
.hb-decision .hb-buttons .hb-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); }
.hb-btn.hb-play { background: linear-gradient(180deg, #2f7d4c, #1b4f2f); }
.hb-btn.hb-fold { background: linear-gradient(180deg, #6b2b33, #44161c); }
.hb-btn.hb-play:hover:not(:disabled), .hb-btn.hb-fold:hover:not(:disabled) { filter: brightness(1.15); }
.hb-btn.hb-play:disabled { opacity: .35; filter: grayscale(.6); }

/* stakes panel: Ante / Pair Plus selectors */
.hb-targets { display: flex; gap: 10px; width: 100%; justify-content: center; }
.hb-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;
}
.hb-target.on { border-color: var(--gold-2); background: rgba(233,200,105,.12); }
.hb-target kbd { margin-top: 2px; }
.hb-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; }
.hb-chip-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.hb-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;
}
.hb-chip:hover:not(:disabled) { transform: translateY(-3px) scale(1.06); filter: brightness(1.1); }
.hb-chip:active:not(:disabled) { transform: translateY(0) scale(.97); }
.hb-chip:disabled { opacity: .35; cursor: default; filter: grayscale(.5); }
.hb-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;
}
.hb-deal { min-width: 180px; }

/* ---- hand labels placed by the 3D presenter */
.hb-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;
}
.hb-total.dealer { color: var(--text); border: 1px solid rgba(255,255,255,.18); }

/* ---- small screens */
@media (max-width: 760px) {
  .hb-status { top: 8px; left: 8px; right: 8px; min-width: 0; flex-direction: row; flex-wrap: wrap; gap: 4px 14px; padding: 7px 10px; }
  .hb-stat { gap: 4px; }
  .hb-stat .hb-k { font-size: 10px; }
  .hb-progress { order: 10; }
  .hb-v { font-size: 13px; }
  .hb-bottom { bottom: 10px; width: calc(100% - 16px); }
  .hb-panel { padding: 12px 12px 14px; border-radius: 16px; }
  .hb-targets { gap: 8px; }
  .hb-target-amount { font-size: 18px; }
  .hb-chip { width: 46px; height: 46px; font-size: 11px; }
  .hb-chip-row { gap: 8px; }
  .hb-deal { min-width: 0; flex: 1 1 100%; }
  .hb-decision .hb-buttons .hb-btn { min-width: 0; flex: 1 1 40%; padding: 12px 8px; font-size: 14px; }
  .hb-btn.hb-tool { flex: 1 1 0; padding: 8px 6px; }
}
/* ---------------------------------------------------------------- three card poker UI (#ult-ui) */
/* Sits above #hud (z 10), below #screen (20), #modal (30) and #loading (100). */
#ult-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);
}
#ult-ui button { pointer-events: auto; }
#ult-ui .hidden { display: none !important; }
#ult-ui .ult-k { font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); }

/* ---- status strip (top-left) */
.ult-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);
}
.ult-stat { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.ult-stat.hidden { display: none !important; }
.ult-v { font: 700 15px Georgia, serif; color: var(--gold-2); white-space: nowrap; }
.ult-progress {
  flex-basis: 100%; height: 4px; margin-top: 4px; border-radius: 2px; overflow: hidden;
  background: rgba(255,255,255,.1);
}
.ult-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) */
.ult-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;
}
.ult-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: ultPanelIn .3s cubic-bezier(.2,1.3,.4,1);
}
.ult-panel.hidden { display: none !important; }
@keyframes ultPanelIn { from { opacity: 0; transform: translateY(24px); } }
.ult-panel-title { font: 700 16px Georgia, serif; color: var(--gold-2); letter-spacing: .5px; }
.ult-question { font-size: 14px; color: var(--muted); text-align: center; }
.ult-question b { color: var(--gold-2); }
.ult-buttons { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; width: 100%; }

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

/* play / fold buttons */
.ult-decision .ult-buttons .ult-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); }
.ult-btn.ult-play { background: linear-gradient(180deg, #2f7d4c, #1b4f2f); }
.ult-btn.ult-fold { background: linear-gradient(180deg, #6b2b33, #44161c); }
.ult-btn.ult-play:hover:not(:disabled), .ult-btn.ult-fold:hover:not(:disabled) { filter: brightness(1.15); }
.ult-btn.ult-play:disabled { opacity: .35; filter: grayscale(.6); }

/* stakes panel: Ante / Pair Plus selectors */
.ult-targets { display: flex; gap: 10px; width: 100%; justify-content: center; }
.ult-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;
}
.ult-target.on { border-color: var(--gold-2); background: rgba(233,200,105,.12); }
.ult-target kbd { margin-top: 2px; }
.ult-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; }
.ult-chip-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.ult-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;
}
.ult-chip:hover:not(:disabled) { transform: translateY(-3px) scale(1.06); filter: brightness(1.1); }
.ult-chip:active:not(:disabled) { transform: translateY(0) scale(.97); }
.ult-chip:disabled { opacity: .35; cursor: default; filter: grayscale(.5); }
.ult-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;
}
.ult-deal { min-width: 180px; }

/* ---- hand labels placed by the 3D presenter */
.ult-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;
}
.ult-total.dealer { color: var(--text); border: 1px solid rgba(255,255,255,.18); }

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

/* ultimate: five-button decision row */
.ult-decision .ult-buttons .ult-btn { flex: 1 1 120px; }
.ult-decision .ult-buttons .ult-btn.hidden { display: none !important; }
.ult-btn.ult-tool:disabled { opacity: .35; }
