/* 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;
}



/* Park / hide tab */
.djhf-fp .djhf-fp-tab{
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  pointer-events: auto;
  width: 54px;
  height: 22px;
  border-radius: 14px;
  border: 1px solid rgba(0,229,255,0.28);
  background: rgba(0,0,0,0.55);
  color: rgba(0,229,255,0.95);
  box-shadow: 0 0 18px rgba(0,229,255,0.10);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}


/* Hide tab (when player visible) */
.djhf-fp .djhf-fp-hide-tab{
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -10px; /* hangs off bottom edge */
  z-index: 9999;
  pointer-events: auto;
  width: 54px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(0,229,255,0.22);
  background: rgba(255,255,255,0.06);
  color: #00e5ff;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 16px;
}

.djhf-fp.is-parked .djhf-fp-tab{ display:flex; top: calc(env(safe-area-inset-top) + 10px); bottom: auto; }

.djhf-fp .djhf-fp-hide{
  pointer-events: auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(0,229,255,0.22);
  background: rgba(255,255,255,0.06);
  color: rgba(0,229,255,0.95);
  box-shadow: 0 0 18px rgba(0,229,255,0.10);
  margin-left: 6px;
}

.djhf-fp.djhf-fp-bottom.is-parked{
  transform: translateY(calc(100% - 26px));
  transition: transform 220ms ease;
}
.djhf-fp.djhf-fp-top.is-parked{
  transform: translateY(calc(-100% + 26px));
  transition: transform 220ms ease;
}
/* keep tab visible even when wrapper moved */
.djhf-fp.is-parked{ pointer-events: none; }

.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-mini{
  flex-direction: column;
  align-items: stretch;
}

.djhf-fp-mini-main{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.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;
}

.djhf-fp-mini-option{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
  margin-top:8px;
  padding-top:8px;
  border-top:1px solid rgba(0, 230, 255, 0.10);
  color: rgba(255,255,255,0.82);
  font-size: 13px;
  line-height: 1.25;
}

.djhf-fp-mini-option input,
.djhf-fp-hijack input{
  width:18px;
  height:18px;
  flex:0 0 18px;
  accent-color: #00e5ff;
}

.djhf-fp-mini-option span{
  display:block;
  min-width:0;
}

.djhf-fp-seek{ margin-top: 4px; }
.djhf-fp-seek input[type="range"]{
  width: 100%;
  height: 16px;
  -webkit-appearance: none;
  appearance: none;
  --seek-pct: 0%;
  background: transparent;
  border-radius: 999px;
}
.djhf-fp-seek input[type="range"]::-webkit-slider-runnable-track{
  height: 6px;
  border-radius: 999px;
  background:
    linear-gradient(var(--accent) 0 0) 0/var(--seek-pct) 100% no-repeat,
    rgba(255,255,255,0.10);
  border: 1px solid rgba(0,229,255,0.20);
  box-shadow: 0 0 18px rgba(0,229,255,0.08);
}
.djhf-fp-seek input[type="range"]::-webkit-slider-thumb{
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin-top: -5px;
  background: rgba(0,229,255,0.95);
  box-shadow: 0 0 14px rgba(0,229,255,0.40);
  border: 1px solid rgba(255,255,255,0.20);
}
.djhf-fp-seek input[type="range"]::-moz-range-track{
  height: 6px;
  border-radius: 999px;
  background:
    linear-gradient(var(--accent) 0 0) 0/var(--seek-pct) 100% no-repeat,
    rgba(255,255,255,0.10);
  border: 1px solid rgba(0,229,255,0.20);
  box-shadow: 0 0 18px rgba(0,229,255,0.08);
}
.djhf-fp-seek input[type="range"]::-moz-range-thumb{
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(0,229,255,0.95);
  box-shadow: 0 0 14px rgba(0,229,255,0.40);
  border: 1px solid rgba(255,255,255,0.20);
}


/* 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: 0px;
  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;
}
@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 !important;
  animation-delay: calc(var(--i, 0) * 0.06s);
  transition: none !important;
  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: 0px;
  opacity: 0;
}

.djhf-fp.eq-sweep.is-playing #djhf-fp-eqWrap .eq-bar{
  animation: djhfFpEqSweep 1.2s ease-in-out infinite !important;
  animation-delay: calc(var(--i, 0) * 0.06s);
  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);
}

.djhf-fp-hijack label.is-disabled{
  opacity: .6;
}

/* Fullscreen overlay */
.djhf-fp-fullscreen{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.66);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 72px 10px 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.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; }
}

