/* ============================================================
   Leitor de rádio flutuante — Tiago Portfolio Core
   Paleta do manual: noir #07080D · papel #F7F5F0 · azul #536DFE
   · roxo #8B5CF6 · dourado #D6AD60 · ciano #44D0DB
   ============================================================ */
.tdp-radio {
  position: fixed;
  left: clamp(14px, 3vw, 28px);
  bottom: clamp(14px, 3vw, 28px);
  z-index: 990;
  font-family: 'DM Sans', Arial, sans-serif;
}

/* Botão flutuante com equalizador animado */
.tdp-radio-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 12px;
  border: 1px solid rgba(68, 208, 219, .45);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(83, 109, 254, .22), rgba(139, 92, 246, .18)), #0b0e17;
  color: #F7F5F0;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5), 0 0 0 0 rgba(68, 208, 219, .5);
  transition: transform .18s ease, box-shadow .3s ease;
  animation: tdp-radio-glow 3.2s ease-in-out infinite;
}
.tdp-radio-toggle:hover { transform: translateY(-2px); }
@keyframes tdp-radio-glow {
  0%, 100% { box-shadow: 0 10px 30px rgba(0,0,0,.5), 0 0 0 0 rgba(68,208,219,.35); }
  50%      { box-shadow: 0 10px 34px rgba(0,0,0,.55), 0 0 22px 2px rgba(83,109,254,.35); }
}

/* Equalizador SVG animado */
.tdp-eq { width: 22px; height: 20px; display: block; }
.tdp-eq rect { fill: #44D0DB; transform-box: fill-box; transform-origin: bottom; animation: tdp-eq 1s ease-in-out infinite; }
.tdp-eq rect:nth-child(2) { fill: #536DFE; animation-delay: .15s; }
.tdp-eq rect:nth-child(3) { fill: #D6AD60; animation-delay: .3s; }
.tdp-eq rect:nth-child(4) { fill: #8B5CF6; animation-delay: .45s; }
@keyframes tdp-eq { 0%,100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
/* Anima quando está a tocar ou a ligar */
.tdp-radio:not([data-playing="true"]):not([data-loading="true"]) .tdp-eq rect { animation-play-state: paused; transform: scaleY(.4); }
.tdp-radio[data-loading="true"] .tdp-radio-play { animation: tdp-radio-pulse 1s ease-in-out infinite; }
@keyframes tdp-radio-pulse { 0%,100% { opacity: .6; } 50% { opacity: 1; } }

/* Painel */
.tdp-radio-panel[hidden] { display: none; }
.tdp-radio-panel {
  position: absolute;
  left: 0;
  bottom: calc(100% + 12px);
  width: min(320px, 84vw);
  padding: 18px;
  background: rgba(9, 11, 17, .97);
  border: 1px solid rgba(214, 173, 96, .35);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .6);
  color: #F7F5F0;
}
.tdp-radio-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.tdp-radio-now { font-size: 13px; color: #D6AD60; font-weight: 600; letter-spacing: .02em; }
.tdp-radio-close { background: none; border: 0; color: #aeb4c4; font-size: 22px; line-height: 1; cursor: pointer; }
.tdp-radio-close:hover { color: #F7F5F0; }

.tdp-radio-station {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid rgba(247, 245, 240, .18);
  border-radius: 10px;
  background: #10131d;
  color: #F7F5F0;
  font: inherit;
  margin-bottom: 14px;
}
.tdp-radio-controls { display: flex; align-items: center; gap: 14px; }
.tdp-radio-play {
  flex: 0 0 auto;
  width: 46px; height: 46px;
  border: 0; border-radius: 50%;
  background: #536DFE; color: #F7F5F0;
  font-size: 15px; cursor: pointer;
  transition: filter .18s ease, transform .18s ease;
}
.tdp-radio-play:hover { filter: brightness(1.1); transform: scale(1.05); }
.tdp-radio-vol { flex: 1 1 auto; accent-color: #44D0DB; }

@media (max-width: 520px) {
  .tdp-radio-label { display: none; }
  .tdp-radio-toggle { padding: 12px; }
}
