/* music.css — the /music scrobble stats page. */

.music-page { font-family: regular; font-size: var(--font-body); color: #000; }

.music-head { margin-bottom: 8px; }
.music-page .music-title { font-family: heading; font-size: var(--font-heading); color: #000080; }
.music-sub { color: #808080; margin-top: 2px; }

/* ----- Overview stat boxes ----- */
.music-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 10px;
}
.music-stat {
  min-width: 0;
  background: #fff;
  border: 2px solid;
  border-color: #808080 #dfdfdf #dfdfdf #808080;
  padding: 6px 4px;
  text-align: center;
}
.music-stat-num { font-family: heading; font-weight: bold; font-size: var(--font-heading); color: #000080; line-height: 1.1; }
.music-stat-label { color: #808080; }

/* ----- Panels ----- */
.music-panel {
  background: #fff;
  border: 2px solid;
  border-color: #808080 #dfdfdf #dfdfdf #808080;
  padding: 6px 8px;
  margin-bottom: 10px;
}
.music-panel-label {
  font-family: heading;
  font-weight: bold;
  font-size: var(--font-heading);
  color: #000080;
  border-bottom: 1px solid #c0c0c0;
  padding-bottom: 3px;
  margin-bottom: 5px;
}
.music-panel-label--row { display: flex; justify-content: space-between; align-items: center; }

/* Three columns for the top lists; stacks if the column is tight. */
.music-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.music-cols .music-panel { margin-bottom: 10px; }
.music-panel { min-width: 0; }

/* ----- List rows (songs / artists / albums) ----- */
.music-list { display: flex; flex-direction: column; }
.music-catalog { max-height: 360px; overflow-y: auto; scrollbar-width: none; }
.music-catalog::-webkit-scrollbar { display: none; }

.mt-row {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 0;
  border-bottom: 1px dotted #d8d8d8;
  min-width: 0;
}
.mt-row:last-child { border-bottom: none; }

.mt-rank { flex: 0 0 auto; width: 16px; text-align: right; color: #808080; }
.mt-cover {
  flex: 0 0 auto;
  width: 28px; height: 28px;
  background: #000;
  border: 1px solid;
  border-color: #808080 #dfdfdf #dfdfdf #808080;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  color: #00ff00;
  image-rendering: pixelated;
}
.mt-cover img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; display: block; }

.mt-meta { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.mt-title { color: #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-artist { color: #808080; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-count { flex: 0 0 auto; color: #000080; padding-left: 4px; }

.mt-fav { color: #e0a000; margin-right: 3px; }
.mt-link {
  color: #1a8a1a;
  margin-left: 4px;
  cursor: pointer;
}
.mt-link:hover { text-decoration: underline; }

.music-empty { color: #808080; padding: 6px 2px; }

.music-search {
  background: #fff;
  border: 2px solid;
  border-color: #808080 #dfdfdf #dfdfdf #808080;
  font-family: regular;
  font-weight: normal;
  font-size: var(--font-body);
  padding: 2px 5px;
  width: 180px;
  color: #000;
  outline: none;
}

/* ----- Bar charts (scrobbles per month / year) ----- */
/* Layout: [y-axis] [scroll: [plot bars] / [x labels]]. The y-axis stays pinned while
   the bars scroll, and gives the heights a real scrobble-count scale. */
.music-chart {
  display: flex;
  gap: 5px;
  padding-top: 4px;
}
.chart-yaxis {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 90px;
  text-align: right;
  color: #808080;
}
.chart-scroll {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.chart-scroll::-webkit-scrollbar { display: none; }
.chart-plot {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 90px;
  border-left: 1px solid #b9a9b8;
  border-bottom: 1px solid #b9a9b8;
}
.chart-xlabels { display: flex; gap: 2px; padding-left: 1px; margin-top: 2px; }
.music-chart--year .chart-plot,
.music-chart--year .chart-xlabels { gap: 6px; }
.chart-bar {
  flex: 1 0 14px;
  min-width: 12px;
  height: 100%;
  display: flex;
  align-items: flex-end;
}
.music-chart--year .chart-bar { flex: 0 0 40px; }
.chart-bar-fill {
  width: 100%;
  min-height: 1px;
  background: #4a6fd8;
  border-top: 1px solid #6e94ff;
}
.chart-bar:hover .chart-bar-fill { background: #6e94ff; }
.chart-xlabel {
  flex: 1 0 14px;
  min-width: 12px;
  text-align: center;
  color: #808080;
  white-space: nowrap;
}
.music-chart--year .chart-xlabel { flex: 0 0 40px; }
