/* extracted from 17-minigame-arenas-b.css during pass182; load immediately after 17-minigame-arenas-b.css to preserve cascade order */

/* extracted from styles/03-panel-contract.css — Karate MP + CheatMP arena family */
/* ============================================================
   MULTIPLAYER KARATE PANEL — FIXED
   Draggable-safe • Arena-safe • Sprite-visible
   ============================================================ */

/* ------------------------------------------------------------
   HEADER
------------------------------------------------------------ */

.karate-mp-header {
  text-align: center;
  font-size: 26px;
  font-weight: bold;
  padding: 10px 0;

  border-bottom: 2px solid #2e455f;
  color: #ffd60a;
  text-shadow: 2px 2px 0 #000;

  user-select: none;
}

/* ========================================================================== */
/* UTIL */
/* ========================================================================== */

.hidden {
  display: none !important;
}

/* ========================================================================== */
/*                        CHEAT! MULTIPLAYER ARENA (CSS)                      */
/* ========================================================================== */

#cheatmp-arena-panel {
  position: absolute !important;
  left: auto;
  top: auto;
  width: min(1630px, calc(var(--app-authored-width) - 280px));
  height: min(1030px, calc(var(--app-authored-height) - 48px));
  max-height: calc(var(--app-authored-height) - 48px);
  transform: none;
  background: #1b1f24;
  border: 3px solid #3a3f47;
  border-radius: 14px;
  box-shadow: 0 0 40px rgba(0,0,0,0.6);
  z-index: 5000;
  overflow: hidden;
}

/* ========================================================================== */
/*                               TITLE BAR                                    */
/* ========================================================================== */

.cheatmp-titlebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 10px;
  background: #14181d;
  border-bottom: 2px solid #2c3138;
}

.cheatmp-title {
  font-size: 20px;
  font-weight: bold;
}

.cheatmp-exit-btn {
  background: #922;
  border: none;
  color: #fff;
  font-size: 24px;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  cursor: pointer;
}

/* ========================================================================== */
/*                           TURN STATUS BANNER                               */
/* ========================================================================== */

#cheatmp-turn-banner {
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
  text-align: center;
  padding: 2px 0;
  font-size: 22px;
  font-weight: bold;
  background: #111;
  border-bottom: 2px solid #2c3138;
  color: #ffd966;
  text-shadow: 0 0 4px #000;
}

/* ========================================================================== */
/*                            ARENA WRAPPER                                   */
/* ========================================================================== */

.cheatmp-arena-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  padding: 5px;
  box-sizing: border-box;
}

/* ========================================================================== */
/*                         LEFT SIDE — MP CHAT                                */
/* ========================================================================== */

#mp-chat-panel.embedded {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* ========================================================================== */
/*                    CENTER — TABLE COLUMN (FIXED)                           */
/* ========================================================================== */

.cheatmp-table-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

/* ========================================================================== */
/*                           CENTER — TABLE                                   */
/* ========================================================================== */

.cheatmp-table {
  position: relative;
  top: -4%;
  width: min(520px, 45vw);
  height: min(520px, 45vw);
  min-width: 320px;
  min-height: 320px;
  background: radial-gradient(circle at center,
    #287d4b 0%, #1f5e3a 60%, #17472c 100%);
  border: 8px solid #d4b676;
  border-radius: 50%;
  pointer-events: auto;
}

/* ========================================================================== */
/*                               SEAT LAYOUT                                  */
/* ========================================================================== */

.cheatmp-seat {
  position: absolute;
  width: 420px;
  height: 420px;
  text-align: center;
  pointer-events: none;
  overflow: visible;
}

/* Seat positions */
#cheatmp-seat-1 { left: 50%; top: 92%; transform: translate(-50%, -50%); }
#cheatmp-seat-2 { left: 78%; top: 78%; transform: translate(-50%, -50%); }
#cheatmp-seat-3 { left: 92%; top: 50%; transform: translate(-50%, -50%); }
#cheatmp-seat-4 { left: 78%; top: 22%; transform: translate(-50%, -50%); }
#cheatmp-seat-5 { left: 50%; top: 8%;  transform: translate(-50%, -50%); }
#cheatmp-seat-6 { left: 22%; top: 22%; transform: translate(-50%, -50%); }
#cheatmp-seat-7 { left: 8%;  top: 50%; transform: translate(-50%, -50%); }
#cheatmp-seat-8 { left: 22%; top: 78%; transform: translate(-50%, -50%); }

/* ========================================================================== */
/*                            SEAT CONTENT                                    */
/* ========================================================================== */

.seat-chao {
  position: relative;
  width: 100%;
  height: 320px;
}

.seat-chao-scale {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%) scale(3);
  transform-origin: bottom center;
  pointer-events: none;
}

.seat-name {
  position: absolute;
  top: 110px;
  width: 100%;
  font-size: 20px;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 0 4px #000;
}

.seat-cardcount {
  position: absolute;
  top: 165px;
  width: 100%;
  font-size: 24px;
  color: #ffd966;
}

/* ========================================================================== */
/*                               CENTER PILE                                  */
/* ========================================================================== */

#cheatmp-pile {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 180px;
  height: 240px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

#cheatmp-pile .pile-card {
  position: absolute;
  width: 55px;
  height: 80px;
  background: url("../assets/cards/card_back.png");
  background-size: cover;
  border-radius: 4px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.6);
}

#cheatmp-pile-count {
  position: absolute;
  bottom: -14px;
  right: -14px;
  background: #111;
  border: 2px solid #e4cf79;
  color: #e4cf79;
  font-weight: bold;
  font-size: 24px;
  padding: 2px 6px;
  border-radius: 10px;
}

/* ========================================================================== */
/*                               RANK DIAL                                    */
/* ========================================================================== */

#cheatmp-rank-text {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 36px;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 0 6px #000;
}

/* ========================================================================== */
/*                           ACTION BAR (NOW STABLE)                           */
/* ========================================================================== */

.cheatmp-actionbar {
  position: absolute;
  left: 12px;
  bottom: 12px;
  transform: none;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 6000;
  pointer-events: auto;
}

/* Button sizing stays unchanged */
.cheatmp-btn-sort,
.cheatmp-btn-declare,
.cheatmp-btn-cheatcall {
  width: clamp(70px, 6vw, 110px);
  height: clamp(60px, 8vw, 100px);
  font-size: clamp(12px, 2vw, 20px);
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
}

.cheatmp-btn-sort {
  background: #248A3B;
  border: 2px solid #333;
  color: #fff;
}

.cheatmp-btn-declare {
  background: #3d7ae0;
  border: 2px solid #2a5cb3;
}

.cheatmp-btn-cheatcall {
  background: #d13838;
  border: 2px solid #9b2a2a;
}

.cheatmp-call-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.cheatmp-call-timer {
  font-size: 40px;
  font-weight: bold;
  color: #ffd966;
}

/* ========================================================================== */
/*                           RIGHT SIDE — TURN LOG                             */
/* ========================================================================== */

.cheatmp-side.cheatmp-log {
  width: 18%;
  min-width: 200px;
  height: 100%;
  background: #14181d;
  border: 2px solid #2c3138;
  border-radius: 12px;
  padding: 6px;
  display: flex;
  flex-direction: column;
}

.cheatmp-log-title {
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 4px;
  text-align: center;
}

#cheatmp-turn-log {
  flex: 1;
  font-size: 32px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ========================================================================== */
/*                               HAND BAR                                     */
/* ========================================================================== */

