/* ==========================================================================
   BeatsHouse — Beats Library v2 Visual Layer
   Scoped to .bh-v2 modifier. Loaded after beats-page.css.
   Layout: horizontal rows (cover | info | actions). No card grid.
   ========================================================================== */

.bh-library-v3.bh-v2 {
  --bh-v2-amber:        #C8FF00;
  --bh-v2-amber-glow:   rgba(200,255,0,.22);
  --bh-v2-amber-dim:    rgba(200,255,0,.10);
  --bh-v2-amber-border: rgba(200,255,0,.38);
  --bh-v2-periw:        rgba(255,255,255,.06);
  --bh-v2-periw-b:      rgba(255,255,255,.12);
  --bh-v2-surface:      rgba(255,255,255,.03);
  --bh-v2-ease:         cubic-bezier(0.22,1,0.36,1);
}

/* ════════════════════════════════════════════════════════
   HEADER — editorial typography
   ════════════════════════════════════════════════════════ */

.bh-library-v3.bh-v2 .bh-picker-head__kicker {
  color: var(--bh-v2-amber);
  letter-spacing: .28em;
}

.bh-library-v3.bh-v2 .bh-picker-head__title {
  font: 800 clamp(28px,4.5vw,48px)/1 'Syne',system-ui,sans-serif !important;
  letter-spacing: -.03em;
  color: #F2EDE4;
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.bh-library-v3.bh-v2 .bh-count-display {
  font: 700 clamp(14px,2vw,18px)/1 'DM Mono',monospace;
  color: var(--bh-v2-amber);
  letter-spacing: .04em;
  opacity: .85;
}
.bh-library-v3.bh-v2 .bh-count-display::before {
  content: '/ ';
  color: rgba(255,255,255,.2);
}

/* ════════════════════════════════════════════════════════
   GENRE PILL STRIP
   ════════════════════════════════════════════════════════ */

.bh-library-v3.bh-v2 .bh-genre-pill-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 2px 14px;
  margin-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}
.bh-library-v3.bh-v2 .bh-genre-pill-strip::-webkit-scrollbar { display: none; }

.bh-library-v3.bh-v2 .bh-genre-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--bh-v2-periw);
  background: rgba(255,255,255,.04);
  color: rgba(242,237,228,.65);
  font: 600 10px/1 'Manrope',sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background .18s, border-color .18s, color .18s;
}
.bh-library-v3.bh-v2 .bh-genre-pill:hover {
  background: rgba(255,255,255,.07);
  border-color: var(--bh-v2-periw-b);
  color: #F2EDE4;
}
.bh-library-v3.bh-v2 .bh-genre-pill.is-active {
  background: var(--bh-v2-amber-dim);
  border-color: var(--bh-v2-amber-border);
  color: var(--bh-v2-amber);
}

/* ════════════════════════════════════════════════════════
   GENRE CARDS — amber active state
   ════════════════════════════════════════════════════════ */

.bh-library-v3.bh-v2 .bh-genre-card--catalog.is-active .bh-genre-card__cover {
  box-shadow: inset 0 0 0 2px var(--bh-v2-amber), 0 0 20px var(--bh-v2-amber-glow) !important;
}
.bh-library-v3.bh-v2 .bh-genre-card--catalog.is-active .bh-genre-card__title {
  color: var(--bh-v2-amber) !important;
}

/* ════════════════════════════════════════════════════════
   MAKERS PICKER — 2-row horizontal scroll
   ════════════════════════════════════════════════════════ */

.bh-library-v3.bh-v2 .js-bh-makers-picker .bh-genre-cards--catalog {
  display: grid !important;
  grid-template-rows: repeat(2, auto) !important;
  grid-auto-flow: column !important;
  grid-auto-columns: 86px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-width: none !important;
  gap: 8px !important;
  padding-bottom: 4px !important;
  -webkit-overflow-scrolling: touch !important;
}
.bh-library-v3.bh-v2 .js-bh-makers-picker .bh-genre-cards--catalog::-webkit-scrollbar { display: none; }
.bh-library-v3.bh-v2 .js-bh-makers-picker .bh-makers-section-head { display: none !important; }

/* ════════════════════════════════════════════════════════
   TRACK LIST — horizontal rows
   ════════════════════════════════════════════════════════ */

/* Panels are block containers — no grid override needed */
.bh-library-v3.bh-v2 .beats-panel {
  display: block;
}

.bh-library-v3.bh-v2 .track-row-container {
  padding: 0 !important;
  margin-bottom: 4px !important;
}

/* Row: horizontal flex — cover | info | actions */
.bh-library-v3.bh-v2 .track-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 16px !important;
  padding: 10px 16px 10px 10px !important;
  margin: 0 !important;
  border-radius: 0 !important;
  border: 1px solid rgba(255,255,255,.045) !important;
  background: rgba(255,255,255,.025) !important;
  transition: background .18s, border-color .18s, box-shadow .18s, transform .16s var(--bh-v2-ease) !important;
  min-height: 0 !important;
}

@media (hover: hover) and (pointer: fine) {
  .bh-library-v3.bh-v2 .track-row:hover {
    background: rgba(255,255,255,.045) !important;
    border-color: var(--bh-v2-periw-b) !important;
    transform: translateX(3px) !important;
    box-shadow: -3px 0 0 0 var(--bh-v2-amber), 0 4px 20px rgba(0,0,0,.35) !important;
  }
}

