/* ─── Widget wrapper (fixed bottom-right) ──────────────── */
.radio-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}

/* ─── Floating trigger ─────────────────────────────────── */
.radio-trigger {
  pointer-events: auto;
  background: rgba(5, 5, 5, 0.9);
  border: 1px solid rgba(255,255,255,0.12);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 250ms ease, background 250ms ease;
}

.radio-trigger:hover {
  border-color: rgba(255,255,255,0.28);
}

.radio-trigger__sym {
  font-size: 11px;
  color: var(--muted);
  line-height: 1;
}

.radio-trigger__label {
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  color: var(--dim);
}

.radio-trigger--playing .radio-trigger__sym,
.radio-trigger--playing .radio-trigger__label {
  color: var(--off-white);
}

.radio-trigger__dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,0.55);
  animation: radioPulse 2.2s ease-in-out infinite;
}

@keyframes radioPulse {
  0%, 100% { opacity: 0.25; }
  50%       { opacity: 1; }
}

/* ─── Panel ───────────────────────────────────────────── */
.radio-panel {
  pointer-events: auto;
  width: 300px;
  background: #060606;
  border: 1px solid rgba(255,255,255,0.12);
  overflow: hidden;

  opacity: 0;
  transform: translateY(10px) scale(0.98);
  max-height: 0;
  pointer-events: none;
  transition:
    opacity 300ms ease,
    transform 300ms ease,
    max-height 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

.radio-panel--open {
  opacity: 1;
  transform: translateY(0) scale(1);
  max-height: 700px;
  pointer-events: auto;
}

/* ─── Header ──────────────────────────────────────────── */
.rp-head {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 12px 14px 11px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.rp-head__title {
  font-size: 8px;
  letter-spacing: 0.28em;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
  flex-shrink: 0;
  margin-right: 12px;
}

.rp-head__tabs {
  display: flex;
  gap: 12px;
  flex: 1;
}

.rp-head__tab {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 9px;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.3);
  padding: 0;
  position: relative;
  transition: color 220ms ease;
}

.rp-head__tab::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--white);
  transition: width 280ms cubic-bezier(0.16,1,0.3,1);
}

.rp-head__tab:hover { color: rgba(255,255,255,0.6); }

.rp-head__tab--active {
  color: var(--white);
}
.rp-head__tab--active::after { width: 100%; }

.rp-head__close {
  background: none; border: none;
  cursor: pointer;
  font-size: 16px;
  color: rgba(255,255,255,0.25);
  padding: 0; line-height: 1;
  flex-shrink: 0;
  transition: color 200ms ease;
}
.rp-head__close:hover { color: var(--white); }

/* ─── Custom Radio Body ──────────────────────────────────── */
.rp-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #060606;
}

.rp-body__main {
  display: flex;
  align-items: center;
  gap: 14px;
}

.rp-body__artwork {
  width: 54px;
  height: 54px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #111;
}

.rp-body__art-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.1) brightness(0.9);
}

.rp-body__meta {
  flex: 1;
  min-width: 0;
}

.rp-body__title {
  font-size: 11px;
  letter-spacing: 0.05em;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
  line-height: 1.3;
}

.rp-body__author {
  font-size: 9px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Progress slider */
.rp-progress {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.rp-progress__bar-wrap {
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
}

.rp-progress__slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  transition: background 150ms ease;
}

.rp-progress__slider:hover {
  background: rgba(255, 255, 255, 0.3);
}

.rp-progress__slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
}

.rp-progress__slider::-moz-range-thumb {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  border: none;
}

.rp-progress__times {
  display: flex;
  justify-content: space-between;
  font-size: 8px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.4);
}

/* Transport Controls */
.rp-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 2px;
}

.rp-ctrl-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
  cursor: pointer;
  padding: 6px 10px;
  transition: color 150ms ease, transform 100ms ease;
  line-height: 1;
}

.rp-ctrl-btn:hover {
  color: #ffffff;
}

.rp-ctrl-btn:active {
  transform: scale(0.92);
}

.rp-ctrl-btn--play {
  font-size: 14px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.rp-ctrl-btn--play:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
}

/* ─── Mobile ───────────────────────────────────────────── */
@media (max-width: 480px) {
  .radio-widget { bottom: 16px; right: 16px; }
  .radio-panel  { width: calc(100vw - 32px); max-width: 300px; }
}

/* ─── Reduced motion ───────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .radio-panel { transition: opacity 150ms ease; }
  .radio-trigger__dot { animation: none; opacity: 0.5; }
}
