/* =========================================
   MCJ — BASE TOKENS
   ========================================= */
.mcj-store {
  --white: var(--bricks-color-pjtzlr);
  --purple: var(--bricks-color-ujpclw);
  --purple-light: var(--bricks-color-izgnga);
  --card: var(--bricks-color-gpjgof, #1b1b1b);
  color: var(--white);
}

/* =========================================
   MCJ — HERO (refactored)
   - hero pinned to bottom
   - banner behind content
   - avatar/name bottom-left
   - follow bottom-right
   ========================================= */
#brxe-wnfnso.mcj-vednor-hero {
  position: relative;
  display: flex;
  flex-direction: column;     /* vertical stack */
  justify-content: flex-end;  /* push content down */
  min-height: 420px;          /* match overlay height */
  border-radius: 20px;
  overflow: hidden;
}

/* Banner wrapper lives behind everything */
#brxe-riurlj.brxe-mcj-store-hero {
  position: absolute;
  inset: 0;
  z-index: 0;                 /* background layer */
}

/* Inside banner: image below overlay */
#brxe-riurlj .mcj-store-hero__wrap    { position: absolute; inset: 0; }
#brxe-riurlj .mcj-store-hero__img     { position: absolute; inset: 0; z-index: 0; }
#brxe-riurlj .mcj-store-hero__overlay { position: absolute; inset: 0; z-index: 1; }

/* Builder-only: never show fallback bg if no URL */
body[data-builder-window] #brxe-riurlj .mcj-store-hero__img {
  background-image: none !important;
  background-color: transparent !important;
}

/* Foreground content (above overlay) */
#brxe-wnfnso > :not(#brxe-riurlj) {
  position: relative;
  z-index: 2;
}

/* Avatar + name row (bottom-left) */
#brxe-fklxib {

}

/* Follow wrapper pinned bottom-right */
.mcj-vednor-hero #brxe-enbvec {

}

/* Cancel any global absolute top-right on the button */
.mcj-vednor-hero .mcj-vendor-follow {
  position: static !important;
  margin: 0;
}

/* Optional cosmetics */
.mcj-artist-avatar { width:96px; height:96px; border-radius:999px; object-fit:cover; border:3px solid rgba(255,255,255,.2); }
.mcj-artist-name   { margin:0; font-size:32px; line-height:1.1; }

/* =========================================
   MCJ — HEADINGS / SECTIONS
   ========================================= */
.brxe-block.sub-heading { margin: 22px 0 12px; }
.brxe-block.sub-heading .brxe-heading { color: var(--white); }

/* =========================================
   MCJ — GENRE CHIPS
   ========================================= */
.mcj-hero-namewrap { display:flex; flex-direction:column; gap:4px; }
.mcj-artist-genre  { font-size:14px; opacity:.85; }

.mcj-vendor-genres .mcj-chip {
  display: inline-block;
  padding: var(--mcj-py,6px) var(--mcj-px,10px);
  border-radius: var(--mcj-radius,999px);
  font-size: var(--mcj-fs,12px);
  font-weight: var(--mcj-fw,500);
  background: var(--mcj-chip-bg, rgba(255,255,255,.08));
  color: var(--mcj-chip-fg, #e5e5e5);
  border: 1px solid var(--mcj-chip-bd, rgba(255,255,255,.15));
  text-decoration: none;
  line-height: 1;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .06s ease;
}
.mcj-vendor-genres .mcj-chip:hover,
.mcj-vendor-genres .mcj-chip:focus {
  background: var(--mcj-chip-bg-h, rgba(255,255,255,.15));
  color: var(--mcj-chip-fg-h, #fff);
  border-color: var(--mcj-chip-bd-h, rgba(255,255,255,.3));
  transform: translateY(-1px);
}
.mcj-vendor-genres .mcj-chip:active { transform: translateY(0); }

/* =========================================
   MCJ — TRACKS TABLE
   ========================================= */
.mcj-tracks { width: 100%; }

.mcj-song-table {
  border-radius: 16px;
  overflow: hidden;
}

.mcj-song-row {
  display: grid;
  grid-template-columns: 72px 1fr 140px;
  gap: 16px;
  align-items: center;
  padding: 12px 16px;
  background: var(--card);
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.mcj-art-wrap {
  position: relative;
  width: 56px; height: 56px;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}
.mcj-art-wrap img { width: 100%; height: 100%; object-fit: cover; }

.mcj-play-btn {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 36px; height: 36px;
  border-radius: 999px; border: 0;
  background: transparent; color: #fff; cursor: pointer;
}
.mcj-play-btn i { font-size: 28px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)); }

.col.col-titlemeta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mcj-song-title { font-weight: 600; }
.mcj-sep        { opacity: .5; }
.mcj-song-album { opacity: .85; }

.col.col-buy .button {
  background: var(--purple);
  color: #fff;
  border-radius: 999px;
  padding: 8px 14px;
}

/* In-cart state (if you show one) */
.mcj-in-cart {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #1e8e3e;
}

/* =========================================
   MCJ — VIDEOS (list/grid + panel)
   ========================================= */
.mcj-video-section {
  background: var(--card);
  border-radius: 12px;
  padding: 14px;
}

/* 2-col layout (sidebar list + player) */
.mcj-video-layout {
  display: grid;
  gap: 20px;
  width: 100%;
}
@media (min-width: 1024px) {
  .mcj-video-layout {
    grid-template-columns: 280px 1fr;
    align-items: start;
  }
}

/* Grid variant (cards + player) */
.mcj-video-layout-grid {
  display: grid;
  gap: 20px;
}
@media (min-width: 1024px) {
  .mcj-video-layout-grid {
    grid-template-columns: 1fr 480px;
    align-items: start;
  }
}

/* Playlist (left sidebar) */
.mcj-video-list {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18) inset;
}
@media (min-width: 1024px) {
  .mcj-video-list {
    max-height: calc(100vh - var(--mcj-scroll-pad, 140px) - 40px);
    overflow: auto;
  }
}
.mcj-genre-empty { opacity: .65; }

