/* ==== RADIO BAR PREMIUM ESTILO SIPSE / SPOTIFY ==== */

.radio-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 90px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 30px;
  z-index: 9999;

  font-family: "Segoe UI", sans-serif;
  color: #000000;

  /* Sombra premium */
  box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.4);
}

/* --- IZQUIERDA --- */
.rb-left {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 25%;
}

.rb-logo {
  width: 65px;
  height: 65px;
  object-fit: contain;
  border-radius: 10px;

  background: #111;
  padding: 5px;
  box-shadow: 0 0 10px rgba(230, 194, 0, 0.25);
}

.rb-info h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.rb-info p {
  margin: 0;
  font-size: 13px;
  opacity: 0.65;
}

/* --- CENTRO (CONTROLES) --- */

.rb-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  flex-grow: 1;
}

.rb-btn {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: white;
  background: #202020;
  display: flex;
  justify-content: center;
  align-items: center;

  transition: 0.2s ease-in-out;
}

.rb-btn:hover {
  background: #2c2c2c;
  transform: scale(1.12);
}

.rb-btn.play {
  width: 58px;
  height: 58px;
  font-size: 26px;
  background: #e6c200;
  color: #000;

  box-shadow: 0 0 12px rgba(230, 194, 0, 0.4);
}

.rb-btn.play:hover {
  background: #ffdd22;
  transform: scale(1.15);
}

/* --- DERECHA (VOLUMEN) --- */

.rb-right {
  min-width: 20%;
  display: flex;
  justify-content: flex-end;
}

#rb-volume {
  appearance: none;
  width: 150px;
  height: 5px;
  border-radius: 5px;
  background: #444;
  outline: none;
}

/* Bolita del volumen */
#rb-volume::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #e6c200;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(230, 194, 0, 0.4);
  transition: 0.2s;
}

#rb-volume::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

/* ===== SIDEBAR DE ESTACIONES ===== */

.radio-list {
  position: fixed;
  bottom: 100px;
  right: -350px; /* Oculta */
  width: 320px;
  height: auto;
  max-height: calc(100vh - 120px);
  background: rgba(15, 15, 20, 0.95);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 20px;
  border-radius: 20px;
  transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
  z-index: 99999;
  overflow-y: auto;
  opacity: 0;
  box-shadow: 0 15px 40px rgba(0,0,0,0.6);
}

.radio-list.open {
  right: 20px;
  opacity: 1;
}

/* Boton dentro de la radio bar */
.list-btn {
  margin-left: 15px;
}

/* BOTONES DE LA LISTA */
.radio-btn {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.05);
  background: rgba(255,255,255,0.02);
  color: white;
  padding: 10px 14px;
  border-radius: 12px;
  margin-bottom: 12px;
  cursor: pointer;

  display: flex;
  justify-content: space-between;
  align-items: center;

  transition: all 0.3s ease;
}

.radio-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}


.radio-btn .rb-item-name {
  text-align: left;
  font-size: 0.95rem;
  font-weight: 700;
}


.radio-btn .rb-item-logo {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: contain;
  background: #000;
  padding: 4px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.radio-btn.activa {
  background: #fdd835;
  color: #000;
  border-color: #fdd835;
  box-shadow: 0 5px 15px rgba(253, 216, 53, 0.3);
}

#btn-close-menu {
  width: 100%;
  padding: 14px;
  background-color: transparent; 
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
  text-align: center;
  margin-top: 15px; 
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.9rem;
}

#btn-close-menu::before {
  content: '\f00d'; 
  font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free';
  font-weight: 900;
}

#btn-close-menu:hover {
  background-color: #ef4444; 
  border-color: #ef4444;
  transform: translateY(-2px);
}

