.ouvir-noticia {
  --on-brand: #1B7A4E;
  --on-brand-dark: #145c3a;
  margin: 16px 0 24px;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.ouvir-noticia *,
.ouvir-noticia *::before,
.ouvir-noticia *::after {
  box-sizing: border-box;
}

.ouvir-noticia__btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 999px;
  background: var(--on-brand);
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(27, 122, 78, 0.25);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  text-align: left;
  overflow: hidden;
}

.ouvir-noticia__btn:hover {
  background: var(--on-brand-dark);
  box-shadow: 0 4px 12px rgba(27, 122, 78, 0.35);
}

.ouvir-noticia__btn:active {
  transform: scale(0.98);
}

.ouvir-noticia__btn.is-playing {
  background: var(--on-brand-dark);
}

.ouvir-noticia__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
}

.ouvir-noticia__icon svg {
  display: block;
}

.ouvir-noticia__icon--play,
.ouvir-noticia__icon--pause {
  display: none !important;
}
.ouvir-noticia__btn:not(.is-playing) .ouvir-noticia__icon--play {
  display: flex !important;
}
.ouvir-noticia__btn.is-playing .ouvir-noticia__icon--pause {
  display: flex !important;
}

.ouvir-noticia__label {
  flex-shrink: 0;
  white-space: nowrap;
}

/* Equalizador = progresso clicável */
.ouvir-noticia__wave {
  display: flex;
  align-items: center;
  gap: 2.5px;
  flex: 1 1 auto;
  height: 32px;
  min-width: 120px;
  max-width: 100%;
  margin: 0 6px;
  opacity: 0.95;
  overflow: hidden;
  cursor: pointer;
  touch-action: none;
  position: relative;
}

.ouvir-noticia__wave span {
  display: block;
  width: 3.5px;
  min-width: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.28);
  height: 30%;
  flex-shrink: 0;
  transition: background 0.12s ease, transform 0.15s ease;
}

/* Alturas base */
.ouvir-noticia__wave span:nth-child(1)  { height: 35%; }
.ouvir-noticia__wave span:nth-child(2)  { height: 55%; }
.ouvir-noticia__wave span:nth-child(3)  { height: 80%; }
.ouvir-noticia__wave span:nth-child(4)  { height: 45%; }
.ouvir-noticia__wave span:nth-child(5)  { height: 70%; }
.ouvir-noticia__wave span:nth-child(6)  { height: 90%; }
.ouvir-noticia__wave span:nth-child(7)  { height: 50%; }
.ouvir-noticia__wave span:nth-child(8)  { height: 65%; }
.ouvir-noticia__wave span:nth-child(9)  { height: 40%; }
.ouvir-noticia__wave span:nth-child(10) { height: 75%; }
.ouvir-noticia__wave span:nth-child(11) { height: 85%; }
.ouvir-noticia__wave span:nth-child(12) { height: 55%; }
.ouvir-noticia__wave span:nth-child(13) { height: 95%; }
.ouvir-noticia__wave span:nth-child(14) { height: 60%; }
.ouvir-noticia__wave span:nth-child(15) { height: 45%; }
.ouvir-noticia__wave span:nth-child(16) { height: 70%; }
.ouvir-noticia__wave span:nth-child(17) { height: 50%; }
.ouvir-noticia__wave span:nth-child(18) { height: 80%; }
.ouvir-noticia__wave span:nth-child(19) { height: 35%; }
.ouvir-noticia__wave span:nth-child(20) { height: 55%; }
.ouvir-noticia__wave span:nth-child(21) { height: 60%; }
.ouvir-noticia__wave span:nth-child(22) { height: 80%; }
.ouvir-noticia__wave span:nth-child(23) { height: 45%; }
.ouvir-noticia__wave span:nth-child(24) { height: 70%; }
.ouvir-noticia__wave span:nth-child(25) { height: 90%; }
.ouvir-noticia__wave span:nth-child(26) { height: 50%; }
.ouvir-noticia__wave span:nth-child(27) { height: 65%; }
.ouvir-noticia__wave span:nth-child(28) { height: 40%; }
.ouvir-noticia__wave span:nth-child(29) { height: 75%; }
.ouvir-noticia__wave span:nth-child(30) { height: 55%; }
.ouvir-noticia__wave span:nth-child(31) { height: 85%; }
.ouvir-noticia__wave span:nth-child(32) { height: 35%; }
.ouvir-noticia__wave span:nth-child(33) { height: 70%; }
.ouvir-noticia__wave span:nth-child(34) { height: 95%; }
.ouvir-noticia__wave span:nth-child(35) { height: 50%; }
.ouvir-noticia__wave span:nth-child(36) { height: 60%; }
.ouvir-noticia__wave span:nth-child(37) { height: 40%; }
.ouvir-noticia__wave span:nth-child(38) { height: 80%; }
.ouvir-noticia__wave span:nth-child(39) { height: 55%; }
.ouvir-noticia__wave span:nth-child(40) { height: 70%; }

/* Parte já "lida" / progresso */
.ouvir-noticia__wave span.is-filled {
  background: rgba(255, 255, 255, 0.95);
}

/* Animação só nas barras ativas (preenchidas) enquanto toca */
.ouvir-noticia__btn.is-playing .ouvir-noticia__wave span.is-filled {
  animation: on-wave 0.8s ease-in-out infinite;
}
.ouvir-noticia__btn.is-playing .ouvir-noticia__wave span.is-filled:nth-child(odd) {
  animation-delay: 0.1s;
}
.ouvir-noticia__btn.is-playing .ouvir-noticia__wave span.is-filled:nth-child(3n) {
  animation-delay: 0.25s;
}

@keyframes on-wave {
  0%, 100% { transform: scaleY(0.65); }
  50% { transform: scaleY(1.2); }
}

.ouvir-noticia__time {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  opacity: 0.9;
  min-width: 72px;
  text-align: right;
  white-space: nowrap;
}

.ouvir-noticia audio {
  display: none;
}

@media (max-width: 600px) {
  .ouvir-noticia {
    margin: 12px 0 20px;
  }
  .ouvir-noticia__btn {
    padding: 12px 14px;
    gap: 8px;
    font-size: 14px;
    border-radius: 16px;
    flex-wrap: nowrap;
  }
  .ouvir-noticia__icon {
    width: 24px;
    height: 24px;
  }
  .ouvir-noticia__icon svg {
    width: 18px;
    height: 18px;
  }
  .ouvir-noticia__label {
    font-size: 13px;
    flex-shrink: 1;
    min-width: 0;
  }
  .ouvir-noticia__wave {
    flex: 1 1 auto;
    min-width: 140px;
    width: auto;
    height: 36px;
    gap: 2.5px;
    margin: 0 6px;
  }
  .ouvir-noticia__wave span {
    width: 3.5px;
    min-width: 3px;
  }
  /* Mostra mais barras no mobile */
  .ouvir-noticia__wave span:nth-child(n+1) {
    display: block;
  }
  .ouvir-noticia__wave span:nth-child(n+28) {
    display: none;
  }
  .ouvir-noticia__time {
    font-size: 12px;
    min-width: 48px;
  }
}

@media (max-width: 380px) {
  .ouvir-noticia__label {
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .ouvir-noticia__wave {
    min-width: 110px;
    height: 34px;
    gap: 2px;
  }
  .ouvir-noticia__wave span:nth-child(n+22) {
    display: none;
  }
}
