/* dig.css (Agent C, v2-spec F3): the quick chips, the tracklist results under the crate
   (#dig-results) and the DJ's anthems shelf (#anthems). Uses the site.css tokens only; nothing here
   animates brightness (the one animation is the anthem record turning, which is motion and stops
   under reduced motion). */

/* ---------- quick chips ---------- */

.dig-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 12px 0 10px;
  font-size: .875rem;
  color: var(--smoke);
}
.dig-chips-label { margin-right: 2px; font-weight: 600; }
.dig-chip {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgb(var(--smoke-rgb) / .32);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: 600 .875rem/1 var(--f-body);
  cursor: pointer;
  transition: border-color .2s, background-color .2s;
}
@media (hover: hover) {
  .dig-chip:hover { border-color: var(--uv); background: rgb(var(--uv-rgb) / .12); }
}
.dig-chip:focus-visible { outline-offset: 2px; }
@media (min-width: 1200px) {
  /* The search box sits at the right end of the tabs row; the chips line up under it. */
  .dig-chips { justify-content: flex-end; }
}

/* ---------- tracklist results ---------- */

.dig-results {
  margin: 28px 0 8px;
  padding: clamp(16px, 2.4vw, 24px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--booth);
}
/* The crate's own "Nothing in the crate matches ..." would sit right above tunes that do match. */
.crate-panel:has(> .dig-results[data-hits="1"]) > .crate-empty { display: none; }

.dig-head { margin-bottom: 6px; }
.dig-heading {
  margin: 0;
  font: 700 1.125rem/1.35 var(--f-body);
  letter-spacing: -.01em;
  color: var(--ink);
}
.dig-num { color: var(--lamp); font-variant-numeric: tabular-nums; }
.dig-loading { margin: 0; color: var(--smoke); font-size: .9375rem; }

.dig-list { list-style: none; margin: 8px 0 0; padding: 0; }
.dig-tune { border-top: 1px solid var(--line); }
.dig-tune:first-child { border-top: 0; }

.dig-summary {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 4px;
  cursor: pointer;
  list-style: none;
  border-radius: 8px;
}
.dig-summary::-webkit-details-marker { display: none; }
.dig-summary::marker { content: ""; }
@media (hover: hover) {
  .dig-summary:hover { background: rgb(var(--booth-2-rgb) / .7); }
}
.dig-summary:focus-visible { outline-offset: 0; }

.dig-chev {
  justify-self: center;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--smoke);
  border-bottom: 1.5px solid var(--smoke);
  transform: rotate(-45deg);
  transition: transform .2s var(--ease);
}
details[open] > summary .dig-chev { transform: rotate(45deg); }

.dig-tune-text { min-width: 0; line-height: 1.4; overflow-wrap: anywhere; }
.dig-artist { font-weight: 700; color: var(--ink); }
.dig-title { color: rgb(var(--ink-rgb) / .82); }
.dig-tune.is-own .dig-artist { color: var(--lamp); }
.dig-count {
  white-space: nowrap;
  font-size: .8125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--smoke);
}

.dig-sets { list-style: none; margin: 0 0 10px; padding: 0 0 0 28px; }
.dig-set {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  padding: 9px 0;
  border-top: 1px dashed rgb(var(--uv-rgb) / .16);
}
.dig-set:first-child { border-top: 0; }
.dig-set-main { display: flex; flex-direction: column; min-width: 0; }
.dig-set-label { font-size: .9375rem; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.dig-set-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  font-size: .8125rem;
  color: var(--smoke);
  font-variant-numeric: tabular-nums;
}
.dig-set-time { color: var(--ink); opacity: .85; }
.dig-set-time.is-about,
.dig-set-time.is-untimed { color: var(--smoke); opacity: 1; }
.dig-set.is-current .dig-set-label { color: var(--lamp); }

/* position: relative contains the screen-reader-only label (.dig-play-text, absolutely positioned
   on phones and in the anthem cards): without it the label's containing block was #mixes, outside
   the anthem row's overflow clip, and an open card pushed the whole page sideways on a phone. */
