/* NEW AUDIO PLAYER STYLES - SCOPED TO PREVENT THEME CONFLICTS */

/* All styles are SCOPED to .audio so they won't clash with theme CSS */
.audio *,
.audio2 *,
.audio3 * {
  box-sizing: border-box;
}

/* PLAYER */
.audio .player,
.audio2 .player,
.audio3 .player {
  position: relative;
  width: 100%;
  height: 150px;
  border-radius: 12px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Background image from cover - set via inline style in HTML */
.audio .player,
.audio2 .player,
.audio3 .player {
  background-image: var(--player-bg-image);
}

/* Dimmed overlay */
.audio .player-overlay,
.audio2 .player-overlay,
.audio3 .player-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  z-index: 1;
}

/* Hide cover image (using background instead) */
.audio .cover,
.audio2 .cover,
.audio3 .cover {
  display: none;
}

/* GENRE + YEAR (stacked) - top right */
.audio .meta-right,
.audio2 .meta-right,
.audio3 .meta-right {
  position: absolute;
  top: 12px;
  right: 14px;
  text-align: right;
  z-index: 2;
  font-size: 12px;
  text-transform: uppercase;
  color: white;
}

.audio .genre,
.audio2 .genre,
.audio3 .genre {
  display: block;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.audio .year,
.audio2 .year,
.audio3 .year {
  display: block;
  margin-top: 2px;
  opacity: 0.8;
  letter-spacing: 0.08em;
}

/* TITLE + ARTIST - top left */
.audio .meta-left,
.audio2 .meta-left,
.audio3 .meta-left {
  position: absolute;
  left: 18px;
  top: 14px;
  z-index: 2;
  color: white;
}

.audio .title,
.audio2 .title,
.audio3 .title {
  font-size: 15px;
  font-weight: 600;
  display: block;
  color: white;
}

.audio .artist,
.audio2 .artist,
.audio3 .artist {
  font-size: 13px;
  opacity: 0.82;
  margin-top: 2px;
  color: white;
}

/* CONTROLS ROW - bottom */
.audio .controls,
.audio2 .controls,
.audio3 .controls {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 2;
}

/* PLAY BUTTON */
.audio .btn,
.audio2 .btn,
.audio3 .btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, #459c1a 0%, #56ab2c 100%);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  padding: 0;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(214, 51, 132, 0.4);
  transition: transform 0.1s ease, box-shadow 0.2s ease;
}

.audio .btn:hover,
.audio2 .btn:hover,
.audio3 .btn:hover {
  background: linear-gradient(135deg, #56ab2c 0%, #a2f777 100%);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(214, 51, 132, 0.5);
}

.audio .btn:active,
.audio2 .btn:active,
.audio3 .btn:active {
  transform: scale(0.95);
  box-shadow: 0 1px 4px rgba(214, 51, 132, 0.3);
}

.audio .btn svg,
.audio2 .btn svg,
.audio3 .btn svg {
  width: 26px;
  height: 26px;
  background: transparent !important;
  display: block;
}

.audio .icon,
.audio2 .icon,
.audio3 .icon {
  fill: white;
  display: block;
  background: none !important;
}

.audio .btn svg,
.audio2 .btn svg,
.audio3 .btn svg {
  background: transparent !important;
}

.audio .btn svg polygon,
.audio .btn svg rect,
.audio2 .btn svg polygon,
.audio2 .btn svg rect,
.audio3 .btn svg polygon,
.audio3 .btn svg rect {
  fill: white !important;
}

/* PROGRESS BAR - convert range input to track/fill style */
.audio .progress,
.audio2 .progress,
.audio3 .progress {
  flex: 1;
  height: 6px;
  appearance: none;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  margin: 0;
  --val: 0%;
}

.audio .progress::-webkit-slider-runnable-track,
.audio2 .progress::-webkit-slider-runnable-track,
.audio3 .progress::-webkit-slider-runnable-track {
  height: 6px;
  background: linear-gradient(to right, 
    #459c1a 0%, 
    #459c1a var(--val, 0%), 
    #56ab2c var(--val, 0%), 
    rgba(255, 255, 255, 0.4) var(--val, 0%), 
    rgba(255, 255, 255, 0.4) 100%);
  border-radius: 999px;
}

.audio .progress::-webkit-slider-thumb,
.audio2 .progress::-webkit-slider-thumb,
.audio3 .progress::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  background: linear-gradient(135deg, #459c1a 0%, #56ab2c 100%);
  border-radius: 50%;
  margin-top: -4px;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(214, 51, 132, 0.4), 0 0 0 2px rgba(255, 255, 255, 0.2);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.audio .progress::-webkit-slider-thumb:hover,
.audio2 .progress::-webkit-slider-thumb:hover,
.audio3 .progress::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 2px 6px rgba(214, 51, 132, 0.6), 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.audio .progress::-moz-range-track,
.audio2 .progress::-moz-range-track,
.audio3 .progress::-moz-range-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  border-radius: 999px;
}

.audio .progress::-moz-range-progress,
.audio2 .progress::-moz-range-progress,
.audio3 .progress::-moz-range-progress {
  height: 6px;
  background: linear-gradient(to right, #459c1a 0%, #56ab2c 100%);
  border-radius: 999px;
}

.audio .progress::-moz-range-thumb,
.audio2 .progress::-moz-range-thumb,
.audio3 .progress::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: linear-gradient(135deg, #459c1a 0%, #56ab2c 100%);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(214, 51, 132, 0.4), 0 0 0 2px rgba(255, 255, 255, 0.2);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.audio .progress::-moz-range-thumb:hover,
.audio2 .progress::-moz-range-thumb:hover,
.audio3 .progress::-moz-range-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 2px 6px rgba(214, 51, 132, 0.6), 0 0 0 2px rgba(255, 255, 255, 0.3);
}

/* TIME RIGHT */
.audio .time,
.audio2 .time,
.audio3 .time {
  font-size: 13px;
  color: white;
  min-width: 50px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  user-select: none;
}

/* DOWNLOAD BUTTON CENTERED */
.audio .actions,
.audio2 .actions,
.audio3 .actions {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

.audio .download-btn,
.audio2 .download-btn,
.audio3 .download-btn {
  background: linear-gradient(to right, #459c1a 0%, #56ab2c 100%);
  padding: 10px 22px;
  border-radius: 999px;
  color: white;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.audio .download-btn:hover,
.audio2 .download-btn:hover,
.audio3 .download-btn:hover {
  opacity: 0.9;
}

.audio .download-btn:focus-visible,
.audio2 .download-btn:focus-visible,
.audio3 .download-btn:focus-visible {
  outline: 2px solid white;
  outline-offset: 2px;
}

.audio .dl-icon,
.audio2 .dl-icon,
.audio3 .dl-icon {
  width: 18px;
  height: 18px;
  fill: white;
  display: block;
}

/* MOBILE */
@media (max-width: 480px) {
  .audio .player,
  .audio2 .player,
  .audio3 .player {
    height: 140px;
  }

  .audio .controls,
  .audio2 .controls,
  .audio3 .controls {
    gap: 10px;
    bottom: 16px;
  }

  .audio .btn,
  .audio2 .btn,
  .audio3 .btn {
    width: 42px;
    height: 42px;
  }

  .audio .btn svg,
  .audio2 .btn svg,
  .audio3 .btn svg {
    width: 24px;
    height: 24px;
  }

  .audio .download-btn,
  .audio2 .download-btn,
  .audio3 .download-btn {
    padding: 9px 18px;
    font-size: 13px;
  }
}

/* Hide the WordPress-compatible audio element */
.gb-audio-source {
    display: none !important;
}
