/* ============================================================
   RadioGrub — player.css
   Persistent bottom player bar, AI drop panel, mood device. The player lives in the shell and survives route changes.
   ============================================================ */

.playerBar{
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 200;
  background: rgba(0,0,0,.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 0 18px;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 18px;
  transform: translateY(100%);
  transition: transform .32s cubic-bezier(.22,1,.36,1);
}
.playerBar.visible{ transform: translateY(0); }

.playerThumb{
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--surface2);
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--line);
}
/* the shared station art, sized for the bar */
.playerThumb .rgArt{ width:100%; height:100%; border-radius:inherit; }
.playerThumb .rgArt img{ width:100%; height:100%; display:block; }
.playerThumb .rgInitials{ font-size:15px; font-weight:900; letter-spacing:-.02em; }
.playerInfo{
  flex: 1; min-width: 0;
}
.playerTitle{
  font-weight: 980; font-size: 13px; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.playerSub{
  font-size: 12px; color: rgba(255,255,255,.52); font-weight: 650; margin-top: 2px;
}

.playerControls{
  display: flex; align-items: center; gap: 12px; flex: 0 0 auto;
}
.pBtn{
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.80);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: .15s ease;
}
.pBtn:hover{ background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.24); }
.pBtn.play{
  width: 44px; height: 44px;
  background: var(--accent);
  border-color:var(--accentText);
  color: #fff;
}
.pBtn.play:hover{ background: var(--accent2); }
.pBtn svg{ width: 16px; height: 16px; }
.pBtn.play svg{ width: 18px; height: 18px; }

.playerProgress{
  flex: 1; max-width: 260px; min-width: 80px;
  display: flex; flex-direction: column; gap: 4px;
}
.progressTrack{
  height: 3px; border-radius: 999px;
  background: rgba(255,255,255,.14);
  position: relative; cursor: pointer;
  overflow: hidden;
}
.progressFill{
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--warm));
  width: 0%;
  transition: width .4s linear;
}
.progressTime{
  display: flex; justify-content: space-between;
  font-size: 10px; color: rgba(255,255,255,.38); font-weight: 750;
}

.playerDropBtn{
  border: 1px solid rgba(226,27,35,.35);
  background: rgba(226,27,35,.12);
  color:var(--accentText);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 950;
  font-size: 12px;
  cursor: pointer;
  transition: .15s ease;
  white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
}
.playerDropBtn:hover{ background: rgba(226,27,35,.20); }
.playerDropBtn .dot{ width:7px;height:7px;border-radius:50%;background:var(--accent); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse{ 0%,100%{ opacity:1; transform:scale(1); } 50%{ opacity:.5; transform:scale(.85); } }

.playerClose{
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.10);
  background: transparent;
  color: rgba(255,255,255,.40);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: .15s ease; flex: 0 0 auto;
}
.playerClose:hover{ color: rgba(255,255,255,.80); border-color: rgba(255,255,255,.24); }
.playerClose svg{ width: 12px; height: 12px; }

