/* Unified footer player (player.js). Fixed bottom bar + queue
   panel. mxp- classes are player-only so theme CSS never has to
   know about the internals. */
.mx-player {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 900;
  background: #101623; color: #e8eefc; border-top: 2px solid #2a4a7f;
  box-shadow: 0 -4px 18px rgba(0, 0, 0, .45);
  padding: 6px 10px;
  /* v0.215.0: base.css sets display:flex (row) on .mx-player for
     the old bar — with the expanded deck as a second child, row
     flex laid the deck and the bar row SIDE BY SIDE (~719px of
     content on a 360px phone; the bar's buttons slid off-screen
     whenever the deck opened). The deck stacks ABOVE the row. */
  display: flex; flex-direction: column;
}
/* Expanded on a short screen (landscape phones): never let the
   fixed bar grow past the viewport and push its top off-screen. */
.mx-player:has(.mxp-xl:not([hidden])) {
  max-height: 94dvh; overflow-y: auto;
}
.mx-player[hidden] { display: none; }
.mxp-row {
  display: flex; align-items: center; gap: 10px; max-width: 1200px;
  margin: 0 auto; width: 100%; box-sizing: border-box;
}
.mxp-art { width: 44px; height: 44px; object-fit: cover; border-radius: 4px; }
.mxp-meta { min-width: 0; flex: 0 1 220px; }
.mxp-title {
  font-weight: 600; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis;
}
.mxp-artist {
  font-size: 12px; color: #9db4dd; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.mxp-btn {
  background: #1c2a44; color: #e8eefc; border: 1px solid #33507f;
  border-radius: 6px; min-width: 36px; height: 36px; cursor: pointer;
  font-size: 15px; line-height: 1;
}
.mxp-btn:hover { background: #27406a; }
.mxp-btn.on { color: #ff6b9d; border-color: #ff6b9d; }
.mxp-seekwrap { display: flex; align-items: center; gap: 6px; flex: 1 1 auto; }
.mxp-seekwrap input[type="range"] { flex: 1 1 auto; }
.mxp-time { font-size: 12px; color: #9db4dd; min-width: 34px; text-align: center; }
.mxp-vol { width: 84px; }
@media (max-width: 720px) {
  .mxp-vol, .mxp-art { display: none; }
  /* v0.152.0: the one-row bar's fixed pieces (7 buttons, time
     labels, meta) total ~617px of min-content and cannot shrink
     — on phone widths the right end (duration, expand, close)
     slid off-screen. Two rows instead: meta + every button on
     row one, the seek bar full-width on its own row. player.js
     pads the body from the bar's real height, so the taller bar
     is accounted for automatically. */
  .mx-player { padding: 6px 8px; }
  .mxp-row { flex-wrap: wrap; gap: 6px; }
  .mxp-meta { flex: 1 1 48px; }
  .mxp-btn { min-width: 32px; height: 34px; box-sizing: border-box; }
  .mxp-seekwrap { order: 5; flex: 1 1 100%; min-width: 0; }
  .mxp-seekwrap input[type="range"] { min-width: 0; }
}
.mx-queue-panel {
  position: fixed; right: 10px; bottom: 64px; z-index: 901;
  width: min(380px, 92vw); max-height: 55vh; overflow: auto;
  background: #131c2e; color: #e8eefc; border: 1px solid #33507f;
  border-radius: 10px; box-shadow: 0 8px 30px rgba(0, 0, 0, .5);
  padding: 10px;
}
.mx-queue-panel[hidden] { display: none; }
.mxp-qhead {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 6px;
}
.mxp-queue-list { list-style: none; margin: 0; padding: 0; }
.mxp-qitem {
  display: flex; align-items: center; gap: 6px; padding: 4px 2px;
  border-bottom: 1px solid #22345a;
}
.mxp-qitem.active { background: #1d2f52; }
.mxp-qmain {
  flex: 1 1 auto; text-align: left; background: none; border: none;
  color: inherit; cursor: pointer; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; font-size: 14px; padding: 4px;
}
.mxp-qrm {
  background: none; border: none; color: #9db4dd; cursor: pointer;
  font-size: 12px;
}
.mxp-qlinks { margin-top: 8px; font-size: 13px; }
.mxp-qlinks a { color: #7db3ff; }
.mxp-picker {
  position: absolute; z-index: 950; background: #131c2e; color: #e8eefc;
  border: 1px solid #33507f; border-radius: 8px; padding: 6px;
  min-width: 180px; box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
  display: flex; flex-direction: column;
}
.mxp-picker button {
  background: none; border: none; color: inherit; text-align: left;
  padding: 6px 8px; cursor: pointer; font-size: 14px;
}
.mxp-picker button:hover { background: #1d2f52; }
.mxp-picker-empty { padding: 6px 8px; color: #9db4dd; font-size: 13px; }
.mx-toast {
  position: fixed; left: 50%; bottom: 70px; transform: translateX(-50%);
  z-index: 960; background: #1d2f52; color: #e8eefc; padding: 8px 14px;
  border-radius: 8px; border: 1px solid #33507f; font-size: 14px;
}
.mx-toast[hidden] { display: none; }
/* Track-row action buttons (shared partial) */
.mx-track-actions { display: inline-flex; gap: 4px; margin: 4px 0; flex-wrap: wrap; }
.mx-track-actions button, .mx-track-actions a.mx-tbtn {
  background: #1c2a44; color: #e8eefc; border: 1px solid #33507f;
  border-radius: 6px; padding: 3px 9px; font-size: 13px; cursor: pointer;
  text-decoration: none; line-height: 1.5;
}
.mx-track-actions button:hover, .mx-track-actions a.mx-tbtn:hover { background: #27406a; }
.mx-track-actions button.on { color: #ff6b9d; border-color: #ff6b9d; }
/* Track page rating stars */
.mx-stars button {
  background: none; border: none; font-size: 26px; cursor: pointer;
  color: #5b6b86; padding: 0 2px;
}
.mx-stars button.on { color: #ffb84d; }
/* body bottom padding is set from player.js while the bar shows */

/* v0.146.0 (Clint): the expanded deck — the bar grows upward
   into a Winamp-style deck: big artwork, wide seek, shuffle /
   repeat, like + rating stars, volume, and the queue panel as
   the playlist (the panel element is relocated into the deck
   while expanded, so it renders statically there). */
.mxp-xl {
  max-width: 1200px; margin: 0 auto 8px; padding: 10px 4px 2px;
  border-bottom: 1px solid #22345a;
  width: 100%; box-sizing: border-box;
}
.mxp-xl[hidden] { display: none; }
.mxp-xl-top { display: flex; gap: 14px; align-items: flex-start; }
.mxp-xl-art {
  width: 124px; height: 124px; object-fit: cover; border-radius: 8px;
  border: 1px solid #33507f; flex: 0 0 auto;
}
.mxp-xl-side { flex: 1 1 auto; min-width: 0; }
.mxp-xl-title {
  font-size: 19px; font-weight: 700; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.mxp-xl-artist { font-size: 14px; color: #9db4dd; margin: 2px 0 8px; }
.mxp-xl-seekrow { display: flex; align-items: center; gap: 6px; }
.mxp-xl-seekrow input[type="range"] { flex: 1 1 auto; min-width: 0; }
.mxp-xl-controls {
  display: flex; align-items: center; gap: 8px; margin-top: 10px;
  flex-wrap: wrap;
}
.mxp-xl-play { min-width: 52px; }
.mxp-stars { display: inline-flex; gap: 1px; margin-left: 4px; }
.mxp-stars button {
  background: none; border: none; font-size: 22px; cursor: pointer;
  color: #5b6b86; padding: 0 2px; line-height: 1;
}
.mxp-stars button.on { color: #ffb84d; }
.mxp-xl-volrow {
  display: flex; align-items: center; gap: 8px; margin-top: 10px;
}
.mxp-xl-volrow input[type="range"] { width: 160px; }
.mxp-xl-queue { margin-top: 8px; }
.mxp-xl .mx-queue-panel {
  position: static; width: auto; max-height: 32vh;
  box-shadow: none; border: none; border-top: 1px solid #22345a;
  border-radius: 0; padding: 8px 2px 2px; background: transparent;
}
#mxp-expand.on { color: #7db3ff; border-color: #7db3ff; }
@media (max-width: 720px) {
  .mxp-xl-art { width: 84px; height: 84px; }
  .mxp-xl-title { font-size: 16px; }
  .mxp-xl-volrow input[type="range"] { width: 110px; }
}
