/* e-soundtrax catalogue player v2 — scoped to the fixed catalogue player only. */
.player-v2-host {
  --player-v2-side-inset: 16px;
  --player-v2-bottom-inset: 14px;
  --player-v2-layout-left: clamp(18px, 2.2vw, 44px);
  --player-v2-layout-right: max(18px, 9.5vw);
  height: calc(88px + var(--player-v2-bottom-inset) + env(safe-area-inset-bottom));
}

.player-v2.audio_nuevo {
  left: var(--player-v2-side-inset);
  right: var(--player-v2-side-inset);
  bottom: calc(var(--player-v2-bottom-inset) + env(safe-area-inset-bottom));
  width: auto;
  min-height: 88px;
  height: 88px;
  padding: 0;
  background: #080808;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .42);
}

.player-v2__inner {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 120px minmax(120px, 180px) minmax(180px, 1fr) 112px minmax(100px, 120px) minmax(140px, 160px);
  align-items: center;
  gap: clamp(10px, 1.25vw, 20px);
  padding: 0 max(4px, calc(var(--player-v2-layout-right) - var(--player-v2-side-inset)))
             0 max(4px, calc(var(--player-v2-layout-left) - var(--player-v2-side-inset)));
}

.player-v2__transport {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.player-v2 .player-v2__transport-button,
.player-v2 .player-v2__icon-button,
.player-v2 .player-v2__volume-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  color: #b9b9b9;
  border: 0;
  background: transparent;
  transition: color 140ms ease, opacity 140ms ease, border-color 140ms ease, background-color 140ms ease;
}

.player-v2 .player-v2__transport-button {
  width: 34px;
  height: 42px;
}

.player-v2 .player-v2__play-button {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(232, 232, 232, .7);
  border-radius: 50%;
}

.player-v2 .player-v2__transport-button:hover,
.player-v2 .player-v2__transport-button:focus-visible,
.player-v2 .player-v2__icon-button:hover,
.player-v2 .player-v2__icon-button:focus-visible,
.player-v2 .player-v2__volume-button:hover,
.player-v2 .player-v2__volume-button:focus-visible {
  opacity: 1;
  outline: none;
}

.player-v2 .player-v2__play-button:hover,
.player-v2 .player-v2__play-button:focus-visible {
  border-color: #fff;
  background: rgba(255, 255, 255, .04);
}

.player-v2 .player-v2__transport-button .play,
.player-v2 .player-v2__transport-button .pause {
  height: 20px;
  max-width: 20px;
}

.player-v2 .player-v2__transport-button .pasar {
  height: 16px;
  max-width: 18px;
  opacity: .82;
}

.player-v2__identity {
  min-width: 0;
  overflow: hidden;
}

.player-v2.audio_nuevo .player-v2__identity h4 {
  margin: 0;
  overflow: hidden;
  color: #f1f1f1;
  font-family: 'Inter';
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-v2__timeline {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 42px minmax(120px, 1fr) 42px;
  align-items: center;
  gap: 10px;
}

.player-v2.audio_nuevo .player-v2__time {
  margin: 0;
  color: #c9c9c9;
  font-family: 'Inter';
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: right;
}

.player-v2.audio_nuevo .player-v2__time--duration {
  text-align: left;
}

.player-v2__loading {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #898989;
  background: #050505;
  font-family: 'Inter';
  font-size: 12px;
}

.player-v2 .player-v2__waveform {
  height: 44px;
  min-width: 0;
}

.player-v2 .waveform-canvas {
  height: 44px;
  image-rendering: auto;
}

.player-v2 .waveform-progress-overlay {
  background: transparent;
  overflow: visible;
}

.player-v2 .waveform-progress-overlay::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 0;
  width: 1px;
  height: 28px;
  background: rgba(213, 167, 129, .78);
}

.player-v2 .waveform-progress-overlay::before {
  content: "";
  position: absolute;
  top: 19px;
  right: -3px;
  z-index: 2;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d5a781;
  box-shadow: 0 0 0 1px rgba(5, 5, 5, .75);
}

.player-v2__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  white-space: nowrap;
}

.player-v2 .player-v2__icon-button {
  width: 38px;
  height: 40px;
  padding: 8px;
}

