/* Player persistente: controles à esquerda, informação central e aplicativo à direita. */
.player-bar {
  position: fixed;
  inset: 0 0 auto;
  height: var(--player-height);
  z-index: 100;
  background: #202326;
  color: #fff;
  box-shadow: 0 3px 14px #12192320;
}
.player-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 100%;
}
.album-art {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  border-right: 1px solid #ffffff20;
  padding-right: 18px;
}
.album-art svg {
  width: 38px;
  height: 38px;
  color: var(--primary);
  stroke-width: 3;
}
.player-track {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.metadata-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}
.metadata-heading strong {
  font-size:calc(12px * var(--text-scale,1));
  font-weight: 700;
  color: #b9c0c5;
  white-space: nowrap;
}
.metadata-heading .live-label {
  font-size:calc(10px * var(--text-scale,1));
  font-weight: 600;
  color: #b9c0c5;
  gap: 6px;
}
.metadata-heading .live-dot {
  width: 6px;
  height: 6px;
}
.ticker-window {
  min-width: 0;
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  padding: 0;
  border: 0;
  background: transparent;
}
.song-ticker {
  font-size:calc(19px * var(--text-scale,1));
  font-weight: 700;
  line-height: 27px;
  letter-spacing: -0.015em;
  color: #fff;
}
.presenter-ticker {
  font-size:calc(15px * var(--text-scale,1));
  font-weight: 800;
  line-height: 21px;
  color: #fff;
}
.ticker-content {
  display: flex;
  align-items: center;
  gap: var(--ticker-gap, 48px);
  width: max-content;
}
.ticker-original,
.ticker-duplicate {
  display: block;
  flex-shrink: 0;
}
.ticker-duplicate {
  display: none;
}
.has-overflow .ticker-duplicate {
  display: block;
}
.has-overflow .ticker-content {
  animation: ticker-scroll var(--ticker-duration, 18s) linear infinite;
}
.ticker-window:hover .ticker-content,
.ticker-window:focus-within .ticker-content {
  animation-play-state: paused;
}
.is-unavailable {
  color: #a4adb4;
}
@keyframes ticker-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-1 * var(--ticker-distance)));
  }
}
.play-button {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 0;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  transition:
    background 0.2s,
    transform 0.2s;
}
.play-button:hover {
  background: #e73c44;
  transform: scale(1.04);
}
.play-button .icon {
  width: 27px;
  height: 27px;
  stroke-width: 2.7;
}
.play-button[data-state="loading"] {
  animation: loading-pulse 1s ease-in-out infinite;
}
@keyframes loading-pulse {
  50% {
    opacity: 0.6;
  }
}
.volume-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 145px;
  flex-shrink: 0;
}
.volume-button {
  color: #c8cdd1;
}
.volume-button:hover {
  color: #fff;
  background: #ffffff10;
}
.volume-controls input {
  width: 100%;
  min-width: 40px;
  height: 4px;
  border-radius: 3px;
  appearance: none;
  background: linear-gradient(to right, var(--primary) 75%, #50565e 75%);
  cursor: pointer;
}
.volume-controls input::-webkit-slider-thumb {
  appearance: none;
  background: #fff;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.volume-controls input::-moz-range-thumb {
  background: #fff;
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
}
.radio-app {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
  padding: 10px 0 10px 24px;
  border: 0;
  border-left: 1px solid #ffffff20;
  background: transparent;
  color: #fff;
  text-align: left;
  transition: color 0.2s;
}
.radio-app:hover {
  color: #dce2e6;
}
.radio-app > .icon {
  width: 25px;
  height: 25px;
  stroke-width: 1.6;
}
.radio-app > span {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.radio-app strong {
  font-size:calc(12px * var(--text-scale,1));
  font-weight: 700;
}
.app-mobile-label {
  display: none;
}
.radio-app small {
  font-size:calc(10px * var(--text-scale,1));
  color: #a4adb4;
}
.radio-app small span {
  padding: 0 3px;
}
.equalizer {
  display: flex;
  gap: 4px;
  align-items: center;
  height: 39px;
  color: var(--primary);
}
.equalizer i {
  display: block;
  background: currentColor;
  width: 4px;
  border-radius: 4px;
  height: 16px;
}
.equalizer i:nth-child(2n) {
  height: 30px;
}
.equalizer i:nth-child(3n) {
  height: 39px;
}
.player-waveform {
  flex-shrink: 0;
  height: 36px;
  gap: 4px;
  color: var(--primary);
}
.player-waveform i {
  width: 3px;
  height: 12px;
}
.player-waveform i:nth-child(2n) {
  height: 25px;
}
.player-waveform i:nth-child(3n) {
  height: 36px;
}
body.is-playing .player-waveform i {
  animation: equalize 0.8s ease-in-out infinite alternate;
}
body.is-playing .player-waveform i:nth-child(2n) {
  animation-delay: -0.3s;
}
body.is-playing .player-waveform i:nth-child(3n) {
  animation-delay: -0.55s;
}
.presenter-line {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.presenter-line > .icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: #fff;
}
.presenter-line[data-presenter-mode="automatic"] .presenter-ticker,
.presenter-line[data-presenter-mode="automatic"] > .icon {
  color: #9ee8cc;
}
.metadata-heading .live-label {
  color: #f5c8ca;
  font-weight: 700;
}
.metadata-heading .live-dot {
  position: relative;
}
.metadata-heading .live-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1px solid #ff656a;
  border-radius: 50%;
  animation: live-ripple 2s ease-out infinite;
}
@keyframes live-ripple {
  0% {
    transform: scale(0.6);
    opacity: 0.8;
  }
  75%,
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}
@keyframes equalize {
  from {
    transform: scaleY(0.35);
  }
  to {
    transform: scaleY(1);
  }
}
@media (max-width: 1150px) {
  .player-inner {
    gap: 18px;
  }
  .volume-controls {
    width: 110px;
  }
  .radio-app {
    padding-left: 18px;
  }
}
@media (max-width: 950px) {
  .album-art {
    display: none;
  }
  .volume-controls {
    width: 90px;
  }
  .song-ticker {
    font-size:calc(18px * var(--text-scale,1));
  }
}
@media (max-width: 760px) {
  .player-inner {
    gap: 10px;
  }
  .play-button {
    width: 44px;
    height: 44px;
  }
  .play-button .icon {
    width: 23px;
    height: 23px;
  }
  .metadata-heading {
    gap: 8px;
  }
  .metadata-heading strong {
    font-size:calc(10px * var(--text-scale,1));
  }
  .metadata-heading .live-label {
    font-size:calc(9px * var(--text-scale,1));
  }
  .player-waveform {
    height: 24px;
    gap: 2px;
  }
  .player-waveform i {
    width: 2px;
    height: 8px;
  }
  .player-waveform i:nth-child(2n) {
    height: 16px;
  }
  .player-waveform i:nth-child(3n) {
    height: 24px;
  }
  .song-ticker {
    font-size:calc(15px * var(--text-scale,1));
    line-height: 23px;
  }
  .presenter-ticker {
    font-size:calc(13px * var(--text-scale,1));
    line-height: 19px;
  }
  .player-track {
    gap: 4px;
  }
  .volume-controls {
    width: auto;
  }
  .presenter-line {
    gap: 5px;
  }
  .presenter-line > .icon {
    width: 12px;
    height: 12px;
  }
  .volume-controls input {
    display: none;
  }
  .volume-button {
    padding: 5px;
  }
  .volume-button .icon {
    width: 18px;
    height: 18px;
  }
  .radio-app {
    flex-direction: column;
    text-align: center;
    gap: 4px;
    padding: 5px 0 5px 10px;
  }
  .radio-app > .icon {
    width: 21px;
    height: 21px;
  }
  .radio-app strong {
    font-size:calc(9px * var(--text-scale,1));
  }
  .app-desktop-label {
    display: none;
  }
  .app-mobile-label {
    display: inline;
  }
  .radio-app small {
    font-size:calc(8px * var(--text-scale,1));
  }
  .radio-app small span {
    display: none;
  }
  .radio-app small {
    font-size: 0;
  }
  .radio-app small::after {
    content: "Instalar";
    font-size:calc(8px * var(--text-scale,1));
  }
}
@media (max-width: 360px) {
  .player-inner {
    gap: 8px;
  }
  .metadata-heading {
    gap: 5px;
  }
  .metadata-heading strong {
    font-size:calc(9px * var(--text-scale,1));
  }
  .metadata-heading .live-label {
    font-size:calc(8px * var(--text-scale,1));
  }
  .play-button {
    width: 40px;
    height: 40px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .metadata-heading .live-dot::after { animation: none !important; opacity: 0; }
  .ticker-content {
    animation: none !important;
  }
  .ticker-duplicate {
    display: none !important;
  }
}

@media (max-width: 360px) {
  .player-inner {
    gap: 6px;
  }
  .player-waveform {
    gap: 2px;
  }
  .player-waveform i {
    width: 1.5px;
  }
  .metadata-heading {
    flex-wrap: wrap;
    gap: 1px 8px;
  }
}

.player-reconnect { position:absolute; top:calc(100% + 8px); right:24px; max-width:min(450px,calc(100% - 32px)); background:#fff; color:#283445; border:1px solid #e3e6ea; border-left:3px solid var(--primary); border-radius:10px; padding:15px 18px; box-shadow:0 8px 24px #18202b20; font-size:calc(12px * var(--text-scale,1)); }
.player-reconnect > div { display:flex; gap:8px; margin-top:10px; }
.player-reconnect button { border:1px solid #e4e7ec; border-radius:6px; padding:6px 11px; background:#f7f8fa; font-size:calc(11px * var(--text-scale,1)); font-weight:700; }
.player-reconnect button:first-child { background:var(--primary); color:white; border-color:var(--primary); }
.play-button[data-state=reconnecting] { animation:loading-pulse 1s ease-in-out infinite; }
