/* =============================================================================
 * Connecting Covers — Artists directory (/artists)
 * Design-system grid of credited cover artists. Built on tokens.css; the
 * per-artist page (/artists/:id) reuses gallery cl-* components, not this sheet.
 * (Replaces a never-existing artists.css the route referenced.)
 * ========================================================================== */

.ar-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-block: 24px;
}

/* ---- Search ---- */
.ar-search { display: block; }
.ar-search__input {
  width: 260px;
  max-width: 70vw;
  background: var(--surface-sunken);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-pill);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 13px;
  padding: 9px 14px;
  transition: border-color var(--motion-fast) var(--ease-out),
              box-shadow var(--motion-fast) var(--ease-out);
}
.ar-search__input::placeholder { color: rgba(255, 255, 255, 0.3); }
.ar-search__input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(226, 75, 74, 0.18);
}

/* ---- Grid ---- */
.ar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--grid-gap);
  margin-bottom: 28px;
}

/* ---- Card ---- */
.ar-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  /* Allow the card to shrink below its content's min-content (the nowrap name) so the
   * name ellipsizes instead of forcing the grid track wider than a phone. */
  min-width: 0;
  background: var(--surface-1);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-card);
  transition: transform var(--motion-fast) var(--ease-out),
              border-color var(--motion-fast) var(--ease-out),
              background var(--motion-fast) var(--ease-out);
}
.ar-card:hover {
  transform: translateY(-2px);
  border-color: var(--purple-600);
  background: var(--surface-2);
}
.ar-card:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.ar-card__avatar {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--purple-800);
  border: 1px solid var(--purple-600);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.ar-card__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ar-card__name {
  font-size: var(--fs-card);
  font-weight: var(--fw-card);
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ar-card__count {
  font-size: var(--fs-meta);
  font-weight: 600;
  color: var(--purple-text);
}
.ar-card__bio {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 11px;
  color: var(--accent-on-dark);
  opacity: 0.7;
}

/* ---- Empty / no-result / footer ---- */
.ar-empty,
.ar-noresult {
  padding: 32px 0;
  color: var(--muted);
  font-size: 13px;
}
.ar-empty a,
.ar-noresult a { color: var(--accent); }
.ar-foot { margin-top: 8px; }

/* Phones: one full-width column of horizontal cards. The previous forced two-column
 * grid made each track's min-content wider than half a phone, overflowing the viewport. */
@media (max-width: 520px) {
  .ar-grid { grid-template-columns: 1fr; }
}
