/* ============================================================
   LiveLocalVibes — band Music & Video player (Oct 2026)
   Pairs with /js/media-player.js. Used on the band page, Explore Bands,
   Shows, the show page and the band + venue dashboards.
   Every class starts with "lm-" so nothing here touches existing layouts.
   Colors: dark theme, purple #A259FF, lime #DAFF8C for playing, pink only for errors.
   ============================================================ */
.lm-off { display: none !important; }

/* Band page section: a comfortable size on big screens */
.pf-media { max-width: 860px; }

/* ---------- Big player (stage) ---------- */
.lm-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #12121F; border: 1px solid #33334A; }
.lm-poster { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: #1C1C2E; cursor: pointer; color: #F1F0F6; }
.lm-poster-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lm-poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18, 18, 31, 0) 45%, rgba(18, 18, 31, .85)); }
.lm-poster-play { position: absolute; z-index: 1; left: 50%; top: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: #DAFF8C; color: #1C1C2E; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); transition: transform .15s; }
.lm-poster-play llv-icon { width: 34px; height: 34px; margin-left: 4px; }
.lm-poster-play llv-icon svg { fill: currentColor; }
.lm-poster:hover .lm-poster-play, .lm-poster:focus-visible .lm-poster-play { transform: scale(1.06); }
.lm-poster:focus-visible { outline: 3px solid #DAFF8C; outline-offset: -3px; }
.lm-poster-cap { position: absolute; z-index: 1; left: 14px; right: 14px; bottom: 12px; display: flex; align-items: center; gap: 8px; text-align: left; }
.lm-plat { flex-shrink: 0; width: 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: rgba(28, 28, 46, .8); color: #A259FF; }
.lm-plat llv-icon { width: 20px; height: 20px; }
.lm-poster-title { flex: 1; min-width: 0; font: 600 1rem/1.3 'Inter', system-ui, sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 6px rgba(0, 0, 0, .6); }
.lm-thumb-none { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(162, 89, 255, .35), #1C1C2E); color: #A259FF; }
.lm-thumb-none llv-icon { width: 40%; height: 40%; max-width: 64px; max-height: 64px; }
.lm-frame { position: absolute; inset: 0; background: #000; }
.lm-frame iframe, .lm-frame > div { position: absolute; inset: 0; width: 100% !important; height: 100% !important; border: 0; }
.lm-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #A259FF; }
.lm-loading llv-icon { width: 36px; height: 36px; }
.lm-cant { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 18px; text-align: center; background: #1C1C2E; color: #F1F0F6; }
.lm-cant > llv-icon { width: 36px; height: 36px; }
.lm-cant-text b { display: block; font-size: 1.05rem; }
.lm-cant-text span { display: block; color: #A9A6BC; font-size: .88rem; margin-top: 2px; }
.lm-cant-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid #3B3B52; color: #F1F0F6; font-weight: 600; text-decoration: none; }
.lm-cant-link llv-icon { width: 20px; height: 20px; }

/* ---------- Swipeable thumbnail row ---------- */
.lm-row { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
.lm-row::-webkit-scrollbar { display: none; }
.lm-card { flex: 0 0 168px; scroll-snap-align: start; display: block; padding: 0; text-align: left; background: #1E1E2E; border: 1px solid #33334A; border-radius: 12px; overflow: hidden; cursor: pointer; color: #F1F0F6; }
.lm-card.is-current { border-color: #DAFF8C; box-shadow: 0 0 0 1px #DAFF8C inset; }
.lm-card:focus-visible { outline: 2px solid #DAFF8C; outline-offset: 2px; }
.lm-card-thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: #12121F; }
.lm-card-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lm-card-play { position: absolute; right: 8px; bottom: 8px; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(28, 28, 46, .85); color: #DAFF8C; }
.lm-card-play llv-icon { width: 16px; height: 16px; margin-left: 2px; }
.lm-card-play llv-icon svg { fill: currentColor; }
.lm-card-text { display: block; padding: 8px 10px 10px; }
.lm-card-title { display: block; font: 600 .85rem/1.3 'Inter', system-ui, sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lm-card-sub { display: block; margin-top: 2px; font-size: .74rem; color: #B4B1C8; }

/* ---------- Buttons on band / show cards ---------- */
.lm-wrap { position: relative; display: flex; flex-direction: column; }
.lm-wrap > a { flex: 1; }
.lm-fab { position: absolute; z-index: 2; top: 10px; right: 10px; width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; padding: 0;
  border: 0; background: #DAFF8C; color: #1C1C2E; cursor: pointer; box-shadow: 0 6px 18px rgba(0, 0, 0, .4); transition: transform .15s; }
.lm-fab llv-icon { width: 22px; height: 22px; margin-left: 3px; }
.lm-fab llv-icon svg { fill: currentColor; }
.lm-fab:hover { transform: scale(1.06); }
.lm-fab:focus-visible { outline: 3px solid #A259FF; outline-offset: 2px; }
.lm-listen { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid rgba(218, 255, 140, .45);
  background: rgba(218, 255, 140, .08); color: #DAFF8C; font: 600 .85rem 'Inter', system-ui, sans-serif; cursor: pointer; white-space: nowrap; }
.lm-listen llv-icon { width: 18px; height: 18px; }
.lm-listen:hover { background: rgba(218, 255, 140, .16); }
.lm-listen:focus-visible { outline: 2px solid #DAFF8C; outline-offset: 2px; }

/* ---------- Sticky mini-player ---------- */
.lm-mini { position: fixed; z-index: 85; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); max-width: 560px; margin: 0 auto;
  display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 8px; border-radius: 16px; background: rgba(43, 43, 60, .97); border: 1px solid #3B3B52;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .5); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #F1F0F6; }
.lm-mini.is-playing { border-color: rgba(218, 255, 140, .5); }
.lm-mini-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; }
.lm-mini-thumb { flex-shrink: 0; width: 44px; height: 44px; border-radius: 10px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: #1C1C2E; color: #A259FF; }
.lm-mini-thumb img { width: 100%; height: 100%; object-fit: cover; }
.lm-mini-thumb llv-icon { width: 24px; height: 24px; }
.lm-mini-text { flex: 1; min-width: 0; }
.lm-mini-title { display: block; font: 600 .9rem/1.25 'Inter', system-ui, sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lm-mini-sub { display: block; font-size: .75rem; color: #A9A6BC; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lm-mini-btn { flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px; border: 0; background: none; display: flex; align-items: center; justify-content: center; color: #F1F0F6; cursor: pointer; }
.lm-mini-btn llv-icon { width: 24px; height: 24px; }
.lm-mini-btn:focus-visible { outline: 2px solid #DAFF8C; outline-offset: -2px; }
.lm-mini-btn[data-act="toggle"] llv-icon[name="play"] svg { fill: currentColor; }
.lm-mini-spacer { height: 80px; }
/* Pages with a bottom tab bar on phones: sit just above it */
@media (max-width: 768px) {
  html.has-tabbar .lm-mini, html.dash-app .lm-mini { bottom: calc(var(--tabbar-h, 64px) + 8px); }
}

/* ---------- Pop-up player: bottom sheet on phones, centered box on desktop ---------- */
html.lm-sheet-open, html.lm-sheet-open body { overflow: hidden; }
.lm-sheet-scrim { position: fixed; inset: 0; z-index: 96; display: flex; align-items: flex-end; justify-content: center; background: rgba(8, 8, 16, 0); transition: background .2s; }
.lm-sheet-scrim.is-open { background: rgba(8, 8, 16, .65); }
.lm-sheet-scrim.is-min { visibility: hidden; pointer-events: none; }   /* still playing in the mini-player */
.lm-sheet { width: 100%; max-height: 92vh; display: flex; flex-direction: column; background: #1C1C2E; border: 1px solid #33334A; border-bottom: 0; border-radius: 20px 20px 0 0;
  transform: translateY(100%); transition: transform .22s ease; padding-bottom: env(safe-area-inset-bottom, 0px); color: #F1F0F6; font-family: 'Inter', system-ui, sans-serif; }
.lm-sheet-scrim.is-open .lm-sheet { transform: none; }
.lm-sheet-head { position: relative; display: flex; align-items: center; gap: 10px; padding: 18px 8px 8px 16px; touch-action: none; }
.lm-grab { position: absolute; top: 7px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 999px; background: #3B3B52; }
.lm-sheet-id { flex: 1; min-width: 0; }
.lm-sheet-kicker { margin: 0; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #DAFF8C; }
.lm-sheet-title { margin: 2px 0 0; font: 400 1.9rem/1 'Bebas Neue', sans-serif !important; letter-spacing: .02em; color: #F1F0F6 !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lm-sheet-x { flex-shrink: 0; width: 48px; height: 48px; border-radius: 12px; border: 0; background: none; display: flex; align-items: center; justify-content: center; color: #F1F0F6; cursor: pointer; --llv-icon-color: #F1F0F6; }
.lm-sheet-x llv-icon { width: 24px; height: 24px; }
.lm-sheet-x:focus { outline: none; }
.lm-sheet-x:focus-visible { outline: 2px solid #DAFF8C; outline-offset: -4px; }
.lm-sheet-body { overflow-y: auto; padding: 4px 16px 18px; overscroll-behavior: contain; }
.lm-sheet-link { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; margin-top: 12px; border-radius: 12px; border: 1px solid #3B3B52; color: #F1F0F6; font-weight: 600; text-decoration: none; }
.lm-sheet-link llv-icon { width: 18px; height: 18px; }
@media (min-width: 769px) {
  .lm-sheet-scrim { align-items: center; padding: 24px; }
  .lm-sheet { max-width: 720px; border-radius: 20px; border-bottom: 1px solid #33334A; transform: translateY(16px) scale(.98); opacity: 0; transition: transform .2s, opacity .2s; }
  .lm-sheet-scrim.is-open .lm-sheet { transform: none; opacity: 1; }
  .lm-grab { display: none; }
}
@media (prefers-reduced-motion: reduce) { .lm-sheet, .lm-sheet-scrim, .lm-poster-play, .lm-fab { transition: none; } }

/* ---------- Pro audio clips (uploaded MP3s) in the big player ---------- */
.lm-frame--clip { background: radial-gradient(80% 90% at 20% 10%, rgba(162, 89, 255, .45), transparent 70%), #1C1C2E; }
.lm-clip { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 18px; color: #F1F0F6; text-align: center; }
.lm-clip > llv-icon { width: 44px; height: 44px; color: #DAFF8C; }
.lm-clip-title { margin: 0; font: 600 1rem/1.3 'Inter', system-ui, sans-serif; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lm-clip audio { width: 100%; max-width: 480px; height: 44px; }