.player-v2 .player-v2__icon-button img {
  display: block;
  width: 21px;
  max-width: 21px;
  height: 21px;
  object-fit: contain;
  opacity: .88;
  transition: opacity 140ms ease;
}

.player-v2 .player-v2__icon-button:hover img,
.player-v2 .player-v2__icon-button:focus-visible img {
  opacity: 1;
}

.player-v2__volume {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
}

.player-v2 .player-v2__volume-button {
  position: relative;
  width: 34px;
  height: 38px;
}

.player-v2__volume-button svg {
  width: 21px;
  height: 21px;
  fill: #b8b8b8;
  stroke: #b8b8b8;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.player-v2__volume-button.is-muted::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 1.5px;
  border-radius: 2px;
  background: #d5a781;
  transform: rotate(-45deg);
}

.player-v2 input.player-v2__volume-range {
  position: relative;
  z-index: 1;
  display: block;
  width: 80px;
  height: 20px;
  margin: 0;
  padding: 0;
  opacity: 1;
  pointer-events: auto;
  cursor: pointer;
  border: 0;
  background: linear-gradient(
    to right,
    #b7835e 0%,
    #b7835e var(--player-volume, 80%),
    #444 var(--player-volume, 80%),
    #444 100%
  );
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 3px;
  -webkit-appearance: none;
  appearance: none;
}

.player-v2 input.player-v2__volume-range::-webkit-slider-runnable-track {
  height: 3px;
  border: 0;
  border-radius: 999px;
  background: transparent;
}

.player-v2 input.player-v2__volume-range::-webkit-slider-thumb {
  width: 11px;
  height: 11px;
  margin-top: -4px;
  border: 0;
  border-radius: 50%;
  background: #e2d0c2;
  box-shadow: 0 0 0 2px rgba(5, 5, 5, .55);
  pointer-events: auto;
  cursor: pointer;
  -webkit-appearance: none;
}

.player-v2 input.player-v2__volume-range::-moz-range-track {
  height: 3px;
  border: 0;
  border-radius: 999px;
  background: #444;
}

.player-v2 input.player-v2__volume-range::-moz-range-progress {
  height: 3px;
  border-radius: 999px;
  background: #b7835e;
}

.player-v2 input.player-v2__volume-range::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 50%;
  background: #e2d0c2;
  box-shadow: 0 0 0 2px rgba(5, 5, 5, .55);
  cursor: pointer;
}

.player-v2__license {
  min-width: 0;
  display: flex;
  justify-content: flex-end;
}

.player-v2.audio_nuevo .player-v2__license .obtener {
  min-height: 44px;
  width: 100%;
  max-width: 180px;
  border-radius: 18px;
  color: #d7d7d7;
  background: #242424;
  font-size: 14px;
  letter-spacing: .01em;
}

.player-v2.audio_nuevo .player-v2__license .obtener::before {
  border-radius: 18px;
  padding: 1.5px;
}

@media (max-width: 1199.98px) and (min-width: 992px) {
  .player-v2-host {
    --player-v2-layout-left: 20px;
    --player-v2-layout-right: 6vw;
  }

  .player-v2__inner {
    grid-template-columns: 120px minmax(110px, 150px) minmax(160px, 1fr) 102px minmax(98px, 110px) 140px;
    gap: 8px;
  }

  .player-v2 input.player-v2__volume-range {
    width: 64px;
  }
}

