/*
 * wkx-chrome.css — the app shell's shared chrome, defined ONCE (premium UI
 * pass, 2026-09-28): the global player (#wkPlayer) and its menus. Loaded last
 * (after wkx-shell.css), so it is the single source for how the player looks
 * on every page.
 *
 * Why the doubled id: index.html still carries ~170 older per-page player
 * rules (body.home-active .player…, body.create-active .player…, and
 * wkx-shell.css's body:not(#_) … ones, each with !important). Two ids outrank
 * all of them, so the player can no longer look different page to page.
 * Those older rules are dead weight now (see the redesign report's cleanup
 * list); deleting them is a separate, careful pass.
 *
 * Colours come from the --pt-* tokens (index.html :root). No animation runs
 * while idle: the play button's glow is static, the waveform is redrawn only
 * on playback progress (index.html drawPlayerWaveform).
 */

#wkPlayer#wkPlayer {
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  height: var(--player-height, 84px) !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 22px !important;
  display: flex !important;
  align-items: center !important;
  border-radius: 0 !important;
  border: 0 !important;
  border-top: 1px solid var(--pt-border-subtle) !important;
  background:
    linear-gradient(180deg, rgba(124, 92, 255, .045), transparent 60%),
    rgba(7, 10, 17, .94) !important;
  box-shadow: 0 -16px 44px rgba(0, 0, 0, .45) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  transform: none !important;
}
body:has(#wk-backend-fab) #wkPlayer#wkPlayer { padding-right: 146px !important; }

#wkPlayer#wkPlayer .player-inner {
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(240px, 1fr) minmax(400px, 1.4fr) auto !important;
  align-items: center !important;
  gap: 22px !important;
}

/* ── left: cover · title / producer / BPM·key · ♥ ≈ ⋯ ─────────────────── */
#wkPlayer#wkPlayer .player-left {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  min-width: 0 !important;
  flex: none !important;
  width: auto !important;
}
#wkPlayer#wkPlayer .player-cover {
  flex: 0 0 auto !important;
  width: 56px !important;
  height: 56px !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  display: grid !important;
  place-items: center !important;
  background: linear-gradient(135deg, #2a1f63, #111827) !important;
  border: 1px solid var(--pt-border-strong) !important;
  color: var(--pt-text-secondary) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}
#wkPlayer#wkPlayer .player-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
#wkPlayer#wkPlayer .player-meta {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  gap: 2px !important;
  min-width: 0 !important;
  flex: 0 1 auto !important;
}
#wkPlayer#wkPlayer .player-label,
#wkPlayer#wkPlayer .player-sub { display: none !important; }
#wkPlayer#wkPlayer .player-title {
  margin: 0 !important;
  color: var(--pt-text-primary) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
}
#wkPlayer#wkPlayer .player-producer {
  display: block !important;
  margin: 0 !important;
  color: var(--pt-text-muted) !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
#wkPlayer#wkPlayer .player-producer:not(:empty)::before { content: "Prod. "; }
#wkPlayer#wkPlayer.pre-play .player-producer::before { content: none; }
#wkPlayer#wkPlayer .player-tags { display: flex; gap: 5px; margin-top: 3px; }
#wkPlayer#wkPlayer .player-tags[hidden] { display: none !important; }
#wkPlayer#wkPlayer .player-tag {
  padding: 1px 7px;
  border-radius: 6px;
  border: 1px solid var(--pt-border-strong);
  background: rgba(148, 163, 255, .06);
  color: var(--pt-text-secondary);
  font-size: 11px;
  font-weight: 600;
  line-height: 16px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
#wkPlayer#wkPlayer .player-left-actions {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex: 0 0 auto !important;
  margin-left: 4px !important;
}

