/* OTB Beat Player (MVP) */

/* Contenedor principal */
.otb-testbar {
  padding: 12px;
  background: #111;
  color: #fff;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  border: 1px solid #222;
  border-radius: 10px;
  color-scheme: light;
}

/* Controles */
.otb-testbar [data-otb-action] {
  appearance: none;
  border: 1px solid #333;
  background: #1a1a1a;
  color: #fff;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.otb-testbar [data-otb-action]:hover {
  border-color: #555;
  background: #222;
}

.otb-testbar [data-otb-action]:active {
  transform: translateY(1px);
}

.otb-iconbtn svg{
  width: 16px;
  height: 16px;
  display: block;
  fill: currentColor;
}

/* Estado */
.otb-testbar .otb-status {
  opacity: 0.85;
  font-size: 14px;
  margin-left: 6px;
}

/* Audio hidden (solo usamos JS) */
.otb-testbar audio {
  display: none;
}

/* Lista de pistas */
.otb-testbar .otb-tracklist {
  width: 100%;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Botones de pista */
.otb-testbar .otb-tracklist [data-otb-track] {
  appearance: none;
  border: 1px solid #333;
  background: #141414;
  color: #fff;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.otb-testbar .otb-tracklist [data-otb-track]:hover {
  border-color: #555;
  background: #1c1c1c;
}

/* Pista activa (tu JS añade/quita .is-active) */
.otb-testbar .otb-tracklist [data-otb-track].is-active {
  border-color: #0af;
  background: #0a2230;
}

/* Imagen de fondo en la pista */
.otb-track-btn{
  position: relative;
  overflow: hidden;
}

.otb-track-btn .otb-track-label{
  position: relative;
  z-index: 2;
  display: block;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0,0,0,0.7);
}

.otb-track-btn.has-img{
  border-color: #0f0f0f;
  background: #0f0f0f;
  color: #fff;
}

.otb-track-btn.has-img::before{
  content: "";
  position: absolute;
  inset: 0;
  background: var(--otb-track-img, none) center / cover no-repeat;
  z-index: 0;
}

.otb-track-btn.has-img::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.7), rgba(0,0,0,0.3));
  z-index: 1;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.otb-track-btn.has-img:hover::after{
  background: linear-gradient(90deg, rgba(0,0,0,0.6), rgba(0,0,0,0.25));
  opacity: 0.95;
}

.otb-testbar .otb-tracklist .otb-price {
  margin-left: 8px;
  color: #0af;
  font-weight: 600;
}

.otb-testbar .otb-add-to-cart {
  border: 1px solid #0a9;
  background: #0c3;
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}

.otb-testbar .otb-add-to-cart:hover {
  background: #0f4;
  border-color: #0b6;
}

.otb-testbar .otb-add-to-cart[aria-disabled="true"] {
  opacity: 0.6;
  pointer-events: none;
}

/* Responsivo: botones en fila, lista abajo */
@media (max-width: 520px) {
  .otb-testbar {
    gap: 8px;
  }
  .otb-testbar [data-otb-action] {
    padding: 10px 10px;
  }
}


/* Ver carrito (icono) */
.otb-view-cart{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #bbb;
  background: #fff;
  color: #111;
}

.otb-view-cart:hover{
  filter: brightness(0.97);
}

.otb-cart-icon{
  width: 18px;
  height: 18px;
  display: inline-block;
}

.otb-view-cart-text{
  font-size: 14px;
  line-height: 1;
}
/* ===== OTB: Ver carrito (tamaño + contraste) ===== */

/* Botones de acción (añadir / ver carrito) más compactos */
a.otb-add-to-cart,
a.otb-view-cart,
a.otb-cart-link,
a[data-otb-view-cart]{
  font-size: 13px;
  padding: 6px 10px;
  line-height: 1;
  border-radius: 8px;
}

/* Ver carrito: fondo oscuro + texto/icono claro */
a.otb-view-cart,
a.otb-cart-link,
a[data-otb-view-cart]{
  background: #1f1f1f;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,0.25);
  text-decoration: none;
}

/* Hover */
a.otb-view-cart:hover,
a.otb-cart-link:hover,
a[data-otb-view-cart]:hover{
  background: #2b2b2b;
}

/* Si el icono es SVG: que herede el color del enlace */
a.otb-view-cart svg,
a.otb-cart-link svg,
a[data-otb-view-cart] svg{
  width: 16px;
  height: 16px;
  fill: currentColor;
  stroke: currentColor;
}

/* Si el icono es Dashicons */
a.otb-view-cart .dashicons,
a.otb-cart-link .dashicons,
a[data-otb-view-cart] .dashicons{
  font-size: 16px;
  width: 16px;
  height: 16px;
  line-height: 16px;
  color: currentColor;
}

/* ===== Layout: controles visibles (sin cortar) ===== */

.otb-testbar{
  flex-direction: column;
  align-items: stretch;
  flex-wrap: nowrap;
  width: 100%;
  box-sizing: border-box;
}

/* Controles: se ponen en fila y, si no caben, saltan a la siguiente línea */
.otb-testbar .otb-controls{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  width: 100%;
  overflow: visible;
}

