/* ==========================================================================
 * MILLENOVA GLOBAL PLAYER — MINI PLAYER CONTRACT
 *
 * OWNER:
 * This file owns minimized-player presentation only: the mini shell bar, mini title/meta, mini marquee and the Mini Up Next indicator.
 *
 * MUST NOT OWN:
 * Do not define the full Stage, ordinary queue rows or provider internals. Scrollbar chrome remains owned by
 * Styles/scrollbars.css. JavaScript state/queue/provider semantics stay
 * outside CSS.
 *
 * CASCADE CONTRACT:
 * Segment 1 of 2 for this owner. Phase 11A mechanical split: loaded at manifest position 03, after
 * 02-media-playback-providers--part-1-of-2.css. Rule order is unchanged from the former monolith (baseline
 * df93472, lines 712–833). New corrections go into the canonical owning
 * rule; never append dated Phase/fix blocks.
 *
 * DEPENDENCIES:
 * Depends on the [data-floating-playlist-mini] markup, the [data-floating-mini-upnext] indicator and syncMiniUpNext() in Scripts/floating-playlist.js.
 * ========================================================================== */


/* Super-compact minimized state.
 * Mini retains the compact legacy shell width. Desktop Stage intentionally
 * expands into the focused viewport composition defined in Phase 7.
 */
.floating-playlist.is-minimized {
  width: var(--mn-mplayer-shell-width);
}

.floating-playlist__mini {
  min-height: 52px;
  display: grid;
  grid-template-columns: 30px minmax(0,1fr) auto;
  gap: .35rem;
  align-items: center;
  padding: .42rem .5rem;
}

.floating-playlist__restore {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: .8rem;
  transition: color .14s ease, background .14s ease, transform .14s ease;
}

.floating-playlist__restore:hover,
.floating-playlist__restore:focus-visible {
  background: rgba(255,255,255,.05);
  color: #fff;
  outline: 0;
  transform: scale(1.06);
}

.floating-playlist__restore svg,
.floating-playlist__mini-close svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.floating-playlist__mini-close {
  color: rgba(255,255,255,.5) !important;
}

.floating-playlist__mini-marquee {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.floating-playlist__mini-marquee > span {
  display: inline-block;
  color: var(--mn-text);
  font-size: .58rem;
  font-weight: 650;
  white-space: nowrap;
}

.floating-playlist__mini-marquee.is-marquee > span {
  animation:
    floating-playlist-marquee var(--marquee-duration, 8s)
    ease-in-out infinite alternate;
}

@keyframes floating-playlist-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-1 * var(--marquee-distance, 0px))); }
}

.floating-playlist__mini-controls button {
  width: 26px;
  height: 26px;
}

.floating-playlist__mini-controls [data-floating-playlist-mini-previous],
.floating-playlist__mini-controls [data-floating-playlist-mini-next] {
  font-size: .92rem;
}

.floating-playlist__mini-controls [data-floating-playlist-mini-loop] svg {
  width: 12px;
  height: 12px;
}

@media (max-width: 900px) {
  /*
   * The universal mobile dock owns the viewport bottom edge. Keep the global
   * player immediately above it so the minimized controller never disappears
   * underneath navigation. Its z-index remains below dock/panel navigation,
   * allowing those surfaces to overlay the player when opened.
   */
  .floating-playlist {
    right: max(10px, env(safe-area-inset-right));
    bottom: calc(
      var(--mn-mobile-quick-dock-height, 68px)
      + env(safe-area-inset-bottom)
      + 10px
    );
    left: max(10px, env(safe-area-inset-left));
    z-index: 2280;
    width: auto;
  }

  .floating-playlist.is-minimized {
    width: auto;
    transform: translate3d(0, 0, 0);
    transition: transform .24s cubic-bezier(.2,.8,.2,1);
    will-change: transform;
  }

  /*
   * The mobile dock is a floating overlay. When its smart-scroll state moves
   * the dock out of view, the minimized player follows the same trajectory
   * into the released viewport space. Keep the player's existing bottom
   * anchor intact so Home/Studio safe-area and gap differences remain owned
   * by their existing rules.
   */
  .mobile-quick-shell.is-dock-auto-hidden
    ~ .floating-playlist.is-minimized {
    transform: translate3d(
      0,
      var(--mn-mobile-quick-dock-height, 68px),
      0
    );
  }
}

@media (prefers-reduced-motion: reduce) {
  .floating-playlist__equalizer i,
  .floating-playlist__track-eq i,
  .floating-playlist__track.is-just-dropped,
  .floating-playlist__mini-marquee.is-marquee > span,
  .floating-playlist__track-copy strong.is-marquee > span {
    animation: none !important;
  }

  .floating-playlist__track,
  .floating-playlist__drag,
  .floating-playlist__transport button,
  .floating-playlist__mini-controls button,
  .floating-playlist.is-minimized {
    transition: none;
  }
}