/* round icon buttons: heart, ≈, ⋯, shuffle, prev, next, repeat, volume */
#wkPlayer#wkPlayer :is(.player-fav-btn, .player-more-btn, .player-skip, .player-vol-icon) {
  width: 34px !important;
  height: 34px !important;
  min-width: 0 !important;
  padding: 0 !important;
  display: inline-grid !important;
  place-items: center !important;
  border-radius: 50% !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  color: var(--pt-text-secondary) !important;
  font-size: 16px !important;
  line-height: 1 !important;
  box-shadow: none !important;
  transition: color var(--pt-dur) var(--pt-ease), background var(--pt-dur) var(--pt-ease), border-color var(--pt-dur) var(--pt-ease) !important;
}
#wkPlayer#wkPlayer :is(.player-fav-btn, .player-more-btn, .player-skip, .player-vol-icon):hover:not(:disabled) {
  color: var(--pt-text-primary) !important;
  background: rgba(148, 163, 255, .08) !important;
  border-color: var(--pt-border-subtle) !important;
}
#wkPlayer#wkPlayer :is(.player-fav-btn, .player-more-btn, .player-skip, .player-vol-icon):disabled { opacity: .38 !important; cursor: default !important; }
#wkPlayer#wkPlayer :is(.player-fav-btn, .player-more-btn, .player-skip, .player-vol-icon):focus-visible { outline: none !important; box-shadow: var(--pt-focus-ring) !important; }
#wkPlayer#wkPlayer .player-fav-btn.favorited,
#wkPlayer#wkPlayer .player-fav-btn.is-fav,
#wkPlayer#wkPlayer .player-fav-btn[aria-pressed="true"] { color: var(--pt-magenta) !important; }
#wkPlayer#wkPlayer .player-fav-btn.favorited svg,
#wkPlayer#wkPlayer .player-fav-btn.is-fav svg,
#wkPlayer#wkPlayer .player-fav-btn[aria-pressed="true"] svg { fill: currentColor; }
/* shuffle / repeat on */
#wkPlayer#wkPlayer .player-skip[aria-pressed="true"] { color: var(--pt-accent-bright) !important; background: var(--pt-accent-soft) !important; }

/* ── center: transport · waveform · time ──────────────────────────────── */
#wkPlayer#wkPlayer .player-center {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  min-width: 0 !important;
  width: 100% !important;
  margin: 0 !important;
  flex: none !important;
}
#wkPlayer#wkPlayer .player-controls {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}
#wkPlayer#wkPlayer .player-toggle {
  flex: 0 0 auto !important;
  width: 52px !important;
  height: 52px !important;
  margin: 0 4px !important;
  padding: 0 !important;
  display: inline-grid !important;
  place-items: center !important;
  border-radius: 50% !important;
  border: 1px solid rgba(196, 181, 253, .55) !important;
  background: var(--pt-cta-gradient) !important;
  color: #fff !important;
  font-size: 17px !important;
  line-height: 1 !important;
  box-shadow: 0 0 0 4px rgba(124, 92, 255, .14), 0 8px 24px rgba(124, 92, 255, .38) !important;
  transition: transform var(--pt-dur) var(--pt-ease), box-shadow var(--pt-dur) var(--pt-ease) !important;
}
#wkPlayer#wkPlayer .player-toggle:hover { transform: scale(1.04) !important; box-shadow: 0 0 0 5px rgba(124, 92, 255, .2), 0 10px 30px rgba(124, 92, 255, .5) !important; }
#wkPlayer#wkPlayer .player-toggle:focus-visible { outline: none !important; box-shadow: var(--pt-focus-ring) !important; }
#wkPlayer#wkPlayer .player-wave {
  flex: 1 1 auto !important;
  min-width: 120px !important;
  max-width: 460px !important;
  width: auto !important;
  height: 38px !important;
  margin: 0 0 0 10px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  cursor: pointer !important;
}
#wkPlayer#wkPlayer .player-wave-canvas { width: 100%; height: 100%; display: block; }
#wkPlayer#wkPlayer .player-timecode {
  flex: 0 0 auto;
  display: flex;
  align-items: baseline;
  color: var(--pt-text-muted);
  font-size: 12.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
#wkPlayer#wkPlayer .player-time {
  margin: 0 !important;
  padding: 0 !important;
  min-width: 0 !important;
  width: auto !important;
  color: inherit !important;
  font-size: inherit !important;
  background: none !important;
}
#wkPlayer#wkPlayer #playerCurrent { color: var(--pt-text-secondary) !important; }
#wkPlayer#wkPlayer #playerDuration::before { content: none !important; }
#wkPlayer#wkPlayer .player-time-sep { margin: 0 4px; opacity: .7; }
#wkPlayer#wkPlayer .player-progress-wrap { display: none !important; }

