/* Phase 11.2: compact horizontal video. No styles applied to audio-only players. */
html body #playerHost:has(> #globalPlayer.mx-floating-video:not(.expanded)) {
  position:fixed!important;left:50%!important;right:auto!important;top:auto!important;
  bottom:var(--mx-pip-nav-offset,calc(96px + env(safe-area-inset-bottom,0px)))!important;
  transform:translateX(-50%)!important;box-sizing:border-box!important;
  width:min(430px,calc(100vw - 24px - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px)))!important;
  max-width:430px!important;min-width:0!important;height:auto!important;min-height:0!important;max-height:none!important;
  margin:0!important;padding:0!important;border:0!important;background:transparent!important;
  overflow:visible!important;box-shadow:none!important;z-index:3400!important;pointer-events:none!important;
}
html body #playerHost > #globalPlayer.mx-floating-video:not(.expanded) {
  position:relative!important;inset:auto!important;transform:none!important;
  display:grid!important;grid-template-columns:clamp(84px,26vw,112px) minmax(0,1fr)!important;
  align-items:center!important;gap:8px!important;box-sizing:border-box!important;
  width:100%!important;min-width:0!important;max-width:100%!important;
  height:auto!important;min-height:0!important;max-height:none!important;
  margin:0!important;padding:6px!important;background:#101923!important;
  border:1px solid #304253!important;border-radius:15px!important;
  overflow:hidden!important;box-shadow:0 10px 30px rgba(0,0,0,.45)!important;
  isolation:isolate!important;pointer-events:auto!important;
}
/* Preserve the exact existing media node and only its path. Chat, schedules,
   related content, old titles and extra buttons cannot appear in mini mode. */
