/* ============================================================
   BLOG AUDIO PLAYER — styles
   Paleta Essential: navy #0F1923, champagne #C8A97E, cream #F5F0E6
   Tipografia: DM Serif (h1/h2) + DM Sans (body)
   ============================================================ */

.blog-audio-card,
.bap-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #F5F0E6;
  border: 1px solid #E8DFC9;
  border-left: 4px solid #C8A97E;
  border-radius: 8px;
  padding: 14px 18px;
  margin: 16px 0;
  font-family: 'DM Sans', 'DM Sans Fallback', -apple-system, sans-serif;
  transition: background 0.15s, border-color 0.15s;
}

.bap-card:hover {
  background: #FAF6EC;
  border-color: #D4B68C;
}

.bap-card.bap-playing {
  background: #FFF8E5;
  border-left-color: #B8945E;
}

.bap-card.bap-error {
  opacity: 0.5;
  cursor: not-allowed;
}

.bap-card--compact {
  padding: 8px 12px;
  margin: 8px 0;
  gap: 10px;
}

/* Botão Play */
.bap-btn-play {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #0F1923;
  color: #F5F0E6;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: transform 0.1s, background 0.15s;
}

.bap-btn-play:hover:not(:disabled) {
  background: #1A2638;
  transform: scale(1.05);
}

.bap-btn-play:active:not(:disabled) {
  transform: scale(0.97);
}

.bap-btn-play:disabled {
  background: #888;
  cursor: not-allowed;
}

.bap-btn-play svg {
  display: block;
}

.bap-card--compact .bap-btn-play {
  width: 36px;
  height: 36px;
}

/* Info bloco */
.bap-info {
  flex: 1;
  min-width: 0;
}

.bap-title {
  font-family: 'DM Serif Display', 'DM Serif Fallback', Georgia, serif;
  font-size: 1.15em;
  color: #0F1923;
  font-weight: 400;
  line-height: 1.3;
  margin: 0 0 2px;
}

.bap-card--compact .bap-title {
  font-size: 1em;
}

.bap-voice-label {
  display: inline-block;
  background: #0F1923;
  color: #F5F0E6;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.65em;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 0.5px;
  vertical-align: middle;
  margin-left: 6px;
}

.bap-pronunciation {
  font-family: Georgia, 'Times New Roman', serif;
  color: #6B7280;
  font-size: 0.95em;
  font-style: italic;
}

.bap-translation {
  color: #4B5563;
  font-size: 0.85em;
  margin-top: 2px;
}

/* Waveform animado (5 barras) */
.bap-waveform {
  display: flex;
  align-items: end;
  gap: 3px;
  height: 24px;
  flex-shrink: 0;
}

.bap-wave-bar {
  width: 3px;
  height: 8px;
  background: #C8A97E;
  border-radius: 2px;
  transition: height 0.2s;
}

.bap-card.bap-playing .bap-wave-bar {
  animation: bap-wave 0.8s ease-in-out infinite alternate;
}

.bap-card.bap-playing .bap-wave-bar:nth-child(1) { animation-delay: 0s; }
.bap-card.bap-playing .bap-wave-bar:nth-child(2) { animation-delay: 0.1s; }
.bap-card.bap-playing .bap-wave-bar:nth-child(3) { animation-delay: 0.2s; }
.bap-card.bap-playing .bap-wave-bar:nth-child(4) { animation-delay: 0.15s; }
.bap-card.bap-playing .bap-wave-bar:nth-child(5) { animation-delay: 0.05s; }

@keyframes bap-wave {
  0%   { height: 6px; }
  100% { height: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .bap-card.bap-playing .bap-wave-bar { animation: none; }
}

/* Botão speed */
.bap-btn-speed {
  flex-shrink: 0;
  background: transparent;
  border: 1px solid #C8A97E;
  color: #0F1923;
  padding: 4px 10px;
  border-radius: 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8em;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.bap-btn-speed:hover {
  background: #C8A97E;
  color: #F5F0E6;
}

/* Side-by-side US/UK */
.blog-audio-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}

.blog-audio-pair .bap-card {
  margin: 0;
}

@media (max-width: 600px) {
  .blog-audio-pair {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* Mobile fine-tuning */
@media (max-width: 480px) {
  .bap-card {
    padding: 10px 12px;
    gap: 10px;
  }
  .bap-btn-play {
    width: 38px;
    height: 38px;
  }
  .bap-title {
    font-size: 1em;
  }
  .bap-pronunciation {
    font-size: 0.85em;
  }
  .bap-waveform {
    display: none;
  }
}

/* Hidden audio element */
.bap-audio {
  display: none;
}
