/* ─ Playlists Page ─ */
.playlist-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.playlist-page-header .page-title {
  margin-bottom: 0;
}

.playlist-filter-input {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13px;
  padding: 6px 12px;
  width: 220px;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.playlist-filter-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.playlist-filter-input::placeholder {
  color: var(--text-muted);
}

.playlist-list {
  display: flex;
  flex-direction: column;
}

.playlist-list-header {
  display: grid;
  grid-template-columns: 36px 1fr 90px 90px 44px;
  gap: var(--space-3);
  padding: 6px var(--space-3);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 4px;
}

.playlist-sort-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s;
}

.playlist-sort-btn:hover,
.playlist-sort-btn.active {
  color: var(--accent);
}

.playlist-row {
  display: grid;
  grid-template-columns: 36px 1fr 90px 90px 44px;
  gap: var(--space-3);
  align-items: center;
  padding: 6px var(--space-3);
  border-radius: var(--radius-md);
  transition: background 0.15s;
  user-select: none;
}

.playlist-row:hover {
  background: var(--bg-hover);
}

.playlist-play-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg-app);
  border: none;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s, transform 0.15s;
  flex-shrink: 0;
}

.playlist-row:hover .playlist-play-icon {
  opacity: 1;
}

.playlist-play-icon:hover {
  transform: scale(1.1);
}

.playlist-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.playlist-meta {
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.playlist-delete-btn {
  opacity: 0;
  color: var(--danger) !important;
  padding: 4px;
  height: auto;
  min-height: unset;
  transition: opacity 0.15s;
  justify-self: center;
}

.playlist-row:hover .playlist-delete-btn {
  opacity: 1;
}

.fav-remove-btn {
  opacity: 0;
  color: var(--text-muted);
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: opacity 0.15s, color 0.15s;
}

.fav-remove-btn:hover {
  color: var(--danger);
}

.track-row:hover .fav-remove-btn,
.track-row.context-active .fav-remove-btn {
  opacity: 1;
}

/* Smart playlist editor — mode toggles stay aligned when primary/surface swaps. */
.smart-playlist-mode-toggle .btn-primary:hover {
  transform: none;
  box-shadow: none;
  filter: brightness(1.08);
}

