/* Ahangima 1.1 — styles for the added features. Uses the 1.0 design tokens. */

/* Filters: keyword field + active chips */
.filters .filter-q{flex:1.6}
.filters input[type=search]{width:100%;min-height:46px;font-size:12px}
.filter-chips{display:flex;flex-wrap:wrap;gap:8px;margin:-6px 0 17px}
.filter-chip{display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:4px 12px;border-radius:999px;background:var(--surface-alt);border:1px solid var(--border);font-size:12px}
.filter-chip span:first-child{color:var(--muted)}
.filter-chip:hover{border-color:var(--accent);color:var(--text)}

/* In-list ad continues the list after the ad */
.track-list--cont{margin-top:0}
.ad-slot{display:flex;align-items:center;justify-content:center;overflow:hidden}

/* Custom player over the native <audio> */
.ag-player{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:16px}
.ag-player[hidden]{display:none}
.ag-player__play{display:grid;place-items:center;width:58px;height:58px;border-radius:50%;background:var(--accent);color:var(--accent-ink);flex:none;transition:transform .1s ease}
.ag-player__play:active{transform:scale(.95)}
.ag-player__play .i-play{margin-inline-end:-3px}
.i-pause,.is-playing .i-play{display:none}
.is-playing .i-pause{display:block}
.is-loading .ag-player__play{animation:ag-pulse 1s ease-in-out infinite}
@keyframes ag-pulse{50%{box-shadow:0 0 0 8px color-mix(in srgb,var(--accent) 25%,transparent)}}
.ag-player__main{min-width:0}
.ag-player__times{display:flex;justify-content:space-between;font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums}
.ag-player__vol{display:flex;align-items:center;gap:6px}
.ag-iconbtn{display:inline-grid;place-items:center;width:40px;height:40px;border-radius:8px;background:transparent;color:var(--text)}
.ag-iconbtn:hover{background:var(--surface-alt)}
.i-mute,.is-muted .i-vol{display:none}
.is-muted .i-mute{display:block}
.ag-range{--fill:0%;-webkit-appearance:none;appearance:none;width:100%;height:22px;margin:0;padding:0;border:0;background:transparent;cursor:pointer;min-height:0}
.ag-range::-webkit-slider-runnable-track{height:5px;border-radius:5px;background:linear-gradient(to right,var(--accent) var(--fill),var(--border) var(--fill))}
.ag-range::-moz-range-track{height:5px;border-radius:5px;background:var(--border)}
.ag-range::-moz-range-progress{height:5px;border-radius:5px;background:var(--accent)}
.ag-range::-webkit-slider-thumb{-webkit-appearance:none;width:15px;height:15px;margin-top:-5px;border-radius:50%;background:var(--text);border:0}
.ag-range::-moz-range-thumb{width:13px;height:13px;border-radius:50%;background:var(--text);border:0}
.ag-range--vol{width:90px}

/* Downloads: colour by quality instead of position */
.download-button.download-hi{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.download-button.download-mid,.download-button.download-base{background:var(--surface);border-color:#506179;color:var(--text)}
.download-button.download-hi:hover{color:var(--accent-ink)}
.download-button.download-mid:hover,.download-button.download-base:hover{color:var(--text);border-color:var(--accent)}

/* Facts */
.song-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:1px;margin:24px 0 0;border:1px solid var(--border);border-radius:12px;overflow:hidden;background:var(--border)}
.song-facts>div{background:var(--surface);padding:12px 16px}
.song-facts dt{font-size:11px;color:var(--muted)}
.song-facts dd{margin:2px 0 0;font-weight:700;font-size:13px}
.song-facts a{color:var(--text);text-decoration:underline;text-decoration-color:var(--accent);text-underline-offset:4px}

/* Lyrics now arrive as paragraphs */
.lyrics-text{white-space:normal;text-align:center}
.lyrics-text p{margin:0 0 20px}
.lyrics-text span{unicode-bidi:plaintext}

/* Artist avatars */
.ag-avatar{width:var(--av,72px);height:var(--av,72px);border-radius:50%;object-fit:cover;flex:none;background:var(--surface-alt)}
.ag-avatar--letter{display:grid;place-items:center;font-weight:700;font-size:calc(var(--av,72px) * .42);line-height:1;color:var(--accent);border:1px solid var(--border)}
.artist-list .ag-avatar{width:33px;height:33px;--av:33px}

/* Home: artists strip */
.artists-strip{margin-top:38px}
.artist-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(118px,1fr));gap:12px;list-style:none;margin:0;padding:0}
.artist-grid a{display:flex;flex-direction:column;align-items:center;gap:6px;padding:18px 10px 14px;border:1px solid var(--border);border-radius:12px;background:var(--surface);text-align:center;height:100%}
.artist-grid a:hover{border-color:var(--accent)}
.artist-grid__name{font-size:13px;font-weight:700;line-height:1.6}

/* Home: popular chart */
.popular{margin-top:38px}
.popular+.latest,.artists-strip+.latest,.featured+.latest{margin-top:38px}
.chart-list{list-style:none;margin:0;padding:0}
.row-rank{flex:0 0 34px;height:34px;display:grid;place-items:center;border-radius:8px;background:var(--surface-alt);color:var(--muted);font-weight:700;font-size:14px}
.is-ranked:nth-child(-n+3) .row-rank{background:var(--accent);color:var(--accent-ink)}

/* Archives */
.archive-count{display:inline-block;margin-top:6px;padding:2px 12px;border-radius:999px;background:var(--surface-alt);color:var(--muted);font-size:12px}
.archive-heading--artist{display:flex;align-items:center;gap:22px;flex-wrap:wrap}
.archive-heading--artist .ag-avatar{--av:112px;width:112px;height:112px;box-shadow:0 0 0 4px var(--bg),0 0 0 6px var(--accent)}
.archive-heading--artist h1{margin-top:2px}

/* Sticky player additions */
.sticky-thumb{width:48px;height:48px;object-fit:cover;border-radius:8px;flex:none}
.sticky-seek{flex:1.4;display:flex;align-items:center;gap:10px;min-width:0}
.sticky-seek span{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums;min-width:36px;text-align:center}
.sticky-mute{display:grid;place-items:center}

/* Footer additions */
.social-links,.ag-footer-links{display:flex;flex-wrap:wrap;gap:6px 16px;list-style:none;margin:10px 0 0;padding:0;font-size:12px}
.social-links a,.ag-footer-links a{color:var(--muted)}
.social-links a:hover,.ag-footer-links a:hover{color:var(--accent)}

@media(max-width:760px){
  .ag-player{grid-template-columns:auto minmax(0,1fr);gap:12px}
  .ag-player__vol{grid-column:1/-1;border-top:1px solid var(--border);padding-top:8px}
  .ag-player__play{width:52px;height:52px}
  .filters .filter-q{flex:1 1 100%}
  .sticky-inner{flex-wrap:wrap}
  .sticky-seek{order:5;flex-basis:100%}
  .sticky-mute{display:none}
  .sticky-thumb{width:40px;height:40px}
  .artist-grid{display:flex;overflow-x:auto;padding-bottom:6px}
  .artist-grid li{flex:0 0 118px}
  .archive-heading--artist .ag-avatar{--av:84px;width:84px;height:84px}
  .row-rank{flex-basis:28px;height:28px;font-size:12px}
}
