/* ============================================================================
   players/floating.css
   Mini player (floating bar) — shell, progress, cover buffering,
   error & disabled states, internals
   ============================================================================ */


/* ===== 1. MINI PLAYER SHELL ===== */
.mini-player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 0 1rem 1rem;
}

.mini-player .mini-player-inner {
  max-width: 600px;
  margin: 0 auto;
  background: linear-gradient(135deg, rgba(var(--bgCard) / 0.95), rgba(var(--bgPopups) / 0.95));
  border: 1px solid rgba(var(--borderPrimary));
  border-radius: 1rem;
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(var(--shadowPrimary) / var(--shadowPrimaryAlpha));
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mini-player .mini-player-inner:hover {
  transform: scale(1.01);
  box-shadow: 0 12px 40px rgba(var(--shadowHeavy) / var(--shadowHeavyAlpha));
}


/* ===== 2. PROGRESS STRIP ===== */
.mini-player .mini-progress {
  height: 2px;
  background: linear-gradient(90deg, rgba(var(--colorPurple)), rgba(var(--colorPink)));
  transition: width 0.1s linear, background 0.8s ease;
  box-shadow: 0 0 6px rgba(var(--playerAccent) / 0.5);
}


/* ===== 3. INTERNALS ([data-player="mini"]) ===== */
[data-player="mini"] .track {
  height: 0.25rem;
  width: 100%;
  background: rgba(var(--playerAccent) / 0.35);
}
[data-player="mini"] .track .mini-progress {
  background: rgba(var(--playerAccent));
}
[data-player="mini"] .bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
}
@media (min-width: 768px) {
  [data-player="mini"] .bar {
    padding: 0.75rem 1rem;
  }
}
[data-player="mini"] .cover {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  overflow: hidden;
  flex-shrink: 0;
  background: rgb(51 65 85);
  display: flex;
  align-items: center;
  justify-content: center;
}
[data-player="mini"] .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
[data-player="mini"] .info {
  flex: 1 1 0%;
  min-width: 0;
}
[data-player="mini"] .info .title {
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
[data-player="mini"] .info .sub {
  font-size: 0.75rem;
  line-height: 1rem;
  color: rgba(var(--textSecondary));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
[data-player="mini"] .actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
[data-player="mini"] .actions button {
  padding: 0.5rem;
  border-radius: 9999px;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  transition: background 150ms cubic-bezier(0.4, 0, 0.2, 1), color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}
[data-player="mini"] .actions button:hover {
  background: rgba(var(--bgButtons));
}
[data-player="mini"] .actions button.toggle {
  padding: 0.625rem;
}


/* ===== 4. COVER BUFFERING OVERLAY ===== */
.mini-cover {
  position: relative;
}

.mini-cover-buffer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  border-radius: inherit;
  z-index: 5;
}

.mini-cover-buffer .spnr-circle {
  width: 1.25rem;
  height: 1.25rem;
  border: 0.18rem solid rgba(255, 255, 255, 0.25);
  border-top-color: #dc143c;
  border-radius: 9999px;
  animation: spnr-spin 0.75s linear infinite;
}

@keyframes spnr-spin {
  to {
    transform: rotate(360deg);
  }
}


/* ===== 5. MISSING-AUDIO ERROR STATE ===== */
.mini-player .mini-player-inner.audio-missing {
  border-color: rgb(220,20,60);
  box-shadow: 0 0 0 1px rgb(220,20,60), 0 8px 32px rgba(220,20,60, 0.35);
}


/* ===== 6. DISABLED CONTROLS ===== */
.mini-player-inner button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}


/* ===== 7. MINI FAVORITE HEART ===== */
#fav-mini.favorited {
  color: rgba(var(--textOthers));
}