/* ── Dedicated music player: dock bar (bottom of Music page) + floating widget (off-page) ──
   Reuses np__btn / np__bar / np__fill / .hub-scrub / .hub-thumb. Single green accent only. */

/* ── DOCK BAR — pinned at the bottom of .pcol--main, 3-zone grid ── */
.mdock {
  flex: 0 0 auto;                          /* pins below the scrolling .pcol__body */
  container-type: inline-size;             /* responsive: controls degrade by the dock's OWN width */
  display: grid; grid-template-columns: minmax(170px, 1fr) auto minmax(0, 1.5fr);  /* minmax(0,…): the old 150px floors set a ~480px hard minimum that pushed the scrubber offscreen at phone widths and crushed the title at 768. A 170px floor on zone 1 (2026-07-03 re-verify): with a bare 0 floor, the 1fr:1.5fr split against zone 3 could squeeze .mdock__now's own track down toward just its fixed children, leaving 0px for .mdock__meta (title/artist fully invisible). Zone 1 actually holds THREE items — art (46px) + meta (flexible) + the like button (44px, flex-shrink:0) — so the floor must cover art+gap+like+gap (112px) plus room for an ellipsized title (~58px). */
  align-items: center; gap: 14px;
  padding: 10px 16px; min-height: 66px;
  border-top: 1px solid var(--border);
  background: rgba(8, 8, 9, 0.96);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}
