/* REPRODUCTOR — barra inferior siempre visible (Anterior / Play / Siguiente)
   + panel de audio expandible que se superpone al fondo del PDF (no fijo,
   así libera espacio real en el layout para el anuncio). */

/* Fila inferior, siempre visible, en flujo normal (ya no es fixed) */
.barra-inferior {
  width: 100%;
  max-width: 700px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
  padding-top: 6px;
  position: relative;
  z-index: 6; /* por encima del panel-audio para que el play nunca quede tapado */
}

/* Anterior / Siguiente — sutiles, tipo ícono, no botones grandes */
.btn-pag-sutil {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.65);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
.btn-pag-sutil:disabled { opacity: 0.25; }
.btn-pag-sutil:focus-visible {
  outline: 2px solid #BEE3F5;
  outline-offset: 2px;
}

/* Botón de play: a caballo entre el PDF y la barra de abajo */
.btn-play-flotante {
  width: 60px;
  height: 60px;
  margin-top: -30px; /* la mitad sube y se superpone al borde inferior del PDF */
  border-radius: 50%;
  background: #7EC8E3;
  border: 3px solid #0b0c10; /* separa visualmente el círculo del PDF que tiene detrás */
  color: #0b0c10;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.55);
  flex-shrink: 0;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.btn-play-flotante:focus-visible {
  outline: 3px solid #FFFFFF;
  outline-offset: 3px;
}

/* Panel de audio expandible: se superpone al PDF, NO empuja el layout */
.panel-audio {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 14px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(to top, rgba(11, 12, 16, 0.92) 30%, rgba(11, 12, 16, 0) 100%);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 0 0 12px 12px;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 4;
}
.panel-audio--abierto {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
@media (prefers-reduced-motion: reduce) {
  .panel-audio { transition: none; }
}

/* Decoración tipo "onda de audio", puramente visual */
.panel-audio__onda {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  height: 16px;
}
.panel-audio__onda span {
  width: 3px;
  border-radius: 2px;
  background: rgba(190, 227, 245, 0.5);
  animation: ondaAudio 1.1s ease-in-out infinite;
}
.panel-audio__onda span:nth-child(1){ height: 6px; animation-delay: 0s; }
.panel-audio__onda span:nth-child(2){ height: 14px; animation-delay: .1s; }
.panel-audio__onda span:nth-child(3){ height: 9px; animation-delay: .2s; }
.panel-audio__onda span:nth-child(4){ height: 16px; animation-delay: .3s; }
.panel-audio__onda span:nth-child(5){ height: 8px; animation-delay: .4s; }
.panel-audio__onda span:nth-child(6){ height: 13px; animation-delay: .5s; }
.panel-audio__onda span:nth-child(7){ height: 6px; animation-delay: .6s; }
@keyframes ondaAudio {
  0%, 100% { transform: scaleY(0.5); }
  50% { transform: scaleY(1); }
}
@media (prefers-reduced-motion: reduce) {
  .panel-audio__onda span { animation: none; }
}

.panel-audio__fila {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.reproductor-select {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #BEE3F5;
  padding: 8px 10px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.8rem;
  outline: none;
  height: 38px;
}
.select-voz { flex: 1; min-width: 0; text-overflow: ellipsis; }
.select-vel { width: 85px; flex-shrink: 0; }

.reproductor-btn-sec {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: #BEE3F5;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 8px 12px;
  font-weight: bold;
  flex: 1;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.reproductor-btn-sec:focus-visible,
.reproductor-select:focus-visible {
  outline: 2px solid #BEE3F5;
  outline-offset: 2px;
}

/* Salto directo de página, dentro del panel (uso poco frecuente) */
.panel-audio__salto {
  font-size: 0.8rem;
  color: #BEE3F5;
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
}
.input-pagina {
  width: 2.6em;
  background: transparent;
  border: none;
  border-bottom: 1px dashed rgba(190, 227, 245, 0.4);
  color: #BEE3F5;
  font-family: inherit;
  font-size: 0.85rem;
  text-align: center;
  padding: 2px 0;
  -moz-appearance: textfield;
}
.input-pagina::-webkit-outer-spin-button,
.input-pagina::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.input-pagina:focus {
  outline: none;
  border-bottom-color: #7EC8E3;
  border-bottom-style: solid;
}
