/* DJHandsFree - Floating / Sticky Player (neon theme) */


.djhf-fp [hidden]{ display:none !important; }

/* Full screen overlay styles are defined near the bottom (single source of truth) */

.djhf-fp{
  position: fixed;
  left: 0;
  right: 0;
  z-index: 9999;
  pointer-events: none; /* allow only inner to capture */
  padding: 10px;
}

.djhf-fp-top{ top: 0; }
.djhf-fp-bottom{ bottom: 0; }

.djhf-fp .djhf-fp-mini,
.djhf-fp .djhf-fp-body,
.djhf-fp .djhf-fp-fullscreen{
  pointer-events: auto;
}

.djhf-fp-mini{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(10, 14, 22, 0.92);
  border: 1px solid rgba(0, 230, 255, 0.28);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
}

.djhf-fp-toggle{
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(0, 230, 255, 0.45);
  background: rgba(0,0,0,0.2);
  color: var(--accent);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
}

.djhf-fp-mini-play{
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(0, 230, 255, 0.55);
  background: rgba(0,0,0,0.25);
  color: var(--accent);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
}

/* Pixel-perfect centered play/pause glyph (avoids font glyph offset on iOS) */
.djhf-fp-icon-glyph{
  width: 18px;
  height: 18px;
  position: relative;
  display: block;
}
.djhf-fp-icon-glyph.play::before{
  content: "";
  position: absolute;
  left: 6px;
  top: 3px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid rgba(0,229,255,0.95);
  filter: drop-shadow(0 0 6px rgba(0,229,255,0.25));
}
.djhf-fp-icon-glyph.pause::before,
.djhf-fp-icon-glyph.pause::after{
  content: "";
  position: absolute;
  top: 3px;
  width: 4px;
  height: 12px;
  border-radius: 2px;
  background: rgba(0,229,255,0.95);
  box-shadow: 0 0 10px rgba(0,229,255,0.18);
}
.djhf-fp-icon-glyph.pause::before{ left: 4px; }
.djhf-fp-icon-glyph.pause::after{ right: 4px; }

.djhf-fp-mini-meta{ flex: 1; min-width: 0; }

.djhf-fp-title{
  color: rgba(255,255,255,0.88);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.djhf-fp-time{
  color: rgba(255,255,255,0.62);
  font-size: 12px;
  margin-top: 2px;
}


/* EQ (matches playlist.html analyser bars) */
#djhf-fp-eqWrap{
  display:flex;
  align-items:flex-end;
  gap:3px;
  height:22px;
  padding: 2px 6px;
  border-radius: 10px;
  border: 1px solid rgba(0,229,255,0.20);
  background: rgba(255,255,255,0.04);
  box-shadow: 0 0 18px rgba(0,229,255,0.08);
  user-select:none;
}
#djhf-fp-eqWrap .eq-bar{
  width: 3px;
  height: 4px;
  border-radius: 6px;
  background: rgba(0,229,255,0.85);
  box-shadow: 0 0 10px rgba(0,229,255,0.25);
  transition: height 90ms linear, opacity 90ms linear;
  opacity: 0.55;
}
@media (prefers-reduced-motion: reduce){
  #djhf-fp-eqWrap .eq-bar{ transition: none; }
}

/* Fallback: CSS sweep animation when WebAudio analyser isn't available
   (common for some remote streams without CORS headers). */
@keyframes djhfFpEqSweep{
  0%{ height: 4px; opacity: .25; }
  50%{ height: 22px; opacity: 1; }
  100%{ height: 4px; opacity: .25; }
}

.djhf-fp.eq-sweep #djhf-fp-eqWrap .eq-bar{
  animation: djhfFpEqSweep 1.2s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * 0.06s);
  transition: none;
  animation-play-state: paused; /* only run when playing */
}

/* When sweep mode is active but audio is not playing, show a stable idle look */
.djhf-fp.eq-sweep:not(.is-playing) #djhf-fp-eqWrap .eq-bar{
  animation: none;
  height: 8px;
  opacity: 0.55;
}

.djhf-fp.eq-sweep.is-playing #djhf-fp-eqWrap .eq-bar{
  animation-play-state: running;
}

.djhf-fp-body{
  margin-top: 10px;
  padding: 12px;
  background: rgba(10, 14, 22, 0.94);
  border: 1px solid rgba(0, 230, 255, 0.22);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
}

.djhf-fp-controls{
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 10px;
}

.djhf-fp-controls::-webkit-scrollbar{ display:none; }

/* Keep controls consistent (avoid global .btn sizing bleeding in) */
.djhf-fp .btn{
  font-size: 14px;
  padding: 10px 16px;
  min-height: 42px;
  border-radius: 999px;
  line-height: 1;
}

.djhf-fp .btn:active{ transform: translateY(0); }

