/* extracted from 07-management-panels-b.css during pass182; load immediately after 07-management-panels-b.css to preserve cascade order */

/* === moved from 03-panel-contract.css in pass25: music-player-hud === */
/* ============================
   MUSIC PLAYER HUD
   ============================ */
#music-player-hud {
  width: 606px;
  height: 252px;
  min-width: 0;
  min-height: 0;
}

#music-player-hud > .panel-body {
  min-width: 0;
  min-height: 0;
  position: relative;
  overflow: hidden;
  padding: 0;
  background: #2e2460;
}

#musicplayer-bg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}

#musicplayer-track-title {
  position: absolute;
  left: 32px;
  top: 22px;
  width: 542px;
  height: 102px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  box-sizing: border-box;
  color: #f4f6ff;
  font-weight: 800;
  font-size: clamp(18px, 2vw, 28px);
  line-height: 1.1;
  text-align: center;
  text-shadow: 0 2px 0 rgba(0,0,0,0.65);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#musicplayer-controls {
  position: absolute;
  left: 40px;
  right: 28px;
  bottom: 22px;
  height: 28px;
  display: grid;
  grid-template-columns: 80px 84px 84px 84px 1fr;
  gap: 8px;
  align-items: stretch;
}

#musicplayer-controls .music-btn {
  position: relative;
  z-index: 2;
  border: 0;
  background: transparent;
  color: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  border-radius: 8px;
}

#musicplayer-controls .music-btn:focus-visible,
#musicplayer-volume-wrap:focus-within {
  outline: 2px solid rgba(255,255,255,0.9);
  outline-offset: -3px;
}

#musicplayer-volume-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

#music-volume {
  width: calc(100% - 18px);
  margin: 0;
}

#music-tracklist-footer .music-btn {
  flex: 1;
  min-width: 150px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
  color: #fff;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.music-track-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  margin-bottom: 6px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
}

.music-track-name {
  flex: 1;
  min-width: 0;
}

.music-tracklist-empty {
  color: rgba(255,255,255,0.75);
}


/* moved from 03-panel-contract.css in pass26: utility/tutorial ownership */

/* ============================
   Paper Doll Panel
   ============================ */


/* ============================
   Chao Preview
   ============================ */


/* ============================
   Equip Slots
   ============================ */


/* Slot base */


/* Empty state */


/* Drag highlight */


/* Slot label (STATIC — never removed) */


/* Equipped item icon — sprite-sheet safe */


/* Optional hover polish */


/* ============================
   Inventory Grid Container
   ============================ */


/* ============================
   Global Log Panel (Expanded)
   ============================ */
#global-log-panel {
  width: 700px;
  height: 550px;
  background: rgba(13, 27, 42, 0.9);
  border: 2px solid #415a77;
  border-radius: 12px;
  color: #fff;
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 1500 !important;
}

#global-log-panel .panel-title {
  color: #ffd60a;
}

.log-panel-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  overflow: hidden;
  padding: 10px;
}

.log-tabs {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: center;
}

.log-tabs button {
  padding: 4px 8px;
  background: #415a77;
  border: none;
  border-radius: 6px;
  color: #fff;
  font-weight: bold;
  transition: background 0.2s;
}

.log-tabs button.active {
  background: #ffd60a;
  color: #000;
}

#global-log-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: rgba(0,0,0,0.4);
  border: 1px solid #415a77;
  border-radius: 6px;
  padding: 6px;
  font-size: 13px;
  line-height: 1.3em;
  font-family: monospace;
}

#clear-global-log {
  background: #415a77;
  border: 2px solid #ffd60a;
  border-radius: 6px;
  color: #fff;
  padding: 4px 10px;
  font-weight: bold;
  margin-top: 8px;
}

#clear-global-log:hover {
  background: #5b63ff;
}

/* ============================
   Mini-Game Log Panel (Mirror of Global, scroll fixed)
   ============================ */


.xp-popup {
  font-family: "Arial", sans-serif;
  font-size: 12px;
  font-weight: bold;
  text-shadow: 1px 1px 2px #000;
  pointer-events: none;
  white-space: nowrap;
  user-select: none;
  animation: xpFloat 1.6s ease-out forwards;
}

.xp-popup.swim { color: #00ff88; }
.xp-popup.fly { color: #33ccff; }
.xp-popup.run { color: #ffd600; }
.xp-popup.power { color: #ff5555; }
.xp-popup.stamina { color: #bb66ff; }

@keyframes xpFloat {
  0%   { opacity: 0; transform: translate(-50%, 20px); }
  10%  { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -40px); }
}

/* =========================================================
   Tutorial Intro Panel — STANDARDIZED (Matches Journal/Logs)
   ========================================================= */

#tutorial-intro-panel {
  z-index: 160 !important;
}

#tutorial-intro-panel.visible {
  display: flex;
}

/* Header */
#tutorial-intro-panel .panel-header {
  padding: 8px 12px;
  font-size: 18px;
  font-weight: bold;
  color: #ffd60a;
  text-align: center;
  text-shadow: 2px 2px 0 #000;
  border-bottom: 1px solid #415a77;
  flex-shrink: 0;
}


/* ============================================================
   Music Player layout repair
   - Keep the HUD at the native musicplayer.png canvas size.
   - Override the generic sidecard max-width that was squeezing it.
   - Clamp controls/volume inside the image instead of outside panel bounds.
   ============================================================ */
#music-player-hud,
#music-player-hud.panel,
#music-player-hud.panel-shell-sidecard {
  width: 606px !important;
  max-width: 606px !important;
  min-width: 606px !important;
  height: auto !important;
  max-height: none !important;
  overflow: hidden !important;
}

#music-player-hud.std-panel-controls {
  overflow: hidden !important;
}

#music-player-hud > .panel-body {
  position: relative !important;
  width: 100% !important;
  height: 200px !important;
  min-height: 200px !important;
  max-height: 200px !important;
  flex: 0 0 200px !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  background: #2e2460 !important;
}

#musicplayer-bg {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: fill !important;
  pointer-events: none !important;
}

#musicplayer-track-title {
  left: 32px !important;
  top: 22px !important;
  width: 542px !important;
  height: 102px !important;
}

#musicplayer-controls {
  left: 40px !important;
  right: 28px !important;
  bottom: 22px !important;
  height: 28px !important;
  display: grid !important;
  grid-template-columns: 80px 84px 84px 84px minmax(0, 1fr) !important;
  gap: 8px !important;
  align-items: stretch !important;
  overflow: hidden !important;
}

#musicplayer-controls .music-btn,
#musicplayer-volume-wrap {
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

#musicplayer-volume-wrap {
  overflow: hidden !important;
  padding: 0 8px !important;
}

#music-volume {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}
