/* The Playback widget on the Liquid look (js/media/media.js, js/media/media-progress.js).
   What a glance looks for comes first and largest: the cover, the title, and
   play/pause on the one filled key, in the cover's colour (--accent follows the
   album when the album colours are on; --on-accent is the ink that reads on it).
   The source is a line of text, the other keys are bare glyphs as in Apple Music,
   the progress line is thin with no handle, and the app's volume is the mixer's
   fader (LiquidMixer.css). A tile with room (400 tall, 300 wide and up) also gets
   the progress line, the transport centred under it and the lyrics key beside the
   title. Off Liquid nothing here applies and the progress line is not drawn, so
   its ticker never runs there either; nor is the note of the empty cover. */

.media-progress { display: none; }
.ph-note { display: none; }

/* ── Every size ──────────────────────────────────────────────────────────── */

/* No cover (nothing playing, or a player that sends none): a plain well with a
   note, as Apple Music shows a track without artwork, in place of the green
   equaliser and its glow. The note says it, so no label under it. */
:root[data-style="liquid"] .media-panel .media-art:not(.has-image) {
  background: var(--lg-key);
  box-shadow: none;
}
:root[data-style="liquid"] .media-panel .media-placeholder { background: none; }
:root[data-style="liquid"] .media-panel .media-placeholder::before { content: none; }
:root[data-style="liquid"] .media-panel :is(.ph-eq, .ph-label) { display: none; }
:root[data-style="liquid"] .media-panel .ph-note {
  display: block;
  width: 30%;
  height: 30%;
  color: var(--muted-text);
  opacity: 0.55;
}

/* The source as a line of text: no plate. */
:root[data-style="liquid"] .media-panel .app-pill {
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  font-weight: 600;
  color: var(--muted-text);
}
:root[data-style="liquid"] .media-panel .media-source-picker .cs-trigger { border-radius: 8px; }

/* The transport: bare glyphs, with a soft key behind them only under the pointer.
   Glyphs are a share of the key, so the size steps of MediaPanel.css scale them. */
:root[data-style="liquid"] .media-panel .control-btn {
  border: 0;
  border-radius: 26%;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
  color: var(--text);
}
:root[data-style="liquid"] .media-panel .control-btn:hover { background: var(--lg-key); }
:root[data-style="liquid"] .media-panel .control-btn svg { width: 70%; height: 70%; }
:root[data-style="liquid"] .media-panel .control-btn.primary {
  border-radius: 30%;
  background: var(--accent);
  color: var(--on-accent);
}
:root[data-style="liquid"] .media-panel .control-btn.primary:hover { background: color-mix(in srgb, var(--accent) 86%, var(--text)); }
:root[data-style="liquid"] .media-panel .control-btn.primary svg { width: 58%; height: 58%; }
/* The lyrics icon is drawn with strokes and reads larger than the filled glyphs. */
:root[data-style="liquid"] .media-panel .control-btn.media-lyrics-btn svg { width: 46%; height: 46%; }
:root[data-style="liquid"] .media-panel .media-lyrics-btn.is-on {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent), transparent 84%);
}

/* The progress line: thin, no handle, thicker under a finger. The input is taller
   than the line so a finger finds it, and the times sit under its two ends. */
:root[data-style="liquid"] .media-panel .media-progress {
  flex-direction: column;
  min-width: 0;
}
:root[data-style="liquid"] .media-panel .media-progress-range {
  --mp-on: var(--accent);
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 28px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  touch-action: pan-y;
}
/* The player said no to a jump: the line still says where the track is. */
:root[data-style="liquid"] .media-panel .media-progress-range:disabled {
  --mp-on: color-mix(in srgb, var(--text) 45%, transparent);
  cursor: default;
}
:root[data-style="liquid"] .media-panel .media-progress-range:focus-visible {
  outline: 2px solid rgba(var(--accent-rgb), 0.8);
  outline-offset: 2px;
  border-radius: 6px;
}
:root[data-style="liquid"] .media-panel .media-progress-range::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--mp-on) 0 var(--mp-fill, 0%), var(--media-track, rgba(255, 255, 255, 0.14)) var(--mp-fill, 0%) 100%);
}
:root[data-style="liquid"] .media-panel .media-progress-range:is(:hover, :active, :focus-visible):not(:disabled)::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 4px;
}
:root[data-style="liquid"] .media-panel .media-progress-range::-moz-range-track {
  height: 5px;
  border-radius: 3px;
  background: var(--media-track, rgba(255, 255, 255, 0.14));
}
:root[data-style="liquid"] .media-panel .media-progress-range::-moz-range-progress {
  height: 5px;
  border-radius: 3px;
  background: var(--mp-on);
}
:root[data-style="liquid"] .media-panel :is(.media-progress-range, .msp-range)::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 2px;
  height: 5px;
  margin-top: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  opacity: 0;
}
:root[data-style="liquid"] .media-panel :is(.media-progress-range, .msp-range)::-moz-range-thumb {
  width: 2px;
  height: 5px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
:root[data-style="liquid"] .media-panel .media-progress-times {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: -2px;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--muted-text);
}

/* The app's volume: the mixer's fader, its level the fill and no handle. */
:root[data-style="liquid"] .media-panel .media-vol-mute {
  border: 0;
  border-radius: 10px;
  background: var(--lg-key);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  color: var(--text);
}
:root[data-style="liquid"] .media-panel .media-vol-mute:hover { background: var(--lg-key-hover); color: var(--text); }
:root[data-style="liquid"] .media-panel .media-vol-mute.active { background: var(--mix-off); color: var(--text); }
:root[data-style="liquid"] .media-panel .media-vol-slider {
  --slider-track: var(--mix-track);
  --slider-fill: var(--mix-fill);
  height: 30px;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px var(--mix-edge);
  touch-action: pan-y;
}
:root[data-style="liquid"] .media-panel .media-vol-slider:focus-visible {
  outline: 2px solid rgba(var(--accent-rgb), 0.8);
  outline-offset: 2px;
}
:root[data-style="liquid"] .media-panel .media-vol-slider::-webkit-slider-thumb {
  width: 2px;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
:root[data-style="liquid"] .media-panel .media-vol-slider::-moz-range-thumb {
  width: 2px;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
:root[data-style="liquid"] .media-panel .media-vol-val { font-weight: 700; }