/* ── right: volume · Download · Add to Playlist · Queue ───────────────── */
#wkPlayer#wkPlayer .player-right {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  min-width: 0 !important;
  flex: none !important;
  width: auto !important;
}
#wkPlayer#wkPlayer .player-volume { display: flex !important; align-items: center !important; gap: 6px !important; margin-right: 4px !important; }
#wkPlayer#wkPlayer .vol-slider { width: 92px !important; accent-color: var(--pt-accent-bright); }
#wkPlayer#wkPlayer :is(.player-action-btn, .player-queue-btn) {
  height: 34px !important;
  width: auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  border-radius: var(--pt-radius-control) !important;
  border: 1px solid var(--pt-border-strong) !important;
  background: rgba(148, 163, 255, .045) !important;
  color: var(--pt-text-secondary) !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  white-space: nowrap !important;
  box-shadow: none !important;
  transition: color var(--pt-dur) var(--pt-ease), border-color var(--pt-dur) var(--pt-ease), background var(--pt-dur) var(--pt-ease) !important;
}
#wkPlayer#wkPlayer :is(.player-action-btn, .player-queue-btn):hover:not(:disabled) {
  color: var(--pt-text-primary) !important;
  border-color: var(--pt-border-hover) !important;
  background: var(--pt-accent-soft) !important;
}
#wkPlayer#wkPlayer :is(.player-action-btn, .player-queue-btn):disabled { opacity: .4 !important; cursor: default !important; }
#wkPlayer#wkPlayer :is(.player-action-btn, .player-queue-btn):focus-visible { outline: none !important; box-shadow: var(--pt-focus-ring) !important; }
#wkPlayer#wkPlayer .player-queue-btn svg { margin-right: 0 !important; }
#wkPlayer#wkPlayer .player-badge:empty { display: none !important; }
#wkPlayer#wkPlayer .player-badge {
  margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important;
  color: var(--pt-text-muted) !important; font-size: 11.5px !important; font-weight: 500 !important;
  letter-spacing: 0 !important; text-transform: none !important; white-space: nowrap;
}
#wkPlayer#wkPlayer .player-collapse { display: none !important; }

/* a publication (community post) is playing: the sample-only actions step aside */
body[data-playback-kind="media"] #wkPlayer#wkPlayer #playerPlaylistBtn { display: none !important; }

/* ── narrower windows: labels go first, then the slider, then the right group ── */
@media (max-width: 1699px) {
  #wkPlayer#wkPlayer .player-action-label { display: none; }
  #wkPlayer#wkPlayer .player-action-btn { width: 34px !important; padding: 0 !important; justify-content: center !important; }
}
@media (max-width: 1280px) {
  #wkPlayer#wkPlayer .player-inner { grid-template-columns: minmax(200px, 1fr) minmax(360px, 1.5fr) auto !important; gap: 16px !important; }
  #wkPlayer#wkPlayer .vol-slider { display: none !important; }
  #wkPlayer#wkPlayer .player-tags { display: none !important; }
}
@media (max-width: 1000px) {
  #wkPlayer#wkPlayer .player-inner { grid-template-columns: minmax(160px, 1fr) minmax(260px, 1.6fr) auto !important; }
  #wkPlayer#wkPlayer #playerShuffleBtn,
  #wkPlayer#wkPlayer #playerRepeatBtn,
  #wkPlayer#wkPlayer #playerSimilarBtn,
  #wkPlayer#wkPlayer .player-volume,
  #wkPlayer#wkPlayer .player-action-btn { display: none !important; }
}
@media (max-width: 700px) {
  #wkPlayer#wkPlayer { padding: 0 12px !important; }
  #wkPlayer#wkPlayer .player-inner { grid-template-columns: minmax(0, 1fr) auto !important; }
  #wkPlayer#wkPlayer .player-right,
  #wkPlayer#wkPlayer .player-wave,
  #wkPlayer#wkPlayer .player-timecode,
  #wkPlayer#wkPlayer .player-left-actions { display: none !important; }
}

