/* RS Media Player — Frontend Styles */
.rsmp-player {
  font-family: 'Poppins', -apple-system, sans-serif;
  max-width: 680px;
  margin: 0 auto;
  border: 1px solid #e4ede8;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 40px rgba(11,93,59,.09);
}

/* ── Album Header ──────────────────────────────────────────── */
.rsmp-album-header {
  background: #0b5d3b;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.rsmp-album-cover {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255,255,255,.1);
  border: 1.5px solid rgba(255,255,255,.18);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rsmp-album-cover img { width: 100%; height: 100%; object-fit: cover; }
.rsmp-album-cover svg { width: 36px; height: 36px; }
.rsmp-album-info { flex: 1; min-width: 0; }
.rsmp-album-title  { font-size: .95rem; font-weight: 700; color: #fff; margin: 0 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rsmp-album-artist { font-size: .78rem; color: rgba(255,255,255,.75); margin: 0 0 2px; }
.rsmp-album-desc   { font-size: .72rem; color: rgba(255,255,255,.55); margin: 0; }
.rsmp-album-count  { font-size: .7rem; color: rgba(255,255,255,.6); background: rgba(255,255,255,.12); padding: 4px 12px; border-radius: 20px; white-space: nowrap; flex-shrink: 0; }

/* ── Now Playing ───────────────────────────────────────────── */
.rsmp-now-playing {
  padding: 1.4rem 1.5rem 1rem;
  border-bottom: 1px solid #f0f5f2;
}
.rsmp-np-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 1rem; }
.rsmp-np-label  { font-size: .65rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #aaa; margin: 0 0 5px; }
.rsmp-np-title  { font-size: 1rem; font-weight: 700; color: #1a1a1a; margin: 0 0 3px; }
.rsmp-np-artist { font-size: .82rem; color: #6b7280; margin: 0; }
.rsmp-np-type-badge { font-size: .65rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 10px; border-radius: 20px; flex-shrink: 0; margin-top: 4px; }
.rsmp-badge-audio { background: rgba(11,93,59,.1); color: #0b5d3b; }
.rsmp-badge-video { background: rgba(184,150,46,.12); color: #b8962e; }

/* ── Progress ──────────────────────────────────────────────── */
.rsmp-progress-wrap { display: flex; align-items: center; gap: 10px; margin-bottom: 1.1rem; }
.rsmp-time { font-size: .72rem; color: #aaa; min-width: 36px; font-variant-numeric: tabular-nums; }
.rsmp-time-total { text-align: right; }
.rsmp-progress-bar { flex: 1; height: 4px; background: #e8f0eb; border-radius: 2px; position: relative; cursor: pointer; }
.rsmp-progress-fill { height: 100%; background: #0b5d3b; border-radius: 2px; width: 0; transition: width .1s linear; }
.rsmp-progress-thumb { width: 13px; height: 13px; border-radius: 50%; background: #0b5d3b; position: absolute; top: -4.5px; left: 0; transform: translateX(-50%); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.2); transition: left .1s linear; opacity: 0; pointer-events: none; }
.rsmp-progress-bar:hover .rsmp-progress-thumb { opacity: 1; }

/* ── Controls ──────────────────────────────────────────────── */
.rsmp-controls { display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 1rem; }
.rsmp-ctrl {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1.5px solid #e4ede8;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #555;
  transition: all .2s ease;
  position: relative;
  flex-shrink: 0;
}
.rsmp-ctrl svg { width: 16px; height: 16px; display: block; pointer-events: none; }
.rsmp-ctrl span { position: absolute; bottom: 5px; right: 5px; font-size: 7px; font-weight: 700; color: currentColor; line-height: 1; }
.rsmp-ctrl:hover { border-color: #0b5d3b; color: #0b5d3b; background: rgba(11,93,59,.05); }
.rsmp-ctrl.rsmp-primary { width: 48px; height: 48px; background: #0b5d3b; border-color: #0b5d3b; color: #fff; }
.rsmp-ctrl.rsmp-primary:hover { background: #2f4f3e; border-color: #2f4f3e; transform: scale(1.05); }
.rsmp-ctrl.rsmp-primary svg { width: 20px; height: 20px; }
.rsmp-ctrl.rsmp-active { border-color: #0b5d3b; color: #0b5d3b; background: rgba(11,93,59,.08); }

/* ── Volume ────────────────────────────────────────────────── */
.rsmp-volume-row { display: flex; align-items: center; gap: 8px; padding: 0 4px; }
.rsmp-vol-btn { background: none; border: none; cursor: pointer; padding: 4px; color: #aaa; display: flex; align-items: center; }
.rsmp-vol-btn:hover { color: #0b5d3b; }
.rsmp-vol-btn svg { width: 16px; height: 16px; display: block; }
.rsmp-vol-track { flex: 1; height: 3px; background: #e8f0eb; border-radius: 2px; position: relative; cursor: pointer; }
.rsmp-vol-fill { height: 100%; background: #ccc; border-radius: 2px; width: 70%; transition: width .1s; }
.rsmp-vol-pct { font-size: .7rem; color: #bbb; min-width: 32px; text-align: right; font-variant-numeric: tabular-nums; }

/* ── Track Notes ───────────────────────────────────────────── */
.rsmp-notes-wrap {
  padding: 1rem 1.5rem;
  background: #f8fbf9;
  border-bottom: 1px solid #f0f5f2;
  border-top: 1px solid #f0f5f2;
}
.rsmp-notes-label { font-size: .65rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #aaa; margin-bottom: 8px; }
.rsmp-notes-body { font-size: .88rem; color: #444; line-height: 1.8; }
.rsmp-notes-body p { margin: 0 0 8px; }
.rsmp-notes-body p:last-child { margin: 0; }

/* ── Playlist ──────────────────────────────────────────────── */
.rsmp-playlist { max-height: 320px; overflow-y: auto; }
.rsmp-playlist::-webkit-scrollbar { width: 4px; }
.rsmp-playlist::-webkit-scrollbar-track { background: transparent; }
.rsmp-playlist::-webkit-scrollbar-thumb { background: #ddd; border-radius: 2px; }

.rsmp-pl-item {
  display: flex; align-items: center; gap: 12px;
  padding: .75rem 1.5rem;
  border-bottom: 1px solid #f5f8f6;
  cursor: pointer;
  transition: background .15s;
}
.rsmp-pl-item:last-child { border-bottom: none; }
.rsmp-pl-item:hover { background: rgba(11,93,59,.03); }
.rsmp-pl-item.rsmp-active { background: rgba(11,93,59,.06); }

.rsmp-pl-num { width: 22px; flex-shrink: 0; text-align: right; }
.rsmp-pl-index { font-size: .78rem; color: #bbb; font-variant-numeric: tabular-nums; }
.rsmp-pl-item.rsmp-active .rsmp-pl-index { display: none; }
.rsmp-pl-item.rsmp-active .rsmp-pl-wave { display: flex !important; align-items: flex-end; gap: 2px; height: 16px; }
.rsmp-pl-wave span { width: 3px; background: #0b5d3b; border-radius: 2px; animation: rsmpWave .7s ease infinite alternate; }
.rsmp-pl-wave span:nth-child(1) { height: 12px; }
.rsmp-pl-wave span:nth-child(2) { height: 8px; animation-delay: .18s; }
.rsmp-pl-wave span:nth-child(3) { height: 5px; animation-delay: .36s; }
.rsmp-pl-item.rsmp-paused .rsmp-pl-wave span { animation-play-state: paused; }
@keyframes rsmpWave { from { height: 3px; } to { height: 13px; } }

.rsmp-pl-info { flex: 1; min-width: 0; }
.rsmp-pl-title  { font-size: .88rem; font-weight: 600; color: #1a1a1a; margin: 0 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rsmp-pl-artist { font-size: .75rem; color: #aaa; margin: 0; }
.rsmp-pl-item.rsmp-active .rsmp-pl-title { color: #0b5d3b; }
.rsmp-pl-dur { font-size: .75rem; color: #bbb; flex-shrink: 0; font-variant-numeric: tabular-nums; }

/* ── Error ─────────────────────────────────────────────────── */
.rsmp-error { color: #c53030; font-size: .9rem; padding: .75rem 1rem; background: #fff5f5; border: 1px solid #fed7d7; border-radius: 8px; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 480px) {
  .rsmp-now-playing { padding: 1.1rem 1.1rem .8rem; }
  .rsmp-album-header { padding: 1rem 1.1rem; }
  .rsmp-pl-item { padding: .65rem 1.1rem; }
  .rsmp-notes-wrap { padding: .8rem 1.1rem; }
  .rsmp-ctrl { width: 34px; height: 34px; }
  .rsmp-ctrl.rsmp-primary { width: 44px; height: 44px; }
  .rsmp-album-count { display: none; }
}
