/**
 * 9 Star Media — player styles.
 *
 * Deliberately plain and low-specificity so a storefront theme can override
 * anything without !important. Everything is scoped under .nsp (audio) and
 * .nsv (video); no element selectors leak into the page.
 */

.nsp,
.nsv {
  --nsp-fg: #1a1a1a;
  --nsp-muted: #6b6b6b;
  --nsp-bg: #ffffff;
  --nsp-surface: #f4f4f5;
  --nsp-accent: #7a1f2b;
  --nsp-border: #d8d8dc;
  --nsp-focus: #1d6fd6;

  color: var(--nsp-fg);
  background: var(--nsp-bg);
  border: 1px solid var(--nsp-border);
  border-radius: 6px;
  padding: 0.75rem;
  font: inherit;
  max-width: 40rem;
}

@media (prefers-color-scheme: dark) {
  .nsp,
  .nsv {
    --nsp-fg: #ececef;
    --nsp-muted: #a0a0a8;
    --nsp-bg: #17171a;
    --nsp-surface: #232327;
    --nsp-accent: #e08a96;
    --nsp-border: #35353b;
    --nsp-focus: #6fb0ff;
  }
}

/* Visible focus is not optional; several controls here are keyboard-only. */
.nsp :focus-visible,
.nsv :focus-visible {
  outline: 3px solid var(--nsp-focus);
  outline-offset: 2px;
}

/* ------------------------------------------------------------------ audio */

.nsp-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.nsp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem; /* comfortable touch target */
  padding: 0.25rem 0.5rem;
  font-size: 1rem;
  line-height: 1;
  color: var(--nsp-fg);
  background: var(--nsp-surface);
  border: 1px solid var(--nsp-border);
  border-radius: 4px;
  cursor: pointer;
}

.nsp-btn:hover {
  border-color: var(--nsp-accent);
}

.nsp-play {
  font-size: 1.15rem;
}

.nsp-title {
  flex: 1 1 12rem;
  min-width: 0;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nsp-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.nsp-seek {
  flex: 1 1 auto;
  min-width: 4rem;
}

.nsp-volume {
  flex: 0 0 6rem;
}

.nsp-time {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  font-size: 0.875rem;
  color: var(--nsp-muted);
}

.nsp-status,
.nsv-status {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: var(--nsp-muted);
  min-height: 1.25em; /* reserve space so live-region updates do not shift layout */
}

.nsp-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}

.nsp-item {
  margin: 0;
}

.nsp-track {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  width: 100%;
  padding: 0.5rem 0.6rem;
  text-align: left;
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}

.nsp-track:hover:not(:disabled) {
  background: var(--nsp-surface);
}

/* Current-track highlight. Colour alone is never the only signal — the bar on
   the left and the aria-current attribute both carry the same information. */
.nsp-track.is-current {
  background: var(--nsp-surface);
  box-shadow: inset 3px 0 0 var(--nsp-accent);
  font-weight: 600;
}

.nsp-track.is-unavailable,
.nsp-track:disabled {
  color: var(--nsp-muted);
  cursor: not-allowed;
}

.nsp-track-num {
  flex: 0 0 1.75rem;
  font-variant-numeric: tabular-nums;
  color: var(--nsp-muted);
}

.nsp-track-title {
  flex: 1 1 auto;
  min-width: 0;
}

.nsp-track-note {
  flex: 0 0 auto;
  font-size: 0.75rem;
  font-style: italic;
  color: var(--nsp-muted);
}

/* ------------------------------------------------------------------ video */

.nsv {
  max-width: 56rem;
}

.nsv-video {
  display: block;
  width: 100%;
  height: auto;
  background: #000;
  border-radius: 4px;
}

.nsv-title {
  margin: 0.6rem 0 0.2rem;
  font-size: 1.05rem;
}

.nsv-description {
  margin: 0;
  font-size: 0.9rem;
  color: var(--nsp-muted);
}

.nsv-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.nsv-item-btn {
  padding: 0.45rem 0.7rem;
  font: inherit;
  color: inherit;
  background: var(--nsp-surface);
  border: 1px solid var(--nsp-border);
  border-radius: 4px;
  cursor: pointer;
}

.nsv-item-btn.is-current {
  border-color: var(--nsp-accent);
  font-weight: 600;
}

.nsv-item-btn:disabled {
  color: var(--nsp-muted);
  cursor: not-allowed;
}

@media (prefers-reduced-motion: reduce) {
  .nsp,
  .nsv,
  .nsp * ,
  .nsv * {
    transition: none !important;
    animation: none !important;
  }
}

/* ---------------------------------------------------------------------------
   Track-list toggle.

   theme489 renders the player with its list CLOSED (fancyMusicPlayer defaults
   playlist:true + playlistInitOpen:false), showing transport controls and the
   current title only. The list opens from a button. Reproduced here, because on
   this store the purchasable attribute rows are already the page's tracklist —
   an open player list duplicates it.
   --------------------------------------------------------------------------- */
.nsp-list-toggle {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0 6px;
  font-size: 15px;
  line-height: 1;
  color: inherit;
  opacity: .75;
}
.nsp-list-toggle:hover,
.nsp-list-toggle:focus-visible { opacity: 1; }
.nsp-list-toggle[aria-expanded="true"] { opacity: 1; }

/* `hidden` must win over any display rule the list carries. */
.nsp-list[hidden] { display: none; }

/* --------------------------------------------------------------------------
   Companions to theme489's jquery.fancyMusicPlayer-white.css, which does the
   skinning. Only what the original has no counterpart for.
   -------------------------------------------------------------------------- */
.fmp-sr-status {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; margin: -1px;
}
.fmp-playlist li.fmp-unavailable-track { cursor: default; }
.fmp-playlist li.fmp-selected-track > span { font-weight: bold; }
