/* ============================================
   BSC UNIVERSAL ARTWORK SYSTEM (web) - 2026-11-02
   Paired with js/shared/bsc-artwork.js. The whole artwork stays visible;
   a dimmed copy of the same image (same URL - an HTTP cache hit) fills the
   space a mismatched shape leaves. Same navy dim (#0F172A at 65 %) as the
   mobile app's ArtworkBackdrop.dimmed.
   ============================================ */

/* <img>: the picture is contained; the element's own background (which
   only shows where the picture doesn't) is the backdrop. */
img.bsc-art-contain {
  object-fit: contain !important;
  object-position: center !important;
  background:
    linear-gradient(rgba(15, 23, 42, 0.65), rgba(15, 23, 42, 0.65)),
    var(--bsc-art) center / cover no-repeat,
    #0F172A !important;
}

/* background-image cards: whole art on top, then dim, then backdrop. */
.bsc-art-bg-contain {
  background:
    var(--bsc-art) center / contain no-repeat,
    linear-gradient(rgba(15, 23, 42, 0.65), rgba(15, 23, 42, 0.65)),
    var(--bsc-art) center / cover no-repeat,
    #0F172A !important;
}

/* ============================================
   DEFAULT AUDIO COVER (2026-11-18, Report 42) - faithful port of the
   approved mobile default music artwork (BscArtworkFallback in
   lib/global/artwork/content_artwork.dart). Do not restyle here without
   changing the mobile source of truth first.
   - diagonal gradient (top-left -> bottom-right) from the palette pair the
     JS picks deterministically (same seed as mobile);
   - accent-cyan (#00E5FF) music glyph at 60 % opacity;
   - with room (>= 120 x 90): glyph top-left, then title (13px, 700,
     line-height 1.2, 2 lines, soft white #F8FAFC) and creator (11px,
     1 line, slate grey #94A3B8) at the bottom; otherwise the glyph alone,
     centred. Sizes/padding are set by the JS (same clamps as mobile).
   ============================================ */
.bsc-default-cover-host {
  background-image: none !important;
}

.bsc-default-cover {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--bsc-cover-pad, 12px);
  background: linear-gradient(to bottom right, var(--bsc-cover-top, #0F172A), var(--bsc-cover-bottom, #0B3A53));
  overflow: hidden;
  pointer-events: none;
}

.bsc-default-cover__glyph {
  flex: none;
  width: var(--bsc-cover-glyph, 40px);
  height: var(--bsc-cover-glyph, 40px);
  fill: rgba(0, 229, 255, 0.6);
}

.bsc-default-cover__title,
.bsc-default-cover__creator {
  display: none;
}

.bsc-default-cover--text {
  align-items: flex-start;
  justify-content: flex-start;
}

.bsc-default-cover--text .bsc-default-cover__glyph {
  margin-bottom: auto; /* the mobile Spacer() between glyph and text */
}

.bsc-default-cover--text .bsc-default-cover__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  max-width: 100%;
  color: #F8FAFC;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  overflow-wrap: anywhere;
}

.bsc-default-cover--text .bsc-default-cover__creator {
  display: block;
  max-width: 100%;
  margin-top: 2px;
  color: #94A3B8;
  font-size: 11px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

/* Audio with custom artwork stays covered while playing because the
   <video poster> keeps showing for audio-only media; an artwork-less track
   has no poster, and the player state engine (js/video-player.js) hides the
   poster overlay on play. Keep the overlay visible ONLY while it hosts the
   default cover (audio without artwork - never video), in every state.
   It stays pointer-events:none and below the controls (z-index 5 < 10). */
.video-container .player-poster-overlay.bsc-default-cover-host,
.video-container #customPosterOverlay.bsc-default-cover-host,
.video-player-wrapper .player-poster-overlay.bsc-default-cover-host {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  z-index: 5 !important;
  pointer-events: none !important;
}
