/* =======================
   馃帶 Player de Audio - Estilo Profesional
   ======================= */
#radio-player-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #78bc1d;
    padding: 2px 0;
    z-index: 99999;
    display: flex;
    justify-content: center;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
}

/* 馃幆 CONTENEDOR PRINCIPAL DEL PLAYER
   Aqu铆 defines el ancho y alto del reproductor completo.
   Puedes cambiar:
   - max-width: para el ancho (1243px)
   - height: para el alto (150px)
*/
.player-content {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    max-width: 1243px !important;
    width: 100% !important;
    height: 80px !important;
    padding: 0 5px !important;
    flex-wrap: wrap !important;
}

/* ✅ Contenedor principal con fondo GIF al sonar */
#radio-player-container.playing {
    background-image: url('images/ecualizer.gif');
    background-repeat: repeat-x; /* 🔁 Se repite horizontalmente */
    background-size: auto 100%;  /* ✅ Alto completo, ancho automático */
    background-position: center center;
}

/* ✅ Cuando está pausado, fondo color sólido */
#radio-player-container:not(.playing) {
    background-color: #78bc1d;
    background-image: none;
}

/* CONTROLES IZQUIERDA */
.player-controls-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Bot贸n Play/Pause */
.player-button {
    background: #FF0000;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Control de Volumen */
#volume-control {
    width: 120px;
    accent-color: #FFEA00;
    background: transparent;
}

.volume-icon {
    color: white;
    font-size: 20px;
}

/* Metadata canci贸n */
.radio-label {
    font-weight: normal;
    font-size: 14px;
    color: inherit; /* 馃敟 Hereda el color del contenedor (desde el template) */
    padding: 0;
    background: none;
    border: none;
}

/* Redes sociales */
.player-social-icons {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.icon-social {
    color: white;
    font-size: 20px;
    transition: 0.3s;
    text-decoration: none;
}

.icon-social:hover {
    color: #ffea00;
}

/* Loader */
.player-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    z-index: 9999;
}

.spinner {
    width: 30px;
    height: 30px;
    border: 4px solid #fff;
    border-top: 4px solid #ffea00;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Imagen (si usas slider de logos) */
.player-image-slider {
  width: 60px;
  height: 60px;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  margin-right: 15px;
}

.slider-img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease;
}

.slider-img.active {
  opacity: 1;
}

/* Logo cuadrado */
.player-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.player-logo img {
  width: 60px !important;
  height: 60px !important;
  object-fit: cover;
  border-radius: 10px;
}

.player-info h3 {
  font-size: 20px;
  margin-bottom: 6px;
  font-weight: 600;
  color: inherit;
}

.player-info .radio-label {
  margin-top: 0;
}

/* Animaci贸n loader */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.metadata-wrapper {
  max-width: 250px; /* Ajusta según el espacio que tengas disponible */
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  margin-left: 6px; /* Separación después de "Sonando:" */
}

.metadata-scroller {
  display: inline-block;
  padding-left: 100%;
  animation: scroll-metadata 15s linear infinite;
}

@keyframes scroll-metadata {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-100%);
  }
}

.cc_streaminfo {
  display: inline-block;
  white-space: nowrap;
  font-size: 0.9rem;
  color: #fff;
}


#player-image {
    transition: all 0.3s ease-in-out;
}

@media screen and (max-width: 480px) {
  /* Solo mostrar: logo, play/pause, y volumen */
  .player-info,
  .player-social-icons,
  .metadata-wrapper,
  .metadata-scroller,
  .radio-label,
  .cc_streaminfo {
    display: none !important;
  }

  .player-content {
    flex-direction: row;
    justify-content: space-around !important;
    align-items: center !important;
    padding: 8px !important;
    height: auto !important;
  }

  .player-logo img {
    width: 50px !important;
    height: 50px !important;
  }

  .player-button {
    width: 45px;
    height: 45px;
    font-size: 20px;
  }

  #volume-control {
    width: 80px;
  }

  .volume-icon {
    font-size: 18px;
  }
}