.dropPanel{
  position: fixed;
  bottom: 80px; right: 18px;
  width: 360px;
  z-index: 300;
  background: rgba(0,0,0,.92);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 20px;
  box-shadow: 0 24px 56px rgba(0,0,0,.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 18px;
  transform: translateY(16px) scale(.97);
  opacity: 0;
  pointer-events: none;
  transition: .25s cubic-bezier(.22,1,.36,1);
}
.dropPanel.open{
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}
.dropPanelHead{
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.dropPanelTitle{
  font-weight: 980; font-size: 14px; color: #fff;
  display: flex; align-items: center; gap: 8px;
}
.dropPanelTitle span{ font-size: 16px; }
.dpClose{
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.10);
  background: transparent; color: rgba(255,255,255,.40);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: .15s; font-size: 14px; line-height: 1;
}
.dpClose:hover{ color: #fff; }

.dropFields{ display: flex; flex-direction: column; gap: 10px; }
.dropField label{
  display: block; font-size: 11px; font-weight: 850;
  color: rgba(255,255,255,.45); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .5px;
}
.dropField input, .dropField select{
  width: 100%; background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 10px; padding: 10px 12px;
  color: #fff; font-size: 13px; font-weight: 750;
  outline: none; transition: .15s;
}
.dropField input:focus, .dropField select:focus{
  border-color: rgba(226,27,35,.40);
  background: rgba(226,27,35,.06);
}
.dropField select option{ background: #1a1c22; color: #fff; }

.generateBtn{
  width: 100%; margin-top: 12px;
  background: linear-gradient(135deg, var(--accent), #ff4a30);
  border: none; border-radius: 12px;
  padding: 12px; color: #fff; font-weight: 980; font-size: 14px;
  cursor: pointer; transition: .15s ease;
}
.generateBtn:hover{ opacity: .92; }
.generateBtn:disabled{ opacity: .5; cursor: default; }

.dropResult{
  margin-top: 14px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 14px;
  font-size: 13px; font-weight: 650; line-height: 1.6;
  color: rgba(255,255,255,.85);
  min-height: 60px;
  display: none;
}
.dropResult.visible{ display: block; }
.dropResult .copyBtn{
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 10px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.60);
  padding: 7px 12px; border-radius: 999px;
  font-size: 11px; font-weight: 850; cursor: pointer;
  transition: .15s;
}
.dropResult .copyBtn:hover{ color: #fff; border-color: rgba(255,255,255,.26); }
.dropResult .copyBtn svg{ width: 12px; height: 12px; }

.moodDevice{ display: flex; flex-direction: column; gap: 0; height: 100%; }
.deviceTabs{
  display: flex; gap: 0; border-bottom: 1px solid var(--line2);
  overflow-x: auto;
}
.deviceTab{
  padding: 10px 14px; font-size: 12px; font-weight: 850;
  /* --muted2 is 46% white, which on the device's own raised surface lands at
     3.9:1 — under AA for 12px. A tab label has to be readable; it is the thing
     you are choosing between. */
  color: var(--muted); cursor: pointer; white-space: nowrap;
  border-bottom: 2px solid transparent; transition: color var(--t1) var(--ease), border-color var(--t1) var(--ease);
  margin-bottom: -1px;
}
.deviceTab.active{ color:var(--accentText); border-bottom-color:var(--accentText); }
.deviceTab:hover:not(.active){ color: var(--text); }

.moodBody{ padding: 14px; flex: 1; }
.moodLabel{ font-size: 11px; font-weight: 850; color: var(--muted2); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.moodChips{ display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.moodChip{
  border: 1px solid var(--line2); background: var(--surface2);
  padding: 7px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 850; color: var(--muted);
  cursor: pointer; transition: .15s;
}
.moodChip:hover{ border-color: var(--accentLine); background: var(--accentSoft); color: var(--text); }
.moodChip.active{ border-color: var(--accentLine); background: var(--accentSoft); color: var(--text); }

.moodTrackList{ display: flex; flex-direction: column; gap: 8px; }
.moodTrack{
  display: flex; gap: 10px; align-items: center;
  padding: 8px 10px; border-radius: 10px;
  border: 1px solid var(--line2); background: var(--surface2);
  transition: .15s; cursor: pointer;
}
.moodTrack:hover{ border-color: var(--accentLine); background: var(--accentSoft); }
.moodTrack.playing{ border-color: var(--accentLine); background: var(--accentSoft); }
.moodTrackIcon{
  width: 30px; height: 30px; border-radius: 8px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.moodTrackInfo{ flex: 1; min-width: 0; }
.moodTrackName{ font-size: 12px; font-weight: 980; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.moodTrackMeta{ font-size: 11px; color: var(--muted2); font-weight: 650; margin-top: 1px; }
.moodTrackDuration{ font-size: 11px; color: var(--muted2); font-weight: 750; }

.waveIcon{ display: flex; align-items: flex-end; gap: 2px; height: 14px; }
.wavebar{ width: 3px; border-radius: 2px; background: var(--accent); animation: wave 1s ease-in-out infinite; }
.wavebar:nth-child(2){ animation-delay: .15s; }
.wavebar:nth-child(3){ animation-delay: .3s; }
@keyframes wave{
  0%,100%{ height: 4px; } 50%{ height: 14px; }
}

body.player-active .wrap{ padding-bottom: 180px; }
body.player-active .cookieWrap{ bottom: 90px; }

@media (max-width: 560px){
  .dropPanel{ width: calc(100vw - 36px); }
  .playerProgress{ display: none; }
  .playerDropBtn span{ display: none; }
}
