/* =========================================================================
 * Super Live Music Lyrics — Smule-style homepage (card grids, chips, load-more)
 * Uses niyal-modern-ui premium tokens (--nmui-*) with safe fallbacks.
 * ========================================================================= */

/* Remove the heavy hero photo — clean modern (neutral dark) gradient instead.
   No red/maroon stops, so nothing "pink" bleeds past the content sheet edges. */
.lyric-home {
  background: linear-gradient(160deg, #14161f 0%, #1e1b2b 60%, #262038 100%) !important;
}

/* The theme's customcss.php forces `body{background:<option> !important}` (an old
   pink theme-option) in wp_head, after this file — beat it with higher specificity.
   var(--nmui-bg) is white in light mode and dark in dark mode, so both are clean. */
html body { background: var(--nmui-bg, #fff) !important; }

/* Opaque content sheet in light mode (dark mode is painted by the plugin skin). */
.content-pull,
.height-capsule { background: var(--nmui-bg, #fff); position: relative; }

/* A–Z browse hero (lyric-list.php) */
.niyal-letter-hero {
  font-size: clamp(52px, 13vw, 104px);
  font-weight: 800;
  line-height: 1;
  color: #fff;
  margin: 0;
  text-shadow: 0 3px 22px rgba(0, 0, 0, .4);
}
.niyal-letter-sub { color: rgba(255, 255, 255, .85); margin: 8px 0 0; font-weight: 600; }
.niyal-empty { padding: 40px 10px; text-align: center; color: var(--nmui-text-dim, #8a9099); }

/* Genre / tag filter chips — scroll horizontally, scrollbar fully hidden. */
.niyal-genres {
  display: flex;
  gap: 8px;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 10px 0 14px;
  -webkit-overflow-scrolling: touch;
  /* !important beats the premium layer's `html.nmui-premium *{scrollbar-width:thin}` */
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
.niyal-genres::-webkit-scrollbar { width: 0 !important; height: 0 !important; display: none !important; }
.niyal-chip {
  flex: 0 0 auto;
  border: none;
  cursor: pointer;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: var(--nmui-surface, #eef0f3);
  color: var(--nmui-text, #333);
  transition: background .2s, color .2s, transform .15s;
}
.niyal-chip:hover { transform: translateY(-1px); }
.niyal-chip.is-active { background: var(--nmui-accent, #e4422e); color: #fff; }

/* Section wrapper */
.niyal-section { margin: 6px 0 30px; }
.niyal-section .title h3 { display: flex; align-items: center; gap: 8px; }
.niyal-section .title h3 i { color: var(--nmui-accent, #e4422e); }

/* Card grid */
.niyal-grid {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 18px;
  transition: opacity .2s ease;
}
.niyal-grid.is-loading { opacity: .5; }

/* Card */
.niyal-card { list-style: none; }
.niyal-card-cover {
  display: block;
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--nmui-r-md, 16px);
  overflow: hidden;
  background: #1c1c1f;
  box-shadow: var(--nmui-shadow-sm, 0 2px 8px rgba(0, 0, 0, .12));
}
.niyal-card-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform .35s ease;
}
.niyal-card-cover:hover .niyal-card-img { transform: scale(1.06); }
.niyal-card-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .28);
  opacity: 0;
  transition: opacity .2s ease;
}
.niyal-card-cover:hover .niyal-card-play { opacity: 1; }
.niyal-card-play i {
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--nmui-accent, #e4422e);
  color: #fff;
  padding-left: 3px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
}
.niyal-card-body { padding: 9px 2px 0; }
.niyal-card-title {
  display: block;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.niyal-card-title:hover { color: var(--nmui-accent, #e4422e); }
.niyal-card-artist {
  font-size: 12px;
  color: var(--nmui-muted, #8a8f98);
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.niyal-card-artist a { color: inherit; text-decoration: none; }
.niyal-card-artist a:hover { color: var(--nmui-accent, #e4422e); }
.niyal-card-artist .ft { opacity: .6; }

/* News cards — landscape with excerpt */
.niyal-grid-news { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.niyal-news .niyal-card-cover { aspect-ratio: 16 / 9; }
.niyal-news-excerpt { font-size: 13px; color: var(--nmui-muted, #8a8f98); margin-top: 5px; line-height: 1.5; }
.niyal-news-more { display: inline-block; margin-top: 7px; font-size: 12px; font-weight: 600; color: var(--nmui-accent, #e4422e); text-decoration: none; }

/* Load more */
.niyal-more-wrap { text-align: center; margin: 24px 0 6px; }
.niyal-more {
  border: none;
  cursor: pointer;
  padding: 11px 32px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--nmui-accent, #e4422e);
  box-shadow: var(--nmui-shadow-sm, 0 2px 8px rgba(0, 0, 0, .18));
  transition: transform .15s ease, filter .2s ease;
}
.niyal-more:hover { transform: translateY(-2px); filter: brightness(1.06); }
.niyal-more[hidden] { display: none; }
.niyal-more.is-loading { opacity: .65; pointer-events: none; }

/* Keep no-image cards after image cards even across AJAX load-more pages.
   CSS grid respects `order`, so DOM insertion order no longer matters. */
.niyal-grid > .niyal-card { order: 0; }
.niyal-grid > .niyal-card--noimg { order: 1; }

/* No-image placeholder: lettered accent gradient (instead of a repeated logo). */
.niyal-card-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(140deg, color-mix(in srgb, var(--nmui-accent, #e4422e) 24%, #262a35), #16181f);
}
.niyal-card-ph::before {
  content: attr(data-letter);
  font-size: 2.5rem;
  font-weight: 800;
  color: rgba(255, 255, 255, .9);
  font-family: var(--nmui-font, sans-serif);
  letter-spacing: -.02em;
}

/* Artists shown as circular avatars (Spotify/Smule style) */
.niyal-grid-round { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.niyal-grid-round .niyal-card-cover { border-radius: 50%; }
.niyal-grid-round .niyal-card-body { text-align: center; }
.niyal-grid-round .niyal-card-title,
.niyal-grid-round .niyal-card-artist { white-space: normal; }

/* Reduce the tall empty hero — compact, modern height + tighter overlap */
.lyric-home { min-height: 0 !important; }
.lyric-search { padding-top: 46px !important; padding-bottom: 78px !important; }
.lyric-search h1 { margin-bottom: 22px; }
.content-pull { margin-top: -56px; }
.niyal-section { margin: 4px 0 22px; }

/* Card grid on single-artist / single-album / archive pages */
.niyal-cards-section { margin: 18px 0 26px; }

/* Mobile */
@media (max-width: 600px) {
  .niyal-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; }
  .niyal-grid-round { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
  .niyal-grid-news { grid-template-columns: 1fr; }
  .niyal-card-title { font-size: 13px; }
  .niyal-card-play i { width: 40px; height: 40px; }
  .niyal-card-ph::before { font-size: 2rem; }
  .lyric-search { padding-top: 34px !important; padding-bottom: 60px !important; }
}