/* single green accent: progress + volume fill (thumb already green via .hub-thumb) */
.mdock .np__fill, .mwidget__hair i { background: var(--green); }
/* green play button (vs the video player's white np__btn--play) */
.mdock .np__btn--play, .mwidget__pp.np__btn--play {
  background: var(--green); border-color: var(--green); color: var(--green-ink);
}
.mdock .np__btn--play:hover { background: #5fe892; }
.mdock .np__btn--play .ic, .mwidget__pp.np__btn--play .ic { color: var(--green-ink); }

/* zone 1 — now playing */
.mdock__now { display: flex; align-items: center; gap: 11px; min-width: 0; }
.mdock__art { width: 46px; height: 46px; flex: 0 0 auto; border-radius: 8px; }
.mdock__meta { min-width: 0; flex: 1 1 0; display: flex; flex-direction: column; gap: 2px; }
.mdock__ti { font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mdock__ar { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mbar__like { flex: 0 0 auto; }
.mbar__like.on { color: var(--green); border-color: rgba(74,222,128,0.45); }  /* green, not the red np__like default */

/* zone 2 — transport */
.mdock__transport { display: flex; align-items: center; gap: 9px; }
.mdock__transport .np__btn { width: 38px; height: 38px; }
.mdock__transport .np__btn--play { width: 46px; height: 46px; }
.mdock__transport .np__btn svg, .mdock__transport .np__btn .ic { width: 20px; height: 20px; }

/* zone 3 — scrub + times + volume */
.mdock__scrubzone { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mdock__scrubzone .hub-scrub { flex: 1 1 auto; }
.mdock__t { font-size: 11.5px; color: var(--text-2); flex: 0 0 auto; min-width: 36px; text-align: center; }
.mdock__vol { display: flex; align-items: center; gap: 8px; flex: 0 0 138px; color: var(--text-2); }
.mdock__vol .ic, .mdock__vol svg { width: 18px; height: 18px; flex: 0 0 auto; }
.mdock__volbar { flex: 1 1 auto; }

/* ── FLOATING WIDGET — mirrors the video mini, music-shaped ── */
.mwidget {
  position: fixed; right: 16px; bottom: 16px; z-index: 81; /* above the video mini (80) so controls stay reachable if both overlap */
  display: flex; align-items: center; gap: 10px;
  width: 330px; padding: 9px 30px 12px 10px;
  border-radius: 14px; background: var(--raised); border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  box-shadow: 0 18px 50px rgba(0,0,0,0.6); cursor: grab; user-select: none;
}
.mwidget:active { cursor: grabbing; }
.mwidget__art { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 8px; }
.mwidget__meta { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.mwidget__ti { font-size: 12.5px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mwidget__ar { font-size: 11.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mwidget .np__btn { width: 32px; height: 32px; flex: 0 0 auto; }
.mwidget .np__btn svg, .mwidget .np__btn .ic { width: 17px; height: 17px; }
.mwidget__pp.np__btn--play { width: 34px; height: 34px; }
.mwidget .mbar__like.on { color: var(--green); border-color: rgba(74,222,128,0.45); }
.mwidget__x { position: absolute; top: 4px; right: 5px; width: 20px; height: 20px; border: 0; background: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.mwidget__x:hover { color: var(--text); }
.mwidget__x .ic { width: 14px; height: 14px; }
.mwidget__hair { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 0 0 14px 14px; background: rgba(255,255,255,0.12); overflow: hidden; }
.mwidget__hair i { display: block; height: 100%; }

/* ── dock transport toggles (shuffle / repeat / queue) — green when active ── */
.mdock { position: relative; }                  /* anchor the queue panel */
.mdock__tg { color: var(--text-2); }
.mdock__tg.on { color: var(--green); border-color: rgba(74,222,128,0.35); }
.mdock__volbtn { width: 32px; height: 32px; border: 0; background: none; color: var(--text-2); }
.mdock__volbtn:hover { color: var(--text); }

/* ── queue / up-next panel (anchored above the dock) ── */
.mqpanel { position: absolute; right: 16px; bottom: calc(100% + 12px); width: 360px; max-height: 52vh; overflow-y: auto; z-index: 60; padding: 8px; border-radius: 16px; background: rgba(13,13,16,0.92); -webkit-backdrop-filter: blur(34px); backdrop-filter: blur(34px); border: 1px solid rgba(255,255,255,0.12); box-shadow: 0 30px 70px rgba(0,0,0,0.72); }
.mqpanel__head { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 10px; font-size: 12px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-2); }
.mqpanel__x { width: 26px; height: 26px; border: 0; background: none; color: var(--text-2); display: grid; place-items: center; cursor: pointer; }
.mqpanel__x .ic, .mqpanel__x svg { width: 14px; height: 14px; }
.mqpanel__list { list-style: none; margin: 0; padding: 0; }
.mqitem { display: flex; align-items: center; gap: 4px; }
.mqitem--cur .mqitem__ti { color: var(--green); }
.mqitem__main { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 7px 8px; border: 0; background: none; color: var(--text); font: inherit; cursor: pointer; border-radius: 10px; text-align: left; }
.mqitem__main:hover { background: var(--raised-2); }
.mqitem__ix { width: 18px; display: grid; place-items: center; font-size: 12px; color: var(--muted); flex: 0 0 auto; }
.mqitem__art { width: 34px; height: 34px; border-radius: 7px; flex: 0 0 auto; }
.mqitem__meta { min-width: 0; display: flex; flex-direction: column; }
.mqitem__ti { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mqitem__ar { font-size: 11.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mqitem__ops { display: flex; gap: 1px; flex: 0 0 auto; }
.mqop { width: 28px; height: 28px; border: 0; background: none; color: var(--text-2); display: grid; place-items: center; cursor: pointer; border-radius: 8px; }
.mqop:hover:not(:disabled) { background: var(--raised-2); color: var(--text); }
.mqop:disabled { opacity: 0.3; cursor: default; }
.mqop .ic, .mqop svg { width: 15px; height: 15px; }
.mqop--up .ic, .mqop--up svg { transform: rotate(180deg); }

/* ── tile / playlist VIEW (Liked / Downloaded / History / a playlist) ── */
.musec-view__head { display: flex; align-items: center; gap: 14px; margin: 2px 0 18px; }
.musec-view__head h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.musec-view__back { width: 36px; height: 36px; flex: 0 0 auto; }
.musec-view__back .ic, .musec-view__back svg { width: 18px; height: 18px; }
.musec-view__play { margin-left: auto; }
.musec-view__empty { padding: 30px 6px; }
.plrow--wrap { display: flex; flex-wrap: wrap; gap: 16px; }
.plrow--wrap .plcard--sq { flex: 0 0 150px; }

/* ── responsive dock — drop the least-essential controls as the bar narrows (by its OWN width) ── */
@container (max-width: 740px) {
  .mdock { gap: 11px; padding: 10px 13px; }
  .mdock__volbar { display: none; }              /* keep the mute toggle, drop the slider */
  .mdock__vol { flex: 0 0 auto; gap: 0; }
}
@container (max-width: 590px) {
  .mdock__vol { display: none; }                 /* drop volume entirely */
  .mdock__scrubzone .mdock__t { display: none; } /* drop the elapsed/total time labels */
  /* 2026-07-03 re-verify: shuffle+repeat used to only drop below 480px, but at
     ~500-590px transport (5 buttons) alone could still squeeze the now-playing
     title to 0 and the scrub bar to a near-invisible sliver. Drop them here too. */
  .mdock__sh, .mdock__rp { display: none; }
  .mdock__transport { gap: 6px; }
}
@container (max-width: 400px) {
  .mdock__qb { display: none; }                   /* drop the queue button */
  .mbar__like { display: none; }                  /* drop the heart — core transport + scrub remain */
}

/* ── phone reflow: the scrub bar gets its own full-width second row instead of
   fighting the now-playing/transport zones for an offscreen sliver. A MEDIA
   query on purpose: @container rules that style .mdock ITSELF query an
   ancestor container (there is none), so self-rules in the blocks above are
   inert — only the descendant rules ever applied. ── */
@media (max-width: 560px) {
  .mdock { grid-template-columns: minmax(0, 1fr) auto; row-gap: 8px; }
  .mdock__scrubzone { grid-column: 1 / -1; grid-row: 2; }
}