/* Active/playing — amber left accent */
.bh-library-v3.bh-v2 .track-row-container.is-card-playing .track-row {
  border-color: var(--bh-v2-amber-border) !important;
  background: var(--bh-v2-amber-dim) !important;
  box-shadow: -3px 0 0 0 var(--bh-v2-amber), 0 0 24px var(--bh-v2-amber-glow) !important;
  transform: none !important;
}

/* ════════════════════════════════════════════════════════
   COVER — square thumbnail, left-aligned
   ════════════════════════════════════════════════════════ */

.bh-library-v3.bh-library--neutral.bh-v2 .track-cover {
  width: 76px !important;
  height: 76px !important;
  flex-shrink: 0 !important;
  border-radius: 0 !important;
  overflow: hidden !important;
  position: relative !important;
  background: rgba(255,255,255,.07) !important;
  box-shadow: 0 2px 10px rgba(0,0,0,.4) !important;
  aspect-ratio: unset !important;
}

.bh-library-v3.bh-library--neutral.bh-v2 .track-cover img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  border-radius: 0 !important;
  transition: transform .4s var(--bh-v2-ease);
}

@media (hover: hover) and (pointer: fine) {
  .bh-library-v3.bh-v2 .track-row:hover .track-cover img {
    transform: scale(1.06);
  }
}

.bh-library-v3.bh-library--neutral.bh-v2 .track-cover::before { display: none !important; }

/* ════════════════════════════════════════════════════════
   TRACK INFO — middle column, flex: 1
   ════════════════════════════════════════════════════════ */

.bh-library-v3.bh-v2 .track-info {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  padding: 0 !important;
  gap: 4px !important;
  display: flex !important;
  flex-direction: column !important;
}

.bh-library-v3.bh-v2 .track-title {
  font: 700 14px/1.25 'Syne',system-ui,sans-serif !important;
  letter-spacing: -.01em !important;
  color: #F2EDE4 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  display: block !important;
  -webkit-line-clamp: unset !important;
}

/* Chips row */
.bh-library-v3.bh-v2 .track-chip--genre {
  background: var(--bh-v2-amber-dim) !important;
  border-color: rgba(200,255,0,.2) !important;
  color: rgba(200,255,0,.85) !important;
}

/* Producer credit row — visible in row layout */
.bh-library-v3.bh-v2 .track-sub { display: flex !important; }
.bh-library-v3.bh-v2 .track-sub--credits { display: flex !important; }

/* ════════════════════════════════════════════════════════
   TRACK RIGHT — action column, flex-shrink: 0
   ════════════════════════════════════════════════════════ */

.bh-library-v3.bh-v2 .track-right {
  flex-shrink: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  gap: 6px !important;
  padding: 0 !important;
  width: auto !important;
}

/* License pill */
.bh-library-v3.bh-v2 .bh-license-pill {
  border-radius: 0 !important;
  background: var(--bh-v2-amber-dim) !important;
  border-color: rgba(200,255,0,.22) !important;
  white-space: nowrap !important;
}
.bh-library-v3.bh-v2 .bh-license-pill:hover {
  background: rgba(200,255,0,.18) !important;
  border-color: var(--bh-v2-amber-border) !important;
  box-shadow: 0 0 12px var(--bh-v2-amber-glow) !important;
}
.bh-library-v3.bh-v2 .bh-license-pill .bh-lp-price {
  color: var(--bh-v2-amber) !important;
}

/* EQ bars amber */
.bh-library-v3.bh-v2 .bh-eq span { background: var(--bh-v2-amber) !important; }

/* Fav button */
.bh-library-v3.bh-v2 .bh-lib-fav:hover,
.bh-library-v3.bh-v2 .bh-lib-fav.is-active { color: var(--bh-v2-amber) !important; }

/* ════════════════════════════════════════════════════════
   PARA TI STRIP — same row style
   ════════════════════════════════════════════════════════ */

.bh-library-v3.bh-v2 .bh-vault-foryou {
  display: block !important;
  padding: 0 !important;
  margin-bottom: 20px !important;
}
.bh-library-v3.bh-v2 .bh-vault-foryou[data-dismissed="1"],
.bh-vault-foryou[data-dismissed="1"] {
  display: none !important;
}

/* ════════════════════════════════════════════════════════
   SECTION DIVIDER between foryou and beats list
   ════════════════════════════════════════════════════════ */

.bh-library-v3.bh-v2 .bh-vault-foryou + .beats-panel.active::before {
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200,255,0,.2), transparent);
  margin-bottom: 16px;
}

/* ════════════════════════════════════════════════════════
   MOBILE
   ════════════════════════════════════════════════════════ */

@media (max-width: 640px) {
  .bh-library-v3.bh-v2 .track-row {
    gap: 12px !important;
    padding: 8px 12px 8px 8px !important;
  }
  .bh-library-v3.bh-library--neutral.bh-v2 .track-cover {
    width: 60px !important;
    height: 60px !important;
  }
  .bh-library-v3.bh-v2 .track-title { font-size: 13px !important; }
  .bh-library-v3.bh-v2 .bh-genre-pill { height: 28px !important; padding: 0 12px !important; }
  .bh-library-v3.bh-v2 .js-bh-makers-picker .bh-genre-cards--catalog {
    grid-auto-columns: 65px !important;
  }
}

/* SPA stage: disable sticky */
#bh-home-app-stage .bh-library-v3.bh-v2 .search-modular-vault {
  position: relative !important;
  top: 0 !important;
}
