/* BuddySocial v10.16 - Stream Pro + branding/embed */

.profile-player .pp-brand{
  flex:0 0 auto;display:flex;align-items:center;gap:5px;max-width:105px;
  padding:3px 5px;border-right:1px solid rgba(255,255,255,.12)
}
.profile-player .pp-brand img{width:28px;height:28px;object-fit:contain;border-radius:5px;background:rgba(255,255,255,.88)}
.profile-player .pp-brand span{max-width:68px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--player-text,#fff);font-size:8px;font-weight:800}
.profile-player .pp-stream-info{
  margin-top:3px;display:flex;align-items:center;gap:4px;overflow:hidden;white-space:nowrap
}
.profile-player .pp-stream-info[hidden]{display:none!important}
.profile-player .pp-stream-info span{
  display:inline-flex;align-items:center;min-width:0;padding:1px 4px;border-radius:999px;
  background:rgba(0,0,0,.16);color:var(--player-text,#fff);font-size:7px;line-height:1.25;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap
}
.profile-player .pp-stream-info [data-psi-song]{max-width:190px}
.profile-player .pp-track{position:relative}
.profile-player .pp-track-live-meta{
  display:block;grid-column:1/-1;margin-left:22px;margin-top:1px;color:inherit;opacity:.72;font-size:7px;font-style:normal
}
.profile-player .pp-track-live-meta[hidden]{display:none!important}

.player-branding-studio{margin-top:12px;border:1px solid #b9cfdd;background:#f8fbfd}
.player-branding-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 10px;background:linear-gradient(180deg,#eaf5fb,#dbeef8);border-bottom:1px solid #b9cfdd}
.player-branding-head b,.player-branding-head small{display:block}.player-branding-head b{color:#285f86}.player-branding-head small{margin-top:2px;color:#6a8191}
.player-branding-head>span{padding:3px 6px;border-radius:999px;background:#eaf8ee;border:1px solid #a9d0b3;color:#3d7749;font-size:8px;font-weight:900}
.player-branding-grid{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);gap:10px;padding:10px}
.player-branding-form,.player-embed-builder{padding:9px;border:1px solid #d0dfe8;background:#fff}
.player-brand-logo-preview{display:flex;align-items:center;gap:8px;padding:6px;background:#f6fafc;border:1px solid #d7e4eb}
.player-brand-logo-preview img{width:72px;height:48px;object-fit:contain;background:#fff;border:1px solid #d7e4eb}
.player-embed-builder>b{display:block;color:#2a5d80;font-size:11px}.player-embed-builder p,.player-embed-builder small{color:#6b8190;line-height:1.45}
.player-embed-builder textarea{width:100%;min-height:108px;box-sizing:border-box;padding:8px;border:1px solid #b9cfdd;background:#f8fbfd;color:#29485d;font:9px/1.45 Consolas,monospace;resize:vertical}
.player-embed-actions{display:flex;gap:6px;flex-wrap:wrap;margin:7px 0}
@media(max-width:800px){.player-branding-grid{grid-template-columns:1fr}.profile-player .pp-brand{max-width:78px}.profile-player .pp-brand span{display:none}.profile-player .pp-stream-info [data-psi-genre],.profile-player .pp-stream-info [data-psi-source]{display:none!important}}

/* ==========================================================
   BuddySocial v10.18 - ALL PLAYERS COMPACT + STABLE
   Voorkomt layout-jump bij binnenkomende streammetadata.
   ========================================================== */

.profile-player.profile-playlist{
  box-sizing:border-box !important;
  width:min(100%,460px) !important;
  max-width:460px !important;
  min-width:0 !important;
  margin-left:auto !important;
  margin-right:auto !important;
  overflow:hidden !important;
  contain:layout paint !important;
}

/* All direct player areas must be shrinkable. */
.profile-player.profile-playlist > *,
.profile-player.profile-playlist .pp-main,
.profile-player.profile-playlist .pp-now,
.profile-player.profile-playlist .pp-bottomline{
  min-width:0 !important;
  box-sizing:border-box !important;
}

.profile-player.profile-playlist .pp-controls{
  flex:0 0 auto !important;
  gap:4px !important;
}

.profile-player.profile-playlist .pp-controls button{
  width:30px !important;
  min-width:30px !important;
  height:30px !important;
  min-height:30px !important;
  padding:0 !important;
  border-radius:7px !important;
  line-height:1 !important;
}

.profile-player.profile-playlist .pp-play{
  width:34px !important;
  min-width:34px !important;
  height:34px !important;
  min-height:34px !important;
}

/* Fixed one-line now playing row */
.profile-player.profile-playlist .pp-now{
  height:24px !important;
  min-height:24px !important;
  max-height:24px !important;
  display:flex !important;
  align-items:center !important;
  gap:4px !important;
  overflow:hidden !important;
}

.profile-player.profile-playlist .pp-title{
  flex:1 1 auto !important;
  min-width:0 !important;
  max-width:100% !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
  line-height:24px !important;
  font-size:10px !important;
}

.profile-player.profile-playlist .pp-live-badge,
.profile-player.profile-playlist .pp-listeners,
.profile-player.profile-playlist .pp-trackno{
  flex:0 0 auto !important;
  white-space:nowrap !important;
}

.profile-player.profile-playlist .pp-live-badge{
  padding:2px 5px !important;
  font-size:7px !important;
  line-height:1 !important;
}

.profile-player.profile-playlist .pp-listeners{
  padding:2px 5px !important;
  font-size:7.5px !important;
  line-height:1 !important;
}

.profile-player.profile-playlist .pp-trackno{
  font-size:7px !important;
  opacity:.78 !important;
}

/* Stable progress/equalizer area */
.profile-player.profile-playlist .pp-progress{
  height:5px !important;
  min-height:5px !important;
  margin:3px 0 !important;
}

.profile-player.profile-playlist .pp-eq{
  height:16px !important;
  min-height:16px !important;
  max-height:16px !important;
  overflow:hidden !important;
}

.profile-player.profile-playlist .pp-bottomline{
  min-height:25px !important;
  max-height:25px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:7px !important;
  overflow:hidden !important;
}

.profile-player.profile-playlist .pp-time{
  flex:0 0 auto !important;
  font-size:7.5px !important;
  white-space:nowrap !important;
}

.profile-player.profile-playlist .pp-volume-inline{
  min-width:0 !important;
  max-width:120px !important;
  display:flex !important;
  align-items:center !important;
  gap:4px !important;
}

.profile-player.profile-playlist .pp-mute{
  width:24px !important;
  min-width:24px !important;
  height:24px !important;
  min-height:24px !important;
  padding:0 !important;
}

.profile-player.profile-playlist .pp-volume{
  min-width:55px !important;
  max-width:88px !important;
}

/* Reserve the metadata line from the start for live streams.
   This prevents the player from 'popping' taller after fetch. */
.profile-player.profile-playlist.is-live .pp-stream-info{
  display:flex !important;
  align-items:center !important;
  gap:3px !important;
  width:100% !important;
  height:19px !important;
  min-height:19px !important;
  max-height:19px !important;
  margin-top:2px !important;
  overflow:hidden !important;
  white-space:nowrap !important;
  visibility:visible !important;
}

.profile-player.profile-playlist.is-live .pp-stream-info[hidden]{
  display:flex !important;
  visibility:hidden !important;
}

.profile-player.profile-playlist:not(.is-live) .pp-stream-info{
  display:none !important;
}

.profile-player.profile-playlist .pp-stream-info span{
  flex:0 0 auto !important;
  max-width:105px !important;
  min-width:0 !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
  padding:1px 4px !important;
  font-size:6.8px !important;
  line-height:14px !important;
}

.profile-player.profile-playlist .pp-stream-info [data-psi-song]{
  flex:1 1 auto !important;
  max-width:none !important;
}

.profile-player.profile-playlist .pp-stream-info [data-psi-source],
.profile-player.profile-playlist .pp-stream-info [data-psi-genre]{
  max-width:72px !important;
}

/* Branding stays inside the player and never forces it wider. */
.profile-player.profile-playlist .pp-brand{
  flex:0 0 72px !important;
  width:72px !important;
  max-width:72px !important;
  min-width:72px !important;
  overflow:hidden !important;
  padding:3px 4px !important;
  box-sizing:border-box !important;
}

.profile-player.profile-playlist .pp-brand img{
  width:25px !important;
  height:25px !important;
  min-width:25px !important;
  object-fit:contain !important;
}

.profile-player.profile-playlist .pp-brand span{
  flex:1 1 auto !important;
  min-width:0 !important;
  max-width:36px !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
  font-size:7px !important;
}

/* Playlist: compact rows, no expansion from fetched metadata. */
.profile-player.profile-playlist .pp-list-toggle{
  min-height:27px !important;
  padding:4px 8px !important;
  font-size:8px !important;
}

.profile-player.profile-playlist .pp-playlist-list{
  max-height:210px !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
}

.profile-player.profile-playlist .pp-track{
  min-height:32px !important;
  max-height:42px !important;
  padding:5px 7px !important;
  overflow:hidden !important;
  box-sizing:border-box !important;
}

.profile-player.profile-playlist .pp-track > b{
  min-width:0 !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
}

.profile-player.profile-playlist .pp-track-live-meta{
  display:block !important;
  max-width:100% !important;
  margin:1px 0 0 21px !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
  font-size:6.7px !important;
  line-height:1.1 !important;
}

/* Visual/vinyl skins must also remain within the compact shell. */
.profile-player.profile-playlist .pp-vinyl-wrap{
  flex:0 0 auto !important;
  max-width:66px !important;
  overflow:hidden !important;
}

.profile-player.profile-playlist .pp-vinyl{
  max-width:58px !important;
  max-height:58px !important;
}

/* Keep effects decorative, never layout-driving. */
.profile-player.profile-playlist::before,
.profile-player.profile-playlist::after{
  pointer-events:none !important;
}

/* Narrower mini skin */
.profile-player.profile-playlist.player-mini{
  width:min(100%,390px) !important;
  max-width:390px !important;
}

/* Make visually heavy skins compact too */
.profile-player.profile-playlist:is(
  .player-winamp,
  .player-cassette,
  .player-jukebox,
  .player-vinyl,
  .player-rgbbeat,
  .player-neon,
  .player-rainbow,
  .player-galaxy,
  .player-hologram
){
  max-width:460px !important;
}

/* Mobile: use available width, but keep inner rows tight. */
@media(max-width:560px){
  .profile-player.profile-playlist{
    width:100% !important;
    max-width:100% !important;
  }

  .profile-player.profile-playlist .pp-brand{
    flex-basis:40px !important;
    width:40px !important;
    min-width:40px !important;
    max-width:40px !important;
  }

  .profile-player.profile-playlist .pp-brand span{
    display:none !important;
  }

  .profile-player.profile-playlist .pp-stream-info [data-psi-source],
  .profile-player.profile-playlist .pp-stream-info [data-psi-genre],
  .profile-player.profile-playlist .pp-stream-info [data-psi-bitrate]{
    display:none !important;
  }

  .profile-player.profile-playlist .pp-stream-info span{
    max-width:82px !important;
  }

  .profile-player.profile-playlist .pp-stream-info [data-psi-song]{
    max-width:none !important;
  }

  .profile-player.profile-playlist .pp-volume-inline{
    max-width:95px !important;
  }
}

/* BuddySocial v10.19 - slightly wider players */
.profile-player.profile-playlist{
  width:min(100%,540px) !important;
  max-width:540px !important;
}

.profile-player.profile-playlist.player-mini{
  width:min(100%,440px) !important;
  max-width:440px !important;
}

.profile-player.profile-playlist:is(
  .player-winamp,
  .player-cassette,
  .player-jukebox,
  .player-vinyl,
  .player-rgbbeat,
  .player-neon,
  .player-rainbow,
  .player-galaxy,
  .player-hologram
){
  max-width:540px !important;
}

/* Give now-playing text a little more breathing room */
.profile-player.profile-playlist .pp-stream-info [data-psi-song]{
  max-width:none !important;
}

@media(max-width:600px){
  .profile-player.profile-playlist,
  .profile-player.profile-playlist.player-mini{
    width:100% !important;
    max-width:100% !important;
  }
}

/* BuddySocial v10.20 - players 85% centered */
.profile-player.profile-playlist{
  width:85% !important;
  max-width:none !important;
  margin-left:auto !important;
  margin-right:auto !important;
}

.profile-player.profile-playlist.player-mini{
  width:85% !important;
  max-width:none !important;
  margin-left:auto !important;
  margin-right:auto !important;
}

.profile-player.profile-playlist:is(
  .player-winamp,
  .player-cassette,
  .player-jukebox,
  .player-vinyl,
  .player-rgbbeat,
  .player-neon,
  .player-rainbow,
  .player-galaxy,
  .player-hologram
){
  width:85% !important;
  max-width:none !important;
  margin-left:auto !important;
  margin-right:auto !important;
}

@media(max-width:700px){
  .profile-player.profile-playlist,
  .profile-player.profile-playlist.player-mini{
    width:100% !important;
    max-width:100% !important;
  }
}

/* ==========================================================
   BuddySocial v10.21 - MOBILE PLAYER REFINE
   Desktop blijft v10.20. Alleen mobiele player-layout.
   ========================================================== */

@media(max-width:700px){
  .profile-player.profile-playlist{
    width:calc(100% - 12px) !important;
    max-width:calc(100% - 12px) !important;
    margin:6px auto !important;
    border-radius:9px !important;
    overflow:hidden !important;
  }

  .profile-player.profile-playlist .pp-main{
    display:grid !important;
    grid-template-columns:auto minmax(0,1fr) !important;
    gap:6px !important;
    align-items:center !important;
    padding:6px !important;
  }

  .profile-player.profile-playlist .pp-brand{
    grid-row:1 / span 2 !important;
    align-self:stretch !important;
    flex-basis:auto !important;
    width:42px !important;
    min-width:42px !important;
    max-width:42px !important;
    padding:3px !important;
    border-right:1px solid rgba(255,255,255,.12) !important;
  }

  .profile-player.profile-playlist .pp-brand img{
    width:34px !important;
    height:34px !important;
    max-width:34px !important;
  }

  .profile-player.profile-playlist .pp-brand span{
    display:none !important;
  }

  .profile-player.profile-playlist .pp-now{
    grid-column:2 !important;
    width:100% !important;
    height:23px !important;
    min-height:23px !important;
    max-height:23px !important;
    gap:3px !important;
  }

  .profile-player.profile-playlist .pp-title{
    font-size:9px !important;
    line-height:23px !important;
  }

  .profile-player.profile-playlist .pp-live-badge,
  .profile-player.profile-playlist .pp-listeners,
  .profile-player.profile-playlist .pp-trackno{
    font-size:6.8px !important;
    padding:2px 4px !important;
  }

  .profile-player.profile-playlist .pp-controls{
    grid-column:2 !important;
    display:flex !important;
    align-items:center !important;
    justify-content:flex-start !important;
    gap:4px !important;
    width:100% !important;
    overflow:hidden !important;
  }

  .profile-player.profile-playlist .pp-controls button{
    width:28px !important;
    min-width:28px !important;
    height:28px !important;
    min-height:28px !important;
    border-radius:6px !important;
    font-size:11px !important;
  }

  .profile-player.profile-playlist .pp-play{
    width:32px !important;
    min-width:32px !important;
    height:32px !important;
    min-height:32px !important;
  }

  .profile-player.profile-playlist .pp-progress{
    margin:3px 6px !important;
    height:5px !important;
    min-height:5px !important;
  }

  .profile-player.profile-playlist .pp-eq{
    margin:0 6px !important;
    height:13px !important;
    min-height:13px !important;
    max-height:13px !important;
  }

  .profile-player.profile-playlist .pp-bottomline{
    display:grid !important;
    grid-template-columns:auto minmax(80px,1fr) !important;
    gap:6px !important;
    align-items:center !important;
    min-height:28px !important;
    max-height:none !important;
    padding:3px 6px 5px !important;
    overflow:visible !important;
  }

  .profile-player.profile-playlist .pp-time{
    font-size:7px !important;
  }

  .profile-player.profile-playlist .pp-volume-inline{
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
  }

  .profile-player.profile-playlist .pp-volume{
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
  }

  .profile-player.profile-playlist .pp-mute{
    width:24px !important;
    min-width:24px !important;
    height:24px !important;
    min-height:24px !important;
  }

  /* Stable single metadata row on mobile. */
  .profile-player.profile-playlist.is-live .pp-stream-info{
    height:18px !important;
    min-height:18px !important;
    max-height:18px !important;
    margin:2px 6px 4px !important;
    gap:3px !important;
    overflow:hidden !important;
  }

  .profile-player.profile-playlist .pp-stream-info span{
    max-width:72px !important;
    padding:1px 3px !important;
    font-size:6.2px !important;
    line-height:13px !important;
  }

  .profile-player.profile-playlist .pp-stream-info [data-psi-song]{
    flex:1 1 auto !important;
    max-width:none !important;
  }

  .profile-player.profile-playlist .pp-stream-info [data-psi-station]{
    max-width:82px !important;
  }

  .profile-player.profile-playlist .pp-stream-info [data-psi-bitrate],
  .profile-player.profile-playlist .pp-stream-info [data-psi-genre],
  .profile-player.profile-playlist .pp-stream-info [data-psi-source]{
    display:none !important;
  }

  /* Keep listener count because that is the most useful extra info on mobile. */
  .profile-player.profile-playlist .pp-stream-info [data-psi-listeners]{
    display:inline-flex !important;
    max-width:60px !important;
  }

  .profile-player.profile-playlist .pp-list-toggle{
    width:calc(100% - 12px) !important;
    margin:3px 6px 0 !important;
    min-height:29px !important;
    border-radius:6px !important;
  }

  .profile-player.profile-playlist .pp-playlist-list{
    max-height:170px !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    -webkit-overflow-scrolling:touch !important;
  }

  .profile-player.profile-playlist .pp-track{
    min-height:34px !important;
    max-height:40px !important;
    padding:5px 7px !important;
  }

  .profile-player.profile-playlist .pp-track > b{
    font-size:8px !important;
  }

  .profile-player.profile-playlist .pp-track-live-meta{
    margin-left:20px !important;
    max-width:calc(100% - 24px) !important;
    font-size:6.2px !important;
  }

  /* Visual skins */
  .profile-player.profile-playlist .pp-vinyl-wrap{
    max-width:52px !important;
  }

  .profile-player.profile-playlist .pp-vinyl{
    width:48px !important;
    height:48px !important;
    max-width:48px !important;
    max-height:48px !important;
  }
}

/* Extra-small phones */
@media(max-width:390px){
  .profile-player.profile-playlist{
    width:calc(100% - 8px) !important;
    max-width:calc(100% - 8px) !important;
    margin:4px auto !important;
  }

  .profile-player.profile-playlist .pp-main{
    padding:5px !important;
    gap:4px !important;
  }

  .profile-player.profile-playlist .pp-brand{
    width:36px !important;
    min-width:36px !important;
    max-width:36px !important;
  }

  .profile-player.profile-playlist .pp-brand img{
    width:30px !important;
    height:30px !important;
  }

  .profile-player.profile-playlist .pp-controls{
    gap:3px !important;
  }

  .profile-player.profile-playlist .pp-controls button{
    width:26px !important;
    min-width:26px !important;
    height:26px !important;
    min-height:26px !important;
  }

  .profile-player.profile-playlist .pp-play{
    width:30px !important;
    min-width:30px !important;
    height:30px !important;
    min-height:30px !important;
  }

  .profile-player.profile-playlist .pp-listeners{
    max-width:52px !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
  }

  .profile-player.profile-playlist .pp-trackno{
    display:none !important;
  }

  .profile-player.profile-playlist .pp-stream-info [data-psi-station]{
    display:none !important;
  }
}