html body #playerHost > #globalPlayer.mx-floating-video:not(.expanded) > :not([data-mx-mini-media-path],.mx-pip-controls),
html body #playerHost > #globalPlayer.mx-floating-video:not(.expanded) [data-mx-mini-media-path] > :not([data-mx-mini-media-path]) {
  display:none!important;
}
html body #playerHost > #globalPlayer.mx-floating-video:not(.expanded)::before,
html body #playerHost > #globalPlayer.mx-floating-video:not(.expanded)::after {content:none!important;display:none!important;}
html body #playerHost > #globalPlayer.mx-floating-video:not(.expanded) > [data-mx-mini-media-path] {
  grid-column:1!important;grid-row:1!important;width:100%!important;height:auto!important;aspect-ratio:16/9!important;
  position:relative!important;inset:auto!important;margin:0!important;padding:0!important;
  min-height:0!important;max-height:none!important;min-width:0!important;max-width:100%!important;
  overflow:hidden!important;border:0!important;border-radius:8px!important;background:#000!important;
  display:block!important;box-shadow:none!important;transform:none!important;
}
html body #playerHost > #globalPlayer.mx-floating-video:not(.expanded) [data-mx-mini-media-path] [data-mx-mini-media-path] {
  position:relative!important;inset:auto!important;display:block!important;transform:none!important;
  box-sizing:border-box!important;width:100%!important;height:100%!important;
  min-width:0!important;max-width:100%!important;min-height:0!important;max-height:100%!important;
  margin:0!important;padding:0!important;border:0!important;border-radius:0!important;
  background:#000!important;overflow:hidden!important;box-shadow:none!important;aspect-ratio:auto!important;
}
html body #playerHost > #globalPlayer.mx-floating-video:not(.expanded) :is(video#globalMedia,iframe#globalEmbed) {
  display:block!important;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;
  object-fit:contain!important;border:0!important;background:#000!important;
}
html body #playerHost > #globalPlayer.mx-floating-video:not(.expanded) > .mx-pip-controls {
  position:static!important;inset:auto!important;grid-column:2!important;grid-row:1!important;
  display:flex!important;flex-direction:row!important;align-items:center!important;gap:5px!important;
  width:100%!important;min-width:0!important;height:auto!important;margin:0!important;padding:0 1px 0 0!important;
  background:transparent!important;pointer-events:auto!important;transform:none!important;z-index:auto!important;
}
#playerHost #globalPlayer .mx-mini-video-copy {flex:1 1 0;min-width:0;display:flex;flex-direction:column;gap:4px;}
#playerHost #globalPlayer .mx-mini-video-copy strong {display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:1.2;color:#fff;}
#playerHost #globalPlayer .mx-mini-video-copy small {display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;line-height:1.2;color:#acb8c5;}
#playerHost #globalPlayer .mx-mini-video-copy .mx-mini-live {color:#ff1464;font-weight:700;}
html body #playerHost > #globalPlayer.mx-floating-video .mx-pip-controls button {
  flex:0 0 36px!important;display:grid!important;place-items:center!important;width:36px!important;min-width:36px!important;
  max-width:36px!important;height:36px!important;min-height:36px!important;padding:0!important;margin:0!important;
  border:1px solid #2a3c4f!important;border-radius:50%!important;color:#fff!important;background:#142634!important;
  font-size:20px!important;line-height:1!important;cursor:pointer!important;pointer-events:auto!important;
}
@media(max-width:360px){
  html body #playerHost > #globalPlayer.mx-floating-video:not(.expanded){gap:6px!important;grid-template-columns:84px minmax(0,1fr)!important;}
  html body #playerHost > #globalPlayer.mx-floating-video:not(.expanded) > .mx-pip-controls{gap:3px!important;}
  html body #playerHost > #globalPlayer.mx-floating-video:not(.expanded) .mx-pip-controls button{flex-basis:34px!important;min-width:34px!important;width:34px!important;max-width:34px!important;}
}
/* Explicit expansion restores the original detail panel, never a second player. */
html body:not(.auth-route) #playerHost.mx-video-overlay:has(> #globalPlayer.mx-floating-video.expanded) {
  position:fixed!important;inset:0!important;width:100%!important;max-width:100%!important;height:100dvh!important;max-height:100dvh!important;
  margin:0!important;padding:calc(12px + env(safe-area-inset-top,0px)) 12px calc(12px + env(safe-area-inset-bottom,0px))!important;
  transform:none!important;overflow-x:hidden!important;overflow-y:auto!important;overscroll-behavior:contain;
  background:rgba(6,10,16,.97)!important;pointer-events:auto!important;z-index:10000!important;
}
html body #playerHost.mx-video-overlay > #globalPlayer.mx-floating-video.expanded {
  position:relative!important;inset:auto!important;transform:none!important;display:block!important;width:min(960px,100%)!important;
  max-width:960px!important;height:auto!important;min-height:0!important;max-height:none!important;
  margin:0 auto!important;padding:8px!important;background:#0d141c!important;overflow:visible!important;pointer-events:auto!important;
}
html body #playerHost.mx-video-overlay > #globalPlayer.mx-floating-video.expanded .flutter-full-player {
  position:relative!important;inset:auto!important;transform:none!important;display:block!important;width:100%!important;height:auto!important;
  max-width:100%!important;max-height:none!important;margin:0!important;overflow:visible!important;pointer-events:auto!important;
}
html body #playerHost.mx-video-overlay > #globalPlayer.mx-floating-video.expanded .flutter-mini-player{display:none!important;}
html body #playerHost.mx-video-overlay > #globalPlayer.mx-floating-video.expanded .dedicated-player-nav {
  position:relative!important;inset:auto!important;display:flex!important;align-items:center!important;width:100%!important;
  min-height:56px!important;margin:0 0 8px!important;pointer-events:auto!important;
}
html body #playerHost.mx-video-overlay > #globalPlayer.mx-floating-video.expanded :is(.xtra-dedicated-stage,.player-video-wrap,.xtra-djmix-video-player,.xtra-djmix-video-stage) {
  position:relative!important;inset:auto!important;display:block!important;min-height:0!important;
  max-width:100%!important;margin:0 auto!important;background:#000!important;
}
html body #playerHost.mx-video-overlay > #globalPlayer.mx-floating-video.expanded :is(video#globalMedia,iframe#globalEmbed) {
  display:block!important;width:100%!important;height:auto!important;min-height:0!important;max-height:calc(100dvh - 120px)!important;
  aspect-ratio:16/9!important;object-fit:contain!important;position:relative!important;inset:auto!important;
  background:#000!important;margin:auto!important;
}
html body #playerHost.mx-video-overlay > #globalPlayer.mx-floating-video.expanded > .mx-pip-controls {
  position:sticky!important;bottom:0!important;display:flex!important;justify-content:flex-end!important;gap:8px!important;
  margin:8px 0 0!important;padding:8px!important;background:#101923!important;z-index:20!important;
}
html body #playerHost.mx-video-overlay > #globalPlayer.mx-floating-video.expanded .mx-mini-video-copy{display:none!important;}
html body #playerHost.mx-video-overlay > #globalPlayer.mx-floating-video.expanded video#globalMedia:fullscreen {width:100vw!important;height:100dvh!important;max-height:none!important;max-width:none!important;object-fit:contain!important;}
/* Existing authentication screens retain their established hidden-player policy. */
html body.auth-route #playerHost:has(> #globalPlayer.mx-floating-video){display:none!important;}
