/* =============================================
   RAWFIND PERSISTENT PLAYER
   ============================================= */

/* ── Body padding so footer isn't hidden behind player ── */
body.rf-player-active {
  padding-bottom: 78px;
}

/* ── Player shell ── */
#rf-player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: rgba(12, 12, 22, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid rgba(255,255,255,0.09);
  box-shadow: 0 -8px 40px rgba(0,0,0,0.6);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  user-select: none;
}

#rf-player.rf-player-visible {
  transform: translateY(0);
}

#rf-player.rf-player-minimised {
  transform: translateY(calc(100% - 4px));
}

/* accent bar at very top */
#rf-player::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-hot), var(--accent-cold));
  opacity: 0;
  transition: opacity 0.3s;
}
#rf-player.rf-player-visible::before { opacity: 1; }

/* ── Progress bar (sits right on the top border) ── */
.rf-progress-rail {
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 3px;
  background: rgba(255,255,255,0.07);
  cursor: pointer;
  z-index: 2;
}
.rf-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-hot), #ff7b3d);
  width: 0%;
  transition: width 0.5s linear;
  pointer-events: none;
  position: relative;
}
.rf-progress-fill::after {
  content: '';
  position: absolute;
  right: -5px; top: 50%;
  transform: translateY(-50%);
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent-hot);
  opacity: 0;
  transition: opacity 0.2s;
  box-shadow: 0 0 8px var(--accent-hot-glow);
}
.rf-progress-rail:hover .rf-progress-fill::after { opacity: 1; }
.rf-progress-rail:hover { height: 5px; top: -2px; }

/* ── Main player row ── */
.rf-player-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 20px;
  height: 72px;
  gap: 16px;
  max-width: 1440px;
  margin: 0 auto;
}

/* ── Left: track info ── */
.rf-player-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.rf-player-thumb {
  width: 46px;
  height: 46px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--bg-raised);
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.rf-player-meta {
  min-width: 0;
}

.rf-player-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.rf-player-artist {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.rf-player-platform {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: 3px;
  margin-top: 3px;
}
.rf-platform-youtube    { background: rgba(255,0,0,0.18);   color: #ff4444; }
.rf-platform-spotify    { background: rgba(29,185,84,0.18); color: #1db954; }
.rf-platform-soundcloud { background: rgba(255,85,0,0.18);  color: #ff7733; }

/* ── Centre: transport controls ── */
.rf-player-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.rf-ctrl-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.rf-ctrl-btn:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.06);
}

.rf-ctrl-btn.rf-play-pause {
  width: 44px;
  height: 44px;
  background: var(--text-primary);
  color: var(--bg-void);
  margin: 0 4px;
}

.rf-ctrl-btn.rf-play-pause:hover {
  background: white;
  transform: scale(1.05);
  box-shadow: 0 0 16px rgba(255,255,255,0.2);
}

.rf-ctrl-btn.rf-vote-hot:hover, .rf-ctrl-btn.rf-vote-hot.voted {
  color: var(--accent-hot);
  background: rgba(255,61,61,0.12);
}
.rf-ctrl-btn.rf-vote-cold:hover, .rf-ctrl-btn.rf-vote-cold.voted {
  color: var(--accent-cold);
  background: rgba(61,157,255,0.12);
}

/* ── Right: utilities ── */
.rf-player-utils {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
}

/* Volume */
.rf-volume-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rf-volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 72px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,0.15);
  outline: none;
  cursor: pointer;
}
.rf-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--text-primary);
  cursor: pointer;
}

/* Time */
.rf-time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 72px;
  text-align: center;
}

/* Queue toggle */
.rf-queue-btn {
  position: relative;
}
.rf-queue-count {
  position: absolute;
  top: 2px; right: 2px;
  width: 14px; height: 14px;
  background: var(--accent-hot);
  border-radius: 50%;
  font-size: 8px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  line-height: 1;
}

/* Minimise / close */
.rf-util-divider {
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,0.08);
  margin: 0 4px;
}

/* ── Queue drawer ── */
/* ── Follow button ── */
.rf-follow-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.rf-follow-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.3);
  color: var(--text-primary);
  transform: scale(1.04);
}
.rf-follow-btn.following {
  background: rgba(29,185,84,0.15);
  border-color: rgba(29,185,84,0.4);
  color: #1db954;
}
.rf-follow-btn svg { flex-shrink: 0; }

/* ── Browser tab / Media Session mini-player indicator ── */
/* No CSS needed — handled entirely via Media Session API in JS */

/* ── Queue item follow micro-button ── */
.rf-queue-follow {
  opacity: 0;
  transition: opacity 0.15s;
  flex-shrink: 0;
}
.rf-queue-item:hover .rf-queue-follow { opacity: 1; }

/* ── Player info clickable ── */
.rf-player-info { cursor: pointer; }
.rf-player-info:hover .rf-player-title { color: var(--accent-cold); }

/* ── Cast button states ── */
.rf-cast-btn { transition: all 0.15s ease; }
.rf-cast-btn.casting {
  color: var(--accent-cold);
  background: rgba(61,157,255,0.12);
}
.rf-cast-btn.pip-active {
  color: var(--accent-gold);
  background: rgba(245,200,66,0.12);
}