/* ── the player's small popovers: ⋯ menu and Add to Playlist ─────────── */
.wkp-pop {
  position: fixed;
  z-index: 10050;
  min-width: 220px;
  max-width: 300px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--pt-border-strong);
  background: var(--pt-bg-menu);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .55);
  color: var(--pt-text-primary);
  font-size: 13px;
}
.wkp-pop-title { padding: 8px 10px 6px; color: var(--pt-text-muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.wkp-pop-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--pt-text-secondary);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.wkp-pop-item:hover, .wkp-pop-item:focus-visible { outline: none; background: var(--pt-accent-soft); color: var(--pt-text-primary); }
.wkp-pop-item[aria-checked="true"] { color: var(--pt-text-primary); }
.wkp-pop-item[aria-checked="true"]::after { content: "✓"; margin-left: auto; color: var(--pt-accent-bright); font-weight: 700; }
.wkp-pop-list { max-height: 260px; overflow-y: auto; }
.wkp-pop-empty, .wkp-pop-status { padding: 8px 10px; color: var(--pt-text-muted); font-size: 12.5px; }
.wkp-pop-new { display: flex; gap: 6px; padding: 6px 4px 2px; border-top: 1px solid var(--pt-border-subtle); margin-top: 4px; }
.wkp-pop-new input {
  flex: 1 1 auto; min-width: 0; height: 32px; padding: 0 10px;
  border-radius: 8px; border: 1px solid var(--pt-border-strong);
  background: var(--pt-bg-inset); color: var(--pt-text-primary); font: inherit;
}
.wkp-pop-new input:focus { outline: none; border-color: var(--pt-border-active); }
.wkp-pop-new button {
  height: 32px; padding: 0 12px; border-radius: 8px; border: 0;
  background: var(--pt-accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer;
}
.wkp-pop-new button:disabled { opacity: .5; cursor: default; }

/* ── the sidebar (#appSidebar): visuals only ───────────────────────────────
   Geometry (item heights / gaps) stays with index.html + wkx-shell.css and
   wkx-sidebar.js's fit-to-window steps (wk-fit-*); here: colours, borders,
   radius, weight and the active item's glow, identical on every page. */
#appSidebar#appSidebar {
  background:
    radial-gradient(420px 260px at 0% 0%, rgba(124, 92, 255, .09), transparent 70%),
    linear-gradient(180deg, var(--pt-bg-1), var(--pt-bg-main)) !important;
  border: 0 !important;
  border-right: 1px solid var(--pt-border-subtle) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
#appSidebar#appSidebar .nav-item {
  border: 1px solid transparent !important;
  border-radius: 10px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--pt-text-secondary) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  transform: none !important;
  transition: background var(--pt-dur) var(--pt-ease), color var(--pt-dur) var(--pt-ease), border-color var(--pt-dur) var(--pt-ease) !important;
}
#appSidebar#appSidebar .nav-item .nav-icon { color: var(--pt-text-muted) !important; opacity: 1 !important; }
#appSidebar#appSidebar .nav-item:hover {
  background: rgba(148, 163, 255, .06) !important;
  color: var(--pt-text-primary) !important;
}
#appSidebar#appSidebar .nav-item:hover .nav-icon { color: var(--pt-text-secondary) !important; }
#appSidebar#appSidebar .nav-item:focus-visible { outline: none !important; box-shadow: var(--pt-focus-ring) !important; }
#appSidebar#appSidebar .nav-item.active {
  background: linear-gradient(90deg, rgba(124, 92, 255, .30), rgba(124, 92, 255, .10)) !important;
  border-color: rgba(167, 139, 250, .55) !important;
  box-shadow: 0 0 18px rgba(124, 92, 255, .28), inset 0 0 14px rgba(124, 92, 255, .12) !important;
  color: #fff !important;
  font-weight: 600 !important;
}
#appSidebar#appSidebar .nav-item.active .nav-icon { color: #c4b5fd !important; }
#appSidebar#appSidebar .nav-count {
  color: var(--pt-text-muted) !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  font-variant-numeric: tabular-nums !important;
  background: none !important;
}
#appSidebar#appSidebar .sidebar-section-label {
  color: var(--pt-text-muted) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: .12em !important;
}
#appSidebar#appSidebar .sidebar-version {
  border-color: var(--pt-border-strong) !important;
  background: rgba(148, 163, 255, .06) !important;
  color: var(--pt-text-secondary) !important;
}