@media (max-width: 991.98px) and (min-width: 768px) {
  .player-v2-host {
    --player-v2-side-inset: 12px;
    --player-v2-bottom-inset: 12px;
    --player-v2-layout-left: 18px;
    --player-v2-layout-right: 6vw;
    height: calc(104px + var(--player-v2-bottom-inset) + env(safe-area-inset-bottom));
  }

  .player-v2.audio_nuevo {
    min-height: 104px;
    height: 104px;
  }

  .player-v2__inner {
    grid-template-columns: 104px minmax(100px, 1fr) 90px 106px 132px;
    grid-template-areas:
      "transport identity actions volume license"
      "timeline timeline timeline timeline timeline";
    gap: 4px 8px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .player-v2__transport { grid-area: transport; }
  .player-v2__identity { grid-area: identity; }
  .player-v2__timeline { grid-area: timeline; }
  .player-v2__actions { grid-area: actions; }
  .player-v2__volume { grid-area: volume; }
  .player-v2__license { grid-area: license; }

  .player-v2 input.player-v2__volume-range {
    width: 60px;
  }

  .player-v2 .player-v2__volume-button {
    width: 30px;
  }

  .player-v2__transport {
    gap: 2px;
  }

  .player-v2 .player-v2__transport-button {
    width: 30px;
    height: 38px;
  }

  .player-v2 .player-v2__play-button {
    width: 40px;
    height: 40px;
  }

  .player-v2 .player-v2__waveform,
  .player-v2 .waveform-canvas {
    height: 34px;
  }

  .player-v2 .waveform-progress-overlay::after {
    top: 5px;
    height: 24px;
  }

  .player-v2 .waveform-progress-overlay::before {
    top: 13px;
  }
}

@media (max-width: 767.98px) {
  .player-v2-host {
    --player-v2-side-inset: 8px;
    --player-v2-bottom-inset: 8px;
    --player-v2-layout-left: 8vw;
    --player-v2-layout-right: 8vw;
    height: calc(132px + var(--player-v2-bottom-inset) + env(safe-area-inset-bottom));
  }

  .player-v2.audio_nuevo {
    min-height: 132px;
    height: 132px;
    border-radius: 12px;
  }

  .player-v2__inner {
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "identity identity identity"
      "timeline timeline timeline"
      "transport actions license";
    gap: 5px 8px;
    padding-top: 8px;
    padding-bottom: 10px;
  }

  .player-v2__transport {
    grid-area: transport;
    justify-content: flex-start;
    gap: 2px;
  }

  .player-v2__identity {
    grid-area: identity;
    text-align: center;
  }

  .player-v2.audio_nuevo .player-v2__identity h4 {
    font-size: 16px;
    line-height: 20px;
    text-align: center;
  }

  .player-v2__timeline {
    grid-area: timeline;
    grid-template-columns: 36px minmax(80px, 1fr) 36px;
    gap: 7px;
  }

  .player-v2__actions {
    grid-area: actions;
    justify-self: center;
    gap: 0;
  }

  .player-v2__license {
    grid-area: license;
    justify-self: end;
  }

  .player-v2__volume {
    display: none;
  }

  .player-v2 .player-v2__transport-button {
    width: 30px;
    height: 36px;
  }

  .player-v2 .player-v2__play-button {
    width: 38px;
    height: 38px;
  }

  .player-v2 .player-v2__transport-button .play,
  .player-v2 .player-v2__transport-button .pause {
    height: 18px;
  }

  .player-v2 .player-v2__transport-button .pasar {
    height: 14px;
  }

  .player-v2 .player-v2__waveform,
  .player-v2 .waveform-canvas {
    height: 30px;
  }

  .player-v2 .waveform-progress-overlay::after {
    top: 4px;
    height: 22px;
  }

  .player-v2 .waveform-progress-overlay::before {
    top: 11px;
  }

  .player-v2.audio_nuevo .player-v2__time {
    font-size: 10px;
  }

  .player-v2 .player-v2__icon-button {
    width: 30px;
    height: 34px;
    padding: 6px;
  }

  .player-v2 .player-v2__icon-button img {
    width: 18px;
    max-width: 18px;
    height: 18px;
  }

  .player-v2.audio_nuevo .player-v2__license .obtener {
    width: 108px;
    min-width: 108px;
    min-height: 38px;
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 12px;
  }

  .player-v2.audio_nuevo .player-v2__license .obtener::before {
    border-radius: 15px;
  }
}

@media (max-width: 350px) {
  .player-v2-host {
    --player-v2-layout-left: 12px;
    --player-v2-layout-right: 12px;
  }

  .player-v2__inner {
    gap: 5px 4px;
  }

  .player-v2 .player-v2__transport-button {
    width: 28px;
  }

  .player-v2 .player-v2__play-button {
    width: 36px;
    height: 36px;
  }

  .player-v2 .player-v2__icon-button {
    width: 28px;
  }

  .player-v2.audio_nuevo .player-v2__license .obtener {
    width: 96px;
    min-width: 96px;
    font-size: 11px;
  }
}