/* Evita que los botones se “aplaste” raro */
.otb-testbar .otb-controls > *{
  flex: 0 0 auto;
}

/* Oculta el <audio> sí o sí (aunque el tema lo fuerce) */
.otb-testbar audio{
  display: none !important;
}
.otb-seekwrap{ width:100%; }
.otb-seek{ width:100%; }
.otb-volwrap{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  white-space: nowrap;
}

.otb-testbar .otb-controls > .otb-volwrap{
  flex: 0 0 auto;
}

.otb-voltext{
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid #333;
  background: #1a1a1a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  font-size: 0;
}

.otb-voltext::before{
  content: "";
  width: 16px;
  height: 16px;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M4 9v6h4l5 5V4L8 9H4zm13.5 3a3.5 3.5 0 0 0-2.71-3.4v6.79A3.5 3.5 0 0 0 17.5 12zm-2.71-6.9v2.13A6.5 6.5 0 0 1 20 12a6.5 6.5 0 0 1-5.21 6.36v2.13A8.5 8.5 0 0 0 22 12a8.5 8.5 0 0 0-7.21-6.9z'/%3E%3C/svg%3E");
}

.otb-voltext:hover{
  border-color: #555;
  background: #222;
}

.otb-testbar .otb-vol{
  display: none;
  position: absolute;
  left: 80%;
  top: -150%;
  transform: translate(-50%, -50%) rotate(-90deg);
  transform-origin: center center;
  width: 140px;
  height: 40px;
  background: #111;
  border: 1px solid #222;
  border-radius: 8px;
  padding: 8px 10px;
  box-sizing: border-box;
  z-index: 20;
}

.otb-volwrap.is-open .otb-vol{
  display: block;
}

/* Tracklist por filas (nombre + licencias + añadir) */
.otb-tracklist{
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.otb-track-row{
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
}

.otb-track-btn{
  flex: 1 1 auto;
  text-align: left;
}

/* Mantener marcado de pista activa */
.otb-track-btn.is-active{
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.otb-track-buy{
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.otb-license{
  max-width: 260px;
}

.otb-row-add{
  display: inline-block;
  padding: 6px 10px;
  border-radius: 8px;
  text-decoration: none;
}

/* Móvil: que no se rompa */
@media (max-width: 600px){
  .otb-track-row{ flex-wrap: wrap; }
  .otb-track-buy{
    width: 100%;
    justify-content: flex-end;
  }
  .otb-license{
    flex: 1 1 auto;
    max-width: none;
  }
}

/* Selector de licencias: legible incluso con SO/navegador en dark mode.
   Nota: <select>/<option> nativos tienen l?mites de estilado; color-scheme afecta al "popup" nativo. */
.otb-testbar .otb-license{
  color-scheme: light;              /* fuerza UI clara en el control nativo */
  -webkit-appearance: auto;
  appearance: auto;
  background-color: #ffffff !important;
  color: #111111 !important;
  border: 1px solid rgba(0,0,0,0.35);
  border-radius: 8px;
  padding: 6px 10px;
}

.otb-testbar .otb-license:focus,
.otb-testbar .otb-license:focus-visible{
  outline: 2px solid #0af;
  outline-offset: 2px;
  color-scheme: light;
}

.otb-testbar .otb-license:active{
  background-color: #ffffff !important;
  color: #111111 !important;
}

/* Algunos navegadores ignoran esto en el popup (limitaci?n del control nativo), pero no estorba */
.otb-testbar .otb-license option{
  background-color: #ffffff;
  color: #111111;
}

/* Carrito: cuando hay items, cambia color */
.otb-testbar a.otb-view-cart.otb-cart-has-items{
  border-color: #0af;
  background: #0a2230;
}

/* Badge contador */
.otb-testbar .otb-cart-count{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  background: #fff;
  color: #111;
}

/* Ajustes responsive (movil) */
@media (max-width: 760px){
  .otb-testbar{
    padding: 12px 14px;
    gap: 8px;
  }

  .otb-testbar .otb-controls{
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .otb-testbar [data-otb-action],
  .otb-testbar .otb-view-cart{
    width: 100%;
  }

  .otb-testbar [data-otb-action]{
    padding: 8px 6px;
  }

  .otb-testbar .otb-volwrap{
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    justify-content: center;
    grid-column: auto;
    margin-left: auto;
  }

  .otb-testbar .otb-view-cart{
    grid-column: 1 / -1;
    justify-content: center;
  }

  .otb-testbar .otb-vol{
    left: 50%;
    top: -0.1;
    bottom: auto;
    transform: translate(-50%, -100%) rotate(-90deg);
    transform-origin: center center;
  }
}

@media (max-width: 480px){
  .otb-testbar{
    padding: 6px 8px;
    font-size: 14px;
    border-radius: 8px;
  }

  .otb-tracklist{
    gap: 8px;
  }

  .otb-track-row{
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .otb-track-buy{
    width: 100%;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
  }

  .otb-license{
    width: 100%;
  }

  .otb-row-add{
    width: auto;
  }

  .otb-track-btn{
    padding: 10px;
    font-size: 14px;
  }

  .otb-view-cart-text{
    display: none;
  }
}

.otb-volwrap{
  overflow: visible;
}



