#djhf-fp-eqWrap{overflow:hidden; transform: translateZ(0); backface-visibility:hidden;}
/*
  Keep the EQ area visible even when paused/stopped, so the player doesn't visually collapse.
  JS (eqReset) will blank the bars on pause/stop.
*/
/* Ensure no stray EQ bars remain when paused/stopped (especially on iOS). */
.djhf-fp:not(.is-playing) #djhf-fp-eqWrap .eq-bar{
  height:0 !important;
  opacity:0 !important;
  box-shadow:none !important;
}

.djhf-share-modal{position:fixed; inset:0; z-index:10050; display:flex; align-items:flex-end; justify-content:center; padding:18px; background: rgba(0,0,0,0.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);} 
.djhf-share-modal[hidden]{display:none !important;}
.djhf-share-sheet{width:min(560px,100%); border-radius:18px; background: rgba(10, 14, 28, 0.95); border:1px solid rgba(0,255,255,0.20); box-shadow:0 0 35px rgba(0,255,255,0.10); padding:16px;}
.djhf-share-head{display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px;}
.djhf-share-title{font-weight:700; font-size:18px;}
.djhf-share-body input{width:100%; padding:12px 14px; border-radius:14px; border:1px solid rgba(0,229,255,0.25); background: rgba(255,255,255,0.04); color: var(--text, #eafcff);} 
.djhf-share-actions{display:flex; gap:10px; margin-top:10px;}
.djhf-share-actions .btn{flex:1;}
.djhf-share-hint{margin-top:8px; font-size:13px; opacity:0.85; min-height:1.1em;}
/* Share modal URL field: keep start visible on iOS */
#djhfShareModal input#djhfShareUrl{ text-align:left; direction:ltr; overflow-x:auto; }


/* Hidden audio element (keep controls for iOS background playback) */
#djhf-fp-audio{position:absolute;left:-9999px;top:-9999px;width:1px;height:1px;opacity:0;pointer-events:none;}


.djhf-fp-modal-backdrop{
  position: fixed;
  inset: 0;
  z-index: 10060;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0,0,0,0.62);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.djhf-fp-modal{
  width: min(560px, 100%);
  max-height: 75vh;
  overflow: auto;
  border-radius: 18px;
  background: rgba(10, 14, 28, 0.96);
  border: 1px solid rgba(0,255,255,0.20);
  box-shadow: 0 0 35px rgba(0,255,255,0.10);
  padding: 16px 16px 14px;
}

.djhf-fp-modal-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.djhf-fp-modal-title{
  margin:0;
  font-size:18px;
  font-weight:700;
}

.djhf-fp-modal-close{
  border: 1px solid rgba(0,255,255,0.25);
  background: rgba(0,0,0,0.35);
  border-radius: 12px;
  padding: 6px 10px;
  line-height: 1;
  font-size: 20px;
  cursor: pointer;
  color: inherit;
}

.djhf-fp-modal-close:hover{ filter: brightness(1.08); }

.djhf-fp-modal-status{
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  border: 1px solid rgba(0,255,255,0.14);
  background: rgba(0,255,255,0.05);
}

.djhf-fp-modal-status.error{
  border-color: rgba(255,120,120,0.22);
  background: rgba(255,90,90,0.08);
}

.djhf-fp-modal-section{ margin-top: 12px; }
.djhf-fp-modal-section-title{ font-weight:600; margin-bottom:8px; }

.djhf-fp-modal-checklist{
  max-height: 40vh;
  overflow: auto;
  padding-right: 6px;
}

.djhf-fp-modal-checkrow{
  display:flex;
  gap:10px;
  align-items:center;
  padding:8px 2px;
  border-bottom:1px solid rgba(255,255,255,0.06);
}

.djhf-fp-modal-checkrow-inline{
  border-bottom: 0;
  padding: 2px 0 0;
}

.djhf-fp-modal-checkrow.is-disabled{ opacity: .65; }
.djhf-fp-modal-checkcopy{ min-width:0; }
.djhf-fp-modal-checktitle{ font-weight:600; }
.djhf-fp-modal-checkmeta{ opacity:.75; font-size:.85rem; }
.djhf-fp-modal-empty{ opacity:.8; }

.djhf-fp-modal-divider{
  border:0;
  border-top:1px solid rgba(255,255,255,0.08);
  margin: 1rem 0;
}

.djhf-fp-modal-grid{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:flex-end;
}

.djhf-fp-modal-field{
  flex:1;
  min-width:220px;
}

.djhf-fp-modal-field label{
  display:block;
  font-size:.9rem;
  opacity:.85;
  margin-bottom:6px;
}

.djhf-fp-modal-field input,
.djhf-fp-modal-field select{
  width:100%;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(0,255,255,0.18);
  background: rgba(255,255,255,0.04);
  color: var(--text, #eafcff);
}

.djhf-fp-modal-actions{
  margin-top:1rem;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
