/* ════════════════════════════════════════════════════════════════════
   SOLARBOT — Global Radio
   Styles partagés : widget flottant + page admin
   ════════════════════════════════════════════════════════════════════ */

/* ─── WIDGET FLOTTANT ──────────────────────────────────────────────── */
#grWidget {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  animation: grSlideUp .35s cubic-bezier(.16,1,.3,1);
}

@keyframes grSlideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0);    }
}

#grwInner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(10,10,20,.96);
  border: 1px solid rgba(129,140,248,.25);
  border-radius: 999px;
  box-shadow: 0 8px 40px rgba(0,0,0,.6), 0 0 0 1px rgba(129,140,248,.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  white-space: nowrap;
  min-width: 260px;
  max-width: 520px;
}

.grw-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gray-600, #6b7280);
  flex-shrink: 0;
  transition: background .3s;
}
.grw-dot.playing {
  background: #4ade80;
  box-shadow: 0 0 8px rgba(74,222,128,.8);
  animation: grPulse 1.5s infinite;
}
@keyframes grPulse {
  0%,100% { opacity: 1; box-shadow: 0 0 8px rgba(74,222,128,.8); }
  50%      { opacity: .5; box-shadow: 0 0 3px rgba(74,222,128,.3); }
}

.grw-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: #818cf8;
  flex-shrink: 0;
}

.grw-title {
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  max-width: 220px;
}

.grw-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.grw-btn {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.07);
  color: #d1d5db;
  transition: all .15s;
  white-space: nowrap;
}
.grw-btn:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.25); }

.grw-btn--listen {
  background: rgba(129,140,248,.15);
  border-color: rgba(129,140,248,.4);
  color: #a5b4fc;
}
.grw-btn--listen:hover {
  background: rgba(129,140,248,.3);
  color: #fff;
}

.grw-btn--mute.muted {
  background: rgba(239,68,68,.1);
  border-color: rgba(239,68,68,.35);
  color: #f87171;
}

.grw-btn--close {
  padding: 5px 8px;
  border-radius: 50%;
  font-size: 12px;
  color: var(--gray-500, #6b7280);
}
.grw-btn--close:hover { color: #f87171; background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.3); }

#grWidget.gr-paused .grw-label { color: var(--gray-500, #6b7280); }

/* ─── PAGE ADMIN RADIO GLOBALE ──────────────────────────────────────── */
.gr-admin-wrap {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 900px;
}

/* Player card */
.gr-player {
  background: linear-gradient(135deg, rgba(129,140,248,.06) 0%, rgba(167,139,250,.04) 100%);
  border: 1px solid rgba(129,140,248,.18);
  border-radius: 20px;
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  position: relative;
}

.gr-player-left { display: flex; align-items: center; gap: 18px; flex: 1; min-width: 0; }

.gr-thumb {
  width: 72px; height: 72px; border-radius: 12px;
  overflow: hidden; flex-shrink: 0;
  background: rgba(255,255,255,.05);
  display: flex; align-items: center; justify-content: center;
}
.gr-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gr-thumb-ph  { font-size: 28px; }

.gr-track-info { min-width: 0; flex: 1; }
.gr-track-label {
  font-size: 9px; font-weight: 700; letter-spacing: .8px;
  text-transform: uppercase; color: #818cf8; margin-bottom: 4px;
}
.gr-track-title {
  font-size: 17px; font-weight: 700; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 6px;
}
.gr-listener-count {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--gray-500, #6b7280);
}
.gr-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #4ade80; box-shadow: 0 0 6px rgba(74,222,128,.7);
  animation: grPulse 1.5s infinite;
}

.gr-controls {
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}

.gr-btn {
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; cursor: pointer;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.05);
  color: var(--gray-300, #d1d5db);
  transition: all .15s;
}
.gr-btn--sm   { width: 38px; height: 38px; }
.gr-btn--play {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, #818cf8, #a78bfa);
  border: none; color: #fff;
  box-shadow: 0 4px 20px rgba(129,140,248,.4);
}
.gr-btn:hover            { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.2); color: #fff; }
.gr-btn--play:hover      { box-shadow: 0 6px 28px rgba(129,140,248,.6); transform: scale(1.06); }

.gr-volume {
  display: flex; align-items: center; gap: 6px; margin-left: 8px;
}
.gr-vol-slider {
  width: 80px; accent-color: #818cf8; cursor: pointer;
}
.gr-vol-val { font-size: 11px; color: var(--gray-500); min-width: 28px; }

/* Playlist panel */
.gr-panel {
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 16px;
  overflow: hidden;
}

.gr-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.gr-panel-title { font-size: 13px; font-weight: 700; color: #fff; }

.gr-playlist { max-height: 380px; overflow-y: auto; scrollbar-width: thin; }
.gr-empty { padding: 40px 20px; text-align: center; font-size: 13px; color: var(--gray-600); }

.gr-track-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  cursor: pointer; transition: background .15s;
}
.gr-track-row:hover    { background: rgba(255,255,255,.04); }
.gr-track-row.active   { background: rgba(129,140,248,.08); }
.gr-track-num          { width: 20px; text-align: center; font-size: 11px; color: var(--gray-600); flex-shrink: 0; }
.gr-playing-icon       { color: #818cf8; font-size: 11px; }
.gr-track-thumb-sm     { width: 36px; height: 36px; border-radius: 6px; overflow: hidden; flex-shrink: 0; background: rgba(255,255,255,.06); display: flex; align-items: center; justify-content: center; }
.gr-track-thumb-sm img { width: 100%; height: 100%; object-fit: cover; }
.gr-thumb-sm-ph        { font-size: 16px; }
.gr-track-row-info     { flex: 1; min-width: 0; }
.gr-track-row-title    { display: block; font-size: 13px; font-weight: 600; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gr-track-row-url      { display: block; font-size: 11px; color: var(--gray-600); }
.gr-del-btn {
  padding: 4px 8px; border-radius: 6px; font-size: 11px; cursor: pointer;
  border: 1px solid rgba(239,68,68,.2); background: transparent; color: #f87171;
  transition: background .15s;
}
.gr-del-btn:hover { background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.4); }

.gr-add-track {
  display: flex; gap: 10px; padding: 14px 20px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.gr-url-input {
  flex: 1; padding: 9px 14px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.09);
  border-radius: 10px; color: #fff; font-size: 13px; outline: none;
  transition: border-color .15s;
}
.gr-url-input:focus { border-color: rgba(129,140,248,.5); }