.dig-play {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgb(var(--lamp-rgb) / .6);
  border-radius: 999px;
  background: transparent;
  color: var(--lamp);
  font: 700 .8125rem/1 var(--f-body);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.dig-play .glyph { width: 8px; height: 10px; }
@media (hover: hover) {
  .dig-play:hover { background: var(--lamp); border-color: var(--lamp); color: var(--void); }
}
.dig-play.is-set { border-color: rgb(var(--ink-rgb) / .4); color: var(--ink); }
@media (hover: hover) {
  .dig-play.is-set:hover { background: var(--ink); border-color: var(--ink); color: var(--void); }
}

.dig-more { margin: 14px 0 4px; }
.dig-foot {
  margin: 14px 0 0;
  max-width: 60ch;
  font-size: .8125rem;
  line-height: 1.5;
  color: var(--smoke);
}

/* Narrow places (phones, and the anthem cards at every width): the play button becomes a round
   44 px icon beside the set name. Its aria-label already says "Play {set} from {time}". */
.dig-play-text { white-space: nowrap; }
@media (max-width: 599px) {
  .dig-sets { padding-left: 4px; }
  .dig-set .dig-play-text {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  .dig-set .dig-play { justify-content: center; width: 44px; min-height: 44px; padding: 0; }
  .dig-set .dig-play .glyph { margin-left: 2px; }
}
@media (pointer: coarse) {
  /* 36 px to the eye, 44 px to the finger (the rows sit 8 px apart, so the areas only touch). */
  .dig-chip { position: relative; min-height: 36px; }
  .dig-chip::after { content: ""; position: absolute; inset: -4px 0; }
  .dig-play { min-height: 44px; }
}

/* ---------- anthems shelf ---------- */

.anthems { margin-top: clamp(32px, 4.5vw, 52px); }
/* Room for the cards before the tracklists land, so nothing below jumps. */
.anthems[data-state="loading"] .anthem-row { min-height: 236px; }
.anthems[data-state="failed"] { display: none; }

.anthems-head { margin-bottom: 16px; }
.anthems-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
  font: 600 .8125rem/1.3 var(--f-body);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--smoke);
}
.anthems-title::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lamp);
  box-shadow: 0 0 10px rgb(var(--lamp-rgb) / .55);
}
.anthems-sub { margin: 0; font-size: .9375rem; color: var(--smoke); }

.anthem-row {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}
/* Cards stretch to their row (so the collapsed "All N sets" lines line up), except while one card's
   list is open: its row-mates keep their own height rather than growing empty. */
.anthem-row:has(.anthem-all[open]) { align-items: start; }
@media (max-width: 1023px) {
  .anthem-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Phones: one row that scrolls sideways inside its own box and bleeds to the screen edges (the
   negative margin equals .wrap's padding, so the page itself never scrolls sideways). */
@media (max-width: 599px) {
  .anthem-row {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: min(84%, 320px);
    margin-inline: calc(-1 * var(--edge));
    padding: 2px var(--edge) 10px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--edge);
    scrollbar-width: none;
    align-items: start;
  }
  .anthem-row::-webkit-scrollbar { display: none; }
  .anthem-card { scroll-snap-align: start; }
}

.anthem-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--booth);
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
@media (hover: hover) { .anthem-card:hover { background: var(--booth-2); } }
.anthem-card.is-spinning { border-color: rgb(var(--lamp-rgb) / .7); background: var(--booth-2); }

/* Tall enough for a two-line title, so the meters line up across a row of cards. */
.anthem-top { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: center; min-height: 72px; }

