/* audio-player.css v1.0 — Globaler Fußzeilen-Player */
#bl-audio-player {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 2500;
  background: #10151f; border-top: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 -4px 24px rgba(0,0,0,.35);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  padding-left: 260px;  /* neben shared-sidenav */
  -webkit-transition: padding-left .28s ease; transition: padding-left .28s ease;
}

.blp-inner {
  display: flex; align-items: center; gap: 12px;
  max-width: 1100px; margin: 0 auto; padding: 9px 18px;
}
#bl-audio-player.collapsed .blp-inner { display: none; }

.blp-collapse {
  position: absolute; top: -26px; right: 18px;
  background: #10151f; border: 1px solid rgba(255,255,255,.12);
  border-bottom: none; color: rgba(255,255,255,.6);
  border-radius: 8px 8px 0 0; padding: 3px 12px; cursor: pointer;
  font-size: 12px; line-height: 1.4;
}
.blp-collapse:hover { color: #fff; }

.blp-btn {
  background: none; border: none; color: rgba(255,255,255,.8);
  font-size: 16px; cursor: pointer; padding: 4px 6px; border-radius: 6px;
  -webkit-transition: color .15s, background .15s; transition: color .15s, background .15s;
  flex-shrink: 0; line-height: 1;
}
.blp-btn:hover { color: #fff; background: rgba(255,255,255,.08); }
.blp-play { font-size: 18px; }

.blp-meta { min-width: 120px; max-width: 260px; overflow: hidden; flex-shrink: 0; }
.blp-title {
  font-size: 12.5px; color: #fff; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.blp-artist { font-size: 11px; color: rgba(255,255,255,.5); }

.blp-time { font-size: 11px; color: rgba(255,255,255,.5); flex-shrink: 0; min-width: 34px; text-align: center; }

.blp-seek { flex: 1; min-width: 80px; }
.blp-seek, .blp-vol {
  -webkit-appearance: none; appearance: none; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,.2); outline: none; cursor: pointer;
}
.blp-vol { width: 80px; flex-shrink: 0; }
.blp-seek::-webkit-slider-thumb, .blp-vol::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 13px; height: 13px;
  border-radius: 50%; background: #5b7fa6; cursor: pointer;
}
.blp-seek::-moz-range-thumb, .blp-vol::-moz-range-thumb {
  width: 13px; height: 13px; border: none; border-radius: 50%; background: #5b7fa6; cursor: pointer;
}
.blp-vol-icon { font-size: 13px; flex-shrink: 0; }

/* Body-Abstand, damit Player nichts überdeckt */
body { padding-bottom: 58px; }
body:has(#bl-audio-player.collapsed) { padding-bottom: 12px; }

@media (max-width: 860px) {
  #bl-audio-player { padding-left: 0; }
    .blp-vol, .blp-vol-icon { display: none; }
  .blp-meta { min-width: 80px; max-width: 130px; }
}

/* Theme: heller Modus */
html[data-theme="light"] #bl-audio-player {
  background: #ffffff; border-top-color: #d5dbe4;
}
html[data-theme="light"] .blp-title { color: #1c2333; }
html[data-theme="light"] .blp-btn { color: #5a6478; }
html[data-theme="light"] .blp-btn:hover { color: #1c2333; }
html[data-theme="light"] .blp-collapse { background: #fff; color: #5a6478; }

/* ── v2.0: SoundCloud Widget (versteckt, nur Steuerung sichtbar) ── */
.blp-sc-frame {
  /* [231] Für Mobile: nicht 1px/opacity:0 (blockiert Audio auf iOS),
     sondern voll dimensioniert und off-screen positioniert. */
  position: fixed; width: 300px; height: 150px;
  border: 0; left: -9999px; top: -9999px;
  pointer-events: none;
}
.blp-sc-link {
  font-size: 11px; color: rgba(255,255,255,.5); text-decoration: none;
  flex-shrink: 0; padding: 3px 8px; border: 1px solid rgba(255,255,255,.15);
  border-radius: 6px; white-space: nowrap;
}
.blp-sc-link:hover { color: #fff; border-color: rgba(255,255,255,.35); }
html[data-theme="light"] .blp-sc-link { color: #5a6478; border-color: #d5dbe4; }

/* ── v3.0: Playlist-Panel + Steuerbuttons ── */
.blp-btn.active { color: #4ade80; }
.blp-playlist-toggle {
  font-size: 12px !important; white-space: nowrap; padding: 5px 10px !important;
  border: 1px solid rgba(255,255,255,.15); border-radius: 6px;
}
.blp-panel {
  position: fixed; bottom: 58px; right: 0; width: 340px; max-width: 92vw;
  max-height: 60vh; background: #10151f; border: 1px solid rgba(255,255,255,.12);
  border-right: none; border-radius: 12px 0 0 0; box-shadow: -8px -8px 30px rgba(0,0,0,.4);
  transform: translateX(100%); transition: transform .28s ease; z-index: 2600;
  display: flex; flex-direction: column; overflow: hidden;
}
.blp-panel.open { transform: translateX(0); }
.blp-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,.1);
  /* Der Umschalter darf umbrechen und darf das Panel NICHT sprengen —
     vorher liefen die Playlist-Reiter seitlich aus dem Fenster heraus. */
  flex-wrap: wrap; min-width: 0;
}
/* Listen-Umschalter: zwei feste Reiter (Tracks, Likes) + Auswahlliste für die
   Playlisten. Reiter sind eckig und kompakt; die Playlisten stecken im
   Dropdown, damit auch 20+ Listen nicht aus dem Panel laufen. */
.blp-switch {
  display: flex; gap: 6px; align-items: center;
  flex-wrap: wrap; min-width: 0;
}
.blp-sw-btn {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.6);
  border-radius: 6px; padding: 5px 10px; font-size: 11.5px; font-weight: 600; cursor: pointer;
  white-space: nowrap; flex-shrink: 0; line-height: 1.3;
  transition: background .15s, color .15s, border-color .15s;
}
.blp-sw-btn:hover { background: rgba(255,255,255,.12); color: rgba(255,255,255,.9); }
.blp-sw-btn.active { background: #5b7fa6; border-color: #5b7fa6; color: #fff; }

/* Playlist-Auswahl */
.blp-pl-select-wrap { position: relative; min-width: 0; flex: 1 1 150px; max-width: 230px; }
.blp-pl-select {
  width: 100%; box-sizing: border-box;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.7); border-radius: 6px;
  padding: 5px 26px 5px 10px; font-size: 11.5px; font-weight: 600;
  cursor: pointer; appearance: none; -webkit-appearance: none;
  text-overflow: ellipsis; white-space: nowrap; overflow: hidden;
  transition: background .15s, color .15s, border-color .15s;
}
.blp-pl-select:hover { background: rgba(255,255,255,.12); color: rgba(255,255,255,.9); }
.blp-pl-select:focus { outline: none; border-color: #5b7fa6; }
.blp-pl-select.active { background: #5b7fa6; border-color: #5b7fa6; color: #fff; }
/* eigener Pfeil (appearance:none entfernt den systemeigenen) */
.blp-pl-select-wrap::after {
  content: '▾'; position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
  pointer-events: none; font-size: 10px; color: rgba(255,255,255,.6);
}
.blp-pl-select.active + ::after,
.blp-pl-select-wrap:has(.blp-pl-select.active)::after { color: #fff; }
/* Optionen im geöffneten Menü lesbar halten (Systemfarben) */
.blp-pl-select option { background: #1a2333; color: #e8edf5; }
html[data-theme="light"] .blp-pl-select option { background: #fff; color: #1c2333; }

@media (max-width: 560px) {
  .blp-pl-select-wrap { flex-basis: 100%; max-width: none; }
}
.blp-panel-close { background: none; border: none; color: rgba(255,255,255,.6); font-size: 20px; cursor: pointer; line-height: 1; }
.blp-panel-close:hover { color: #fff; }
.blp-pl-list { list-style: none; margin: 0; padding: 6px; overflow-y: auto; flex: 1; }
.blp-pl-item {
  display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 8px;
  cursor: pointer; color: rgba(255,255,255,.8); font-size: 12.5px;
}
.blp-pl-item:hover { background: rgba(255,255,255,.06); }
.blp-pl-item.active { background: rgba(91,127,166,.25); color: #fff; }
.blp-pl-item.dragging { opacity: .5; }
.blp-pl-grip { color: rgba(255,255,255,.3); cursor: grab; font-size: 13px; flex-shrink: 0; }
.blp-pl-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blp-pl-name em { color: #4ade80; font-style: normal; font-size: 11px; }
.blp-panel-foot { padding: 8px 14px; font-size: 10.5px; color: rgba(255,255,255,.4); border-top: 1px solid rgba(255,255,255,.08); }

html[data-theme="light"] .blp-panel { background: #fff; border-color: #d5dbe4; }
html[data-theme="light"] .blp-pl-item { color: #2a3242; }
html[data-theme="light"] .blp-panel-close { color: #5a6478; }
html[data-theme="light"] .blp-panel-foot { color: #8b95a8; }

@media (max-width: 860px) {
  .blp-random, .blp-loop { display: none; }
  .blp-playlist-toggle span { display: none; }
}

/* v4.0 Lade-Zustand Playlist */
.blp-pl-loading { padding: 16px 14px; color: rgba(255,255,255,.5); font-size: 12.5px; text-align: center; }
html[data-theme="light"] .blp-pl-loading { color: #8b95a8; }
.blp-panel-count { font-variant-numeric: tabular-nums; }

/* [186] Spektrum-Visualizer */
.blp-visualizer { width:80px; height:34px; flex-shrink:0; margin:0 4px; opacity:.9; }
@media (max-width:860px){ .blp-visualizer { display:none; } }
