/* ===== PLAYER AUDIO PERSONALIZZATO ===== */

.custom-audio-player {
  --cap-bg: #f5f7fa;          /* sfondo box */
  --cap-border: #dde3ec;      /* bordo box */
  --cap-main: #112B40;        /* colore principale (brand) */
  --cap-accent: #ff8a80;      /* colore barra di avanzamento */
  --cap-text: #112B40;        /* testo */
  --cap-muted: #7a8596;       /* testo secondario */

  border-radius: 14px;
  background: var(--cap-bg);
  border: 1px solid var(--cap-border);
  padding: 14px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 520px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.04);
  font-family: inherit;
}

/* Riga principale: bottone + info */
.custom-audio-player .cap-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Pulsante play/pause tondo */
.custom-audio-player .cap-play-pause {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: var(--cap-main);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.2s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.18);
}

.custom-audio-player .cap-play-pause:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.22);
}

.custom-audio-player .cap-play-pause:active {
  transform: translateY(0);
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

/* Info testo: titolo + tempi */
.custom-audio-player .cap-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.custom-audio-player .cap-title {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--cap-text);
}

.custom-audio-player .cap-time {
  font-size: 0.8rem;
  color: var(--cap-muted);
}

/* Barra di avanzamento */
.custom-audio-player .cap-progress-wrapper {
  margin-top: 4px;
}

.custom-audio-player .cap-progress-bg {
  position: relative;
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: rgba(17,43,64,0.08);
  overflow: hidden;
  cursor: pointer;
}

.custom-audio-player .cap-progress-bar {
  position: absolute;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cap-accent), var(--cap-main));
  transition: width 0.1s linear;
}

/* Nascondo il player audio nativo */
.custom-audio-player .cap-audio {
  display: none;
}

/* Icone play/pause */
.custom-audio-player .cap-icon {
  display: inline-block;
  line-height: 1;
}

/* Piccolo adattamento mobile */
@media (max-width: 480px) {
  .custom-audio-player {
    padding: 12px 12px 10px;
  }
}