/* A dubplate: grooves in the booth tones and a lamp-orange label carrying the rank. */
.anthem-disc {
  display: grid;
  place-items: center;
  width: 64px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle closest-side, var(--void) 0 2px, var(--lamp) 2.5px 15px, var(--mt-tt-record) 15.5px 17px, transparent 17.5px),
    repeating-radial-gradient(circle closest-side, var(--booth-2) 0 1.4px, var(--mt-tt-record) 1.4px 2.8px);
  box-shadow: 0 0 0 1px rgb(var(--uv-rgb) / .3), inset 0 0 0 2px var(--mt-tt-record);
}
.anthem-rank {
  font: var(--display-weight-hero) .5625rem/1 var(--f-display);
  letter-spacing: .04em;
  color: var(--void);
  transform: translateY(-9px);  /* clear of the 2 px spindle hole, still inside the 15 px label */
}
.anthem-card.is-spinning .anthem-disc { animation: anthem-spin 1.8s linear infinite; }
@keyframes anthem-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .anthem-card.is-spinning .anthem-disc { animation: none; }
  .dig-chev { transition: none; }
}

.anthem-id { min-width: 0; }
.anthem-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin: 0 0 4px;
  font: 700 1.0625rem/1.3 var(--f-body);
  text-wrap: balance;
}
.anthem-count {
  margin: 0;
  font-size: .875rem;
  font-variant-numeric: tabular-nums;
  color: var(--smoke);
}
/* The artist under the tune title: one line, a step brighter than the count. */
.anthem-artist { margin: 2px 0 0; color: var(--ink); opacity: .82; font-size: .9em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.anthem-meter {
  position: relative;
  display: block;
  height: 3px;
  overflow: hidden;
  border-radius: 2px;
  background: rgb(var(--uv-rgb) / .16);
}
.anthem-meter::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--fill, 0) * 100%);
  border-radius: 2px;
  background: linear-gradient(90deg, var(--uv), var(--lamp));
}

.anthem-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
/* A lamp outline, like a release's Play: six solid lamp buttons in a row drowned out the one main
   action on the screen. Solid while that card's drop is the set playing. */
.btn.anthem-hear { border-color: rgb(var(--lamp-rgb) / .6); background: transparent; color: var(--lamp); }
@media (hover: hover) {
  .btn.anthem-hear:hover { border-color: var(--lamp); background: var(--lamp); color: var(--void); box-shadow: none; }
}
.anthem-card.is-spinning .btn.anthem-hear { border-color: var(--lamp); background: var(--lamp); color: var(--void); }
.anthem-hear .glyph { width: 9px; height: 11px; }
.anthem-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--uv-soft);
  font: 600 .875rem/1.2 var(--f-body);
  text-decoration: underline;
  text-decoration-color: rgb(var(--uv-soft-rgb) / .45);
  text-underline-offset: 4px;
  cursor: pointer;
  transition: color .2s, text-decoration-color .2s;
}
.anthem-link:hover { color: var(--ink); text-decoration-color: currentColor; }
/* On Beatport and On SoundCloud open a new tab: they carry the out-arrow (site.css), the in-page
   Play the track button does not. */
a.anthem-link { display: inline-flex; align-items: center; }
@media (pointer: coarse) {
  .anthem-link { position: relative; }
  .anthem-link::before { content: ""; position: absolute; inset: -12px -6px; }
}

.anthem-now { margin: -4px 0 0; font-size: .8125rem; line-height: 1.4; color: var(--smoke); }
.anthem-now:empty { display: none; }

.anthem-all { margin-top: auto; border-top: 1px solid var(--line); padding-top: 6px; }
.anthem-all-summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 6px 0 2px;
  border-radius: 8px;
  font-size: .875rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}
.anthem-all-summary::-webkit-details-marker { display: none; }
.anthem-all-summary::marker { content: ""; }
.anthem-all-summary:focus-visible { outline-offset: 0; }
@media (pointer: coarse) { .anthem-all-summary { min-height: 44px; } }

.anthem-sets {
  list-style: none;
  margin: 2px 0 0;
  padding: 0 4px 0 0;
  max-height: 292px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgb(var(--uv-rgb) / .4) transparent;
}
.anthem-set { gap: 10px; }
.anthem-set .dig-set-label { font-size: .875rem; }
.anthem-set .dig-play-text {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.anthem-set .dig-play { justify-content: center; width: 40px; min-height: 40px; padding: 0; }
.anthem-set .dig-play .glyph { margin-left: 2px; }
@media (pointer: coarse) { .anthem-set .dig-play { width: 44px; min-height: 44px; } }