/* ===== RESPONSIVE RADIO BAR ===== */
@media screen and (max-width: 768px) {

  /* Barra de radio más compacta */
  .radio-bar {
    padding: 8px 15px;
    height: 80px;
  }

  .rb-left {
    min-width: 30%;
    gap: 10px;
  }

  .rb-logo {
    width: 50px;
    height: 50px;
  }

  .rb-info h4 {
    font-size: 14px;
  }

  .rb-info p {
    font-size: 11px;
  }

  .rb-center {
    gap: 15px;
  }

  .rb-btn {
    width: 40px;
    height: 40px;
  }

  .rb-btn.play {
    width: 50px;
    height: 50px;
  }

  #rb-volume {
    width: 100px;
  }

  /* Botón del menú */
  .list-btn svg {
    width: 20px;
    height: 20px;
  }

  .radio-list {
    width: calc(100% - 40px); /* No ocupa toda la pantalla */
    right: -100%;
    bottom: 95px;
    padding: 15px;
  }

  .radio-list.open {
    right: 20px;
  }

  .radio-btn {
    padding: 12px 10px;
    font-size: 16px;
  }

  .rb-item-logo {
    width: 35px;
    height: 35px;
  }

  /* Scroll suave para móviles */
  .radio-list {
    -webkit-overflow-scrolling: touch;
  }
}

/* ===== RESPONSIVE PARA CELULARES PEQUEÑOS ===== */
@media screen and (max-width: 480px) {

  .rb-left {
    min-width: 35%;
    gap: 8px;
  }

  .rb-logo {
    width: 40px;
    height: 40px;
  }

  .rb-info h4 {
    font-size: 12px;
  }

  .rb-info p {
    font-size: 10px;
  }

  .rb-center {
    gap: 10px;
  }

  .rb-btn {
    width: 35px;
    height: 35px;
  }

  .rb-btn.play {
    width: 45px;
    height: 45px;
  }

  #rb-volume {
    width: 80px;
  }

  .radio-btn {
    font-size: 14px;
    padding: 10px 8px;
  }

  .rb-item-logo {
    width: 30px;
    height: 30px;
  }
}

@media screen and (max-width: 768px) {
  .radio-bar {
    height: auto !important;
    min-height: 92px !important;
    padding: 8px 12px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px 10px !important;
    align-items: center !important;
  }

  .rb-left {
    flex: 1 1 calc(100% - 150px) !important;
    min-width: 0 !important;
    gap: 9px !important;
  }

  .rb-logo {
    width: 46px !important;
    height: 46px !important;
    flex: 0 0 46px !important;
  }

  .rb-info {
    min-width: 0 !important;
  }

  .rb-info h4,
  .rb-info p {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .rb-info h4 {
    font-size: 13px !important;
    line-height: 1.15 !important;
  }

  .rb-info p {
    font-size: 11px !important;
  }

  .rb-center {
    flex: 0 0 auto !important;
    gap: 8px !important;
  }

  .rb-btn {
    width: 38px !important;
    height: 38px !important;
    font-size: 16px !important;
  }

  .rb-btn.play {
    width: 46px !important;
    height: 46px !important;
    font-size: 21px !important;
  }

  .rb-right {
    flex: 1 1 100% !important;
    min-width: 0 !important;
    justify-content: center !important;
  }

  #rb-volume {
    width: min(240px, 78vw) !important;
  }
}

@media screen and (max-width: 480px) {
  .radio-bar {
    min-height: 88px !important;
    padding: 7px 10px !important;
  }

  .rb-left {
    flex-basis: calc(100% - 132px) !important;
    gap: 7px !important;
  }

  .rb-logo {
    width: 40px !important;
    height: 40px !important;
    flex-basis: 40px !important;
  }

  .rb-center {
    gap: 6px !important;
  }

  .rb-btn {
    width: 34px !important;
    height: 34px !important;
    font-size: 14px !important;
  }

  .rb-btn.play {
    width: 42px !important;
    height: 42px !important;
    font-size: 19px !important;
  }

  #rb-volume {
    width: min(220px, 76vw) !important;
  }
}

@media screen and (max-width: 768px) {
  .list-btn {
    margin-left: 22px !important;
    margin-right: 2px !important;
  }
}

@media screen and (max-width: 480px) {
  .list-btn {
    margin-left: 18px !important;
    margin-right: 0 !important;
  }
}