.djhf-fp-btn{
  flex: 0 0 auto;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
}

.djhf-fp-queue{
  border-top: 1px solid rgba(0, 230, 255, 0.12);
  padding-top: 10px;
  margin-top: 6px;
}

/* Marquee section under the session queue */
.djhf-fp-marquee{
  margin-top: 10px;
  border: 1px solid rgba(0, 230, 255, 0.14);
  border-radius: 14px;
  background: rgba(0,0,0,0.18);
  padding: 10px;
  overflow: hidden;
}
.djhf-fp-marquee-inner{
  display: inline-block;
  white-space: nowrap;
  animation: none;
  color: rgba(255,255,255,0.85);
}
.djhf-fp-marquee.is-continuous .djhf-fp-marquee-inner{ animation: djhfFpMarquee 18s linear infinite; }
.djhf-fp-marquee:hover .djhf-fp-marquee-inner{ animation-play-state: paused; }
.djhf-fp-marquee.is-static .djhf-fp-marquee-inner{ transform: translateX(0); }

@keyframes djhfFpMarquee{
  0%{ transform: translateX(100%); }
  100%{ transform: translateX(-110%); }
}

.djhf-fp-queue-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.djhf-fp-queue-title{ color: rgba(255,255,255,0.85); font-weight: 600; }

.djhf-fp-queue-actions{ display:flex; gap:10px; }

.djhf-fp-queue-list{
  margin-top: 10px;
  max-height: 200px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 6px;
}

.djhf-fp-queue-empty{
  width: 100%;
  text-align: center;
  color: rgba(255,255,255,0.70);
  padding: 14px 10px;
}

.djhf-fp-queue-item{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(0, 230, 255, 0.14);
  border-radius: 14px;
  margin-bottom: 10px;
  background: rgba(0,0,0,0.18);
}

.djhf-fp-queue-item.active{ border-color: rgba(0, 230, 255, 0.45); box-shadow: 0 0 18px rgba(0,230,255,0.12); }

.djhf-fp-queue-item .title{
  flex: 1;
  min-width: 0;
  color: rgba(255,255,255,0.88);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.djhf-fp-queue-item .actions{
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.djhf-fp-icon{
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(0, 230, 255, 0.35);
  background: rgba(0,0,0,0.22);
  color: var(--accent);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.djhf-fp-ad{
  margin-top: 12px;
  padding: 10px;
  border: 1px dashed rgba(0, 230, 255, 0.25);
  border-radius: 14px;
  background: rgba(0,0,0,0.15);
}

/* In-player toast (keeps messages inside the player instead of spilling into the page) */
.djhf-fp-toast{
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 12px;
  max-width: calc(100% - 24px);
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(0,0,0,0.70);
  border: 1px solid rgba(0,229,255,0.22);
  color: rgba(255,255,255,0.90);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 10001;
}
.djhf-fp-toast.show{
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

.djhf-fp-hijack{
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 230, 255, 0.12);
  color: rgba(255,255,255,0.8);
}

/* Fullscreen overlay */
.djhf-fp-fullscreen{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.66);
  z-index: 10000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 10px;
}

.djhf-fp-fullscreen > div{ pointer-events: auto; }

.djhf-fp-fullscreen .djhf-fp-full-header,
.djhf-fp-fullscreen .djhf-fp-full-picker,
.djhf-fp-fullscreen .djhf-fp-full-body,
.djhf-fp-fullscreen .djhf-fp-ad-full{
  max-width: 980px;
  width: 100%;
}

.djhf-fp-fullscreen .djhf-fp-full-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(10,14,22,0.95);
  border: 1px solid rgba(0,230,255,0.22);
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 10px;
}

.djhf-fp-fullscreen .djhf-fp-full-title{
  color: rgba(255,255,255,0.9);
  font-weight: 700;
}

.djhf-fp-fullscreen .djhf-fp-full-picker{
  background: rgba(10,14,22,0.95);
  border: 1px solid rgba(0,230,255,0.18);
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 10px;
}

.djhf-fp-fullscreen .djhf-fp-full-picker-row{
  display: flex;
  gap: 10px;
}

.djhf-fp-select{
  flex: 1;
  min-width: 0;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(0,230,255,0.25);
  border-radius: 14px;
  padding: 12px;
  color: rgba(255,255,255,0.88);
}

.djhf-fp-fullscreen .djhf-fp-full-body{
  background: rgba(10,14,22,0.95);
  border: 1px solid rgba(0,230,255,0.18);
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 10px;
}

/* Floating draggable mode */
.djhf-fp-float{
  left: 0;
  right: 0;
}

.djhf-fp.dragging{ opacity: .95; }

@media (min-width: 900px){
  .djhf-fp{ padding: 16px; }
  .djhf-fp-mini, .djhf-fp-body{ max-width: 980px; margin-left:auto; margin-right:auto; }
}