/* ========================================
   MUSEALYTICS - Charts Styles
   Chart lists, bars, artwork
   ======================================== */

/* Chart List */
.chart-list {
  max-height: 500px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--bg-surface);
  width: 100%;
  box-sizing: border-box;
}

.chart-list::-webkit-scrollbar {
  width: 6px;
}

.chart-list::-webkit-scrollbar-track {
  background: var(--bg-surface);
  border-radius: 3px;
}

.chart-list::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 3px;
}

.chart-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  transition: background var(--duration-fast);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.chart-item:hover {
  background: var(--bg-hover);
}

.chart-rank {
  width: 24px;
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  flex-shrink: 0;
}

.chart-artwork {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-elevated);
}

.chart-artwork-placeholder {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-muted);
}

.chart-artwork-placeholder svg {
  width: 24px;
  height: 24px;
}

.chart-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.chart-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chart-artist {
  font-size: var(--font-sm);
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chart-value {
  font-weight: 600;
  color: var(--accent);
  text-align: right;
  flex-shrink: 0;
  white-space: nowrap;
  padding-left: var(--space-2);
}

.chart-unit {
  font-size: var(--font-xs);
  color: var(--text-muted);
  margin-left: var(--space-1);
}

/* Chart Bars (Time Distribution) */
.chart-bars {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.bar-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.bar-header {
  display: flex;
  justify-content: space-between;
  font-size: var(--font-sm);
}

.bar-label {
  color: var(--text-secondary);
}

.bar-value {
  font-weight: 600;
  color: var(--accent);
}

.bar-track {
  height: 8px;
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #6366f1);
  border-radius: var(--radius-full);
  transition: width 0.5s var(--ease-out);
}

/* ----------------------------------------
   Recent Tracks
   ---------------------------------------- */
.track-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-height: 400px;
  overflow-y: auto;
}

.track-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  transition: background var(--duration-fast);
}

.track-item:hover {
  background: var(--bg-hover);
}

.track-art {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-elevated);
}

.track-info {
  flex: 1;
  min-width: 0;
}

.track-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-artist {
  font-size: var(--font-sm);
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-time {
  font-size: var(--font-xs);
  color: var(--text-muted);
}
