.mts-player {
  --mts-bg: #101615;
  --mts-panel: #17201e;
  --mts-text: #f8fbfa;
  --mts-muted: #b5c2bf;
  --mts-line: rgba(255, 255, 255, 0.12);
  background: var(--mts-bg);
  border: 1px solid var(--mts-line);
  border-radius: 8px;
  color: var(--mts-text);
  clear: both;
  margin: 18px 0 0;
  padding: 18px;
  width: 100%;
}

.mts-player * {
  box-sizing: border-box;
}

.woocommerce-product-gallery.mts-clean-gallery {
  display: flex;
  flex-direction: column;
}

.woocommerce-product-gallery.mts-clean-gallery .woocommerce-product-gallery__wrapper,
.woocommerce-product-gallery.mts-clean-gallery > div:not(.mts-player),
.woocommerce-product-gallery.mts-clean-gallery > figure {
  order: 1;
}

.woocommerce-product-gallery.mts-clean-gallery .mts-player {
  order: 2;
}

.woocommerce-product-gallery.mts-clean-gallery .flex-control-nav,
.woocommerce-product-gallery.mts-clean-gallery .woocommerce-product-gallery__trigger,
.woocommerce-product-gallery.mts-clean-gallery .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image:not(:first-child),
.woocommerce-product-gallery.mts-clean-gallery .woocommerce-product-gallery__wrapper .product-gallery__image:not(:first-child),
.woocommerce-product-gallery.mts-clean-gallery .woocommerce-product-gallery__wrapper > div:not(:first-child) {
  display: none !important;
}

.woocommerce-product-gallery.mts-clean-gallery .woocommerce-product-gallery__wrapper,
.woocommerce-product-gallery.mts-clean-gallery .woocommerce-product-gallery__image:first-child,
.woocommerce-product-gallery.mts-clean-gallery .woocommerce-product-gallery__image:first-child a,
.woocommerce-product-gallery.mts-clean-gallery .woocommerce-product-gallery__image:first-child img {
  width: 100% !important;
}

.woocommerce-product-gallery.mts-clean-gallery .woocommerce-product-gallery__image:first-child img {
  display: block;
  height: auto;
}

.mts-player__top {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.mts-player__eyebrow {
  color: #55d6be;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 4px;
  text-transform: uppercase;
}

.mts-player__title {
  color: var(--mts-text);
  font-size: 20px;
  line-height: 1.25;
  margin: 0;
}

.mts-player__play {
  align-items: center;
  background: #55d6be;
  border: 0;
  border-radius: 999px;
  color: #07100e;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 17px;
  font-weight: 800;
  height: 46px;
  justify-content: center;
  line-height: 1;
  width: 46px;
}

.mts-player__play:disabled {
  cursor: wait;
  opacity: 0.72;
}

.mts-player__timeline,
.mts-player__master label {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: auto minmax(120px, 1fr) auto;
  margin-top: 18px;
}

.mts-player__timeline span {
  color: var(--mts-muted);
  font-size: 13px;
  min-width: 38px;
}

.mts-player__master label {
  color: var(--mts-muted);
  font-size: 13px;
  grid-template-columns: auto minmax(120px, 1fr);
}

.mts-player input[type="range"] {
  accent-color: #55d6be;
  cursor: pointer;
  width: 100%;
}

.mts-player__tracks {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.mts-player__error {
  background: rgba(255, 193, 7, 0.12);
  border: 1px solid rgba(255, 193, 7, 0.35);
  border-radius: 6px;
  color: #ffe7a3;
  display: none;
  font-size: 13px;
  line-height: 1.4;
  margin: 14px 0 0;
  padding: 10px 12px;
}

.mts-player.has-error .mts-player__error {
  display: block;
}

.mts-track {
  align-items: center;
  background: var(--mts-panel);
  border: 1px solid var(--mts-line);
  border-left: 4px solid var(--track-color);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(100px, 1fr) 38px 38px minmax(110px, 180px);
  padding: 10px;
}

.mts-track__name {
  color: var(--mts-text);
  font-size: 14px;
  font-weight: 700;
  min-width: 0;
  overflow-wrap: anywhere;
}

.mts-track__button {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--mts-line);
  border-radius: 6px;
  color: var(--mts-text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  height: 32px;
  padding: 0;
  width: 32px;
}

.mts-track__button.is-active {
  background: var(--track-color);
  border-color: var(--track-color);
  color: #07100e;
}

@media (max-width: 640px) {
  .mts-player {
    padding: 14px;
  }

  .mts-player__top {
    align-items: flex-start;
  }

  .mts-player__title {
    font-size: 17px;
  }

  .mts-player__timeline,
  .mts-player__master label {
    gap: 8px;
  }

  .mts-track {
    grid-template-columns: 1fr 34px 34px;
  }

  .mts-track__volume {
    grid-column: 1 / -1;
  }
}