/* Playlist rows */
.mcj-video-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  cursor: pointer;
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.mcj-video-row:hover  { background: rgba(255,255,255,.06); transform: translateY(-1px); }
.mcj-video-row:focus  { outline: 2px solid rgba(255,255,255,.35); outline-offset: 2px; }
.mcj-video-row.is-active {
  background: var(--bricks-color-uleqzb);
  border-color: rgba(255,255,255,.25);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  position: relative;
}
.mcj-video-row.is-active::before {
  content: "";
  position: absolute; inset: 0 auto 0 0; width: 4px;
  border-radius: 10px 0 0 10px;
  background: linear-gradient(180deg, #fff, rgba(255,255,255,.5));
}
.mcj-video-icon { font-size: 16px; width: 18px; text-align: center; color: var(--white); opacity: .9; }
.mcj-video-row.is-active .mcj-video-icon { color: #fff; opacity: 1; }
.mcj-video-title-text {
  font-weight: 600; font-size: 15px; line-height: 1.2; color: var(--white);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}

/* Player */
.mcj-video-panel-wrap { min-width: 0; }

#mcj-video-panel {
  width: 100%;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  box-shadow: 0 18px 40px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.05);
  padding: 10px;
  opacity: 0; transform: translateY(-6px);
  transition: opacity .25s ease, transform .25s ease;
  will-change: transform, opacity;
  contain: layout;
}
#mcj-video-panel.is-open { opacity: 1; transform: translateY(0); }

@media (min-width: 1024px) {
  #mcj-video-panel.is-sticky { position: sticky; top: var(--mcj-scroll-pad, 140px); }
}

.mcj-video-shell      { position: relative; border-radius: 12px; overflow: hidden; }
.mcj-video-aspect     { position: relative; width: 100%; aspect-ratio: 16/9; background: #000; border-radius: 12px; background-size: cover; background-position: center; }
#mcj-video-slot iframe,
#mcj-video-slot video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }

.mcj-video-meta {
  position: absolute; left: 10px; right: 10px; top: 10px;
  padding: 6px 10px; border-radius: 10px;
  background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(6px);
}
#mcj-video-title { margin: 0; font-size: 15px; line-height: 1.2; font-weight: 700; }

.mcj-video-close {
  position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 999px;
  background: rgba(0,0,0,.6); color: #fff; border: 1px solid rgba(255,255,255,.15);
  font-size: 22px; line-height: 36px; text-align: center; cursor: pointer;
}

/* Docked mini player */
#mcj-video-panel.is-docked {
  position: fixed;
  bottom: 16px; right: 16px;
  top: auto !important; left: auto !important;
  z-index: 1000;
  max-width: min(420px, 92vw);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
  margin: 0;
}
#mcj-video-panel.is-docked .mcj-video-meta { display: none; }

/* Sentinel/scroll helpers */
.mcj-video-placeholder { width: 100%; height: 0; } /* JS sets height */
html { scroll-padding-top: var(--mcj-scroll-pad, 140px); }
#mcj-video-panel { scroll-margin-top: var(--mcj-scroll-pad, 140px); }

/* A11y / motion */
@media (prefers-reduced-motion: reduce) {
  #mcj-video-panel { transition: none; transform: none !important; }
  .mcj-video-row  { transition: none; }
}

/* Cards grid (used in grid variant) */
.mcj-video-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.mcj-video-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px;
  padding: 10px;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.mcj-video-card:hover { transform: translateY(-2px); background: rgba(255,255,255,.06); }
.mcj-video-card:focus { outline: 2px solid rgba(255,255,255,.35); outline-offset: 2px; }
.mcj-video-card.is-active { border-color: rgba(255,255,255,.25); box-shadow: 0 6px 18px rgba(0,0,0,.25); }

.mcj-video-thumb {
  aspect-ratio: 16/9;
  border-radius: 10px;
  background: #000 center/cover no-repeat;
  position: relative;
  overflow: hidden;
  margin-bottom: 8px;
}
.mcj-video-thumb-icon {
  position: absolute; inset: 0; margin: auto; width: 48px; height: 48px;
  display: grid; place-items: center; font-size: 28px; color: #fff; opacity: .9;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,.5));
}
.mcj-video-card-title { font-weight: 600; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }


/* If the video panel is open, don't let a lazy wrapper keep it invisible */
.mcj-video-section #mcj-video-panel.is-open {
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}


/* MCJ video hotfix – ensure the player has height and fills it */
.mcj-video-aspect { position: relative; width: 100%; background:#000; border-radius:12px; }
.mcj-video-aspect::before { content:""; display:block; padding-top:56.25%; } /* 16:9 fallback */
#mcj-video-slot, #mcj-video-slot > * { position:absolute; inset:0; width:100%; height:100%; display:block; border:0; }
