/* ==========================================================================
   Winamp Playlist Panel Styles
   ========================================================================== */

/* ---------- Playlist Panel ---------- */

.winamp-playlist-panel {
  background: #1a1a1a;
  border-top: 1px solid #333;
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

/* ---------- Playlist Header ---------- */

.winamp-playlist-header {
  background: linear-gradient(180deg, #333 0%, #222 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 6px;
  border-bottom: 1px solid #333;
  flex-shrink: 0;
}

.winamp-playlist-title {
  color: #00cc00;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  text-shadow: 0 0 4px #006600;
}

.winamp-playlist-actions {
  display: flex;
  gap: 2px;
}

.winamp-playlist-btn {
  background: linear-gradient(180deg, #444 0%, #2a2a2a 100%);
  border: 1px solid #555;
  border-radius: 2px;
  color: #00ff00;
  font-size: 9px;
  font-family: 'Courier New', monospace;
  padding: 1px 6px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.winamp-playlist-btn:hover {
  background: linear-gradient(180deg, #555 0%, #3a3a3a 100%);
  border-color: #00cc00;
}

.winamp-playlist-btn:active {
  background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
}

/* ---------- Playlist List ---------- */

.winamp-playlist-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  font-family: 'Courier New', monospace;
  font-size: 10px;
  background: #111;
}

.winamp-playlist-list::-webkit-scrollbar {
  width: 8px;
}

.winamp-playlist-list::-webkit-scrollbar-track {
  background: #1a1a1a;
}

.winamp-playlist-list::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 2px;
}

.winamp-playlist-list::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* ---------- Playlist Item ---------- */

.winamp-playlist-item {
  padding: 2px 6px;
  color: #009900;
  cursor: pointer;
  display: flex;
  gap: 6px;
  border-bottom: 1px solid #1a1a1a;
  user-select: none;
  transition: background 0.15s ease, border-left-color 0.15s ease;
  border-left: 2px solid transparent;
}

.winamp-playlist-item:hover {
  background: #222;
  border-left-color: #006600;
}

.winamp-playlist-item.active {
  background: #0a2a0a;
  color: #00ff00;
  border-left-color: #00ff00;
  box-shadow: inset 0 0 8px rgba(0, 255, 0, 0.08);
}

.winamp-playlist-item.unplayable {
  color: #555;
  text-decoration: line-through;
  cursor: default;
}

.winamp-playlist-item.unplayable:hover {
  background: transparent;
}

.winamp-playlist-item-num {
  color: #336633;
  flex-shrink: 0;
  min-width: 20px;
  text-align: right;
}

.winamp-playlist-item.active .winamp-playlist-item-num {
  color: #00cc00;
}

.winamp-playlist-item-text {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  flex: 1;
}

/* ---------- Trending Section ---------- */

.winamp-trending {
  flex-shrink: 0;
  border-top: 1px solid #333;
}

.winamp-trending-header {
  background: linear-gradient(180deg, #333 0%, #222 100%);
  color: #ff8800;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  padding: 3px 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.winamp-trending-header:hover {
  background: linear-gradient(180deg, #3a3a2a 0%, #2a2a1a 100%);
}

.winamp-trending-arrow {
  font-size: 9px;
  transition: transform 0.2s ease;
}

.winamp-trending-header.open .winamp-trending-arrow {
  transform: rotate(180deg);
}

.winamp-trending-list {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: #111;
}

.winamp-trending-list.open {
  max-height: 200px;
  overflow-y: auto;
}

.winamp-trending-list::-webkit-scrollbar {
  width: 8px;
}

.winamp-trending-list::-webkit-scrollbar-track {
  background: #1a1a1a;
}

.winamp-trending-list::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 2px;
}

.winamp-trending-item {
  padding: 3px 6px;
  color: #888;
  font-family: 'Courier New', monospace;
  font-size: 10px;
  cursor: pointer;
  border-bottom: 1px solid #1a1a1a;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.winamp-trending-item:hover {
  background: #2a2211;
  color: #ff8800;
}

.winamp-trending-item-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  flex: 1;
}

.winamp-trending-item-count {
  flex-shrink: 0;
  margin-left: 8px;
  color: #666;
  font-size: 9px;
}

.winamp-trending-item:hover .winamp-trending-item-count {
  color: #cc6600;
}

.winamp-trending-empty {
  padding: 12px 6px;
  color: #555;
  font-family: 'Courier New', monospace;
  font-size: 10px;
  text-align: center;
}

.winamp-trending-error {
  padding: 12px 6px;
  color: #884444;
  font-family: 'Courier New', monospace;
  font-size: 10px;
  text-align: center;
}

/* ==========================================================================
   Trending Standalone Window
   ========================================================================== */

.trending-window-list {
  padding: 4px;
}

.trending-window-item {
  padding: 6px 8px;
  cursor: pointer;
  font-size: 12px;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #e0e0e0;
  color: #333;
  transition: background-color 0.1s ease;
}

.trending-window-item:hover {
  background: #d0e0f9;
}

.trending-rank {
  color: #666;
  font-size: 11px;
  min-width: 24px;
}

.trending-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trending-count {
  color: #999;
  font-size: 10px;
  flex-shrink: 0;
}
