/* WhatsApp-style voice message / audio shout player.
   Markup is generated by buildWhatsAppAudioPlayer() in main.js, which wraps each <audio> element
   (voice messages, audio shouts, the post-recording preview) - the <audio> itself stays in the DOM,
   hidden, as the actual playback engine. */

.wa-audio-player {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f0f2f5;
    border-radius: 20px;
    padding: 6px 12px;
    max-width: 260px;
    width: 100%;
    box-sizing: border-box;
}

.wa-audio-play {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: #2098D1;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    padding: 0;
}

.wa-audio-play:focus {
    outline: none;
}

.wa-audio-play:active {
    opacity: 0.85;
}

/* Plain CSS play/pause icons, not Font Awesome - the <i class="fas ..."> icons used elsewhere in
   this app rely on the Font Awesome Kit script scanning the page and swapping them for inline SVGs,
   which only reliably happens for markup that exists on initial page load. This player's markup is
   always inserted dynamically after the fact, so a font-icon class here would often render blank. */
.wa-audio-play .wa-icon-play {
    width: 0;
    height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: 11px solid #fff;
    margin-left: 3px;
}

.wa-audio-play .wa-icon-pause {
    display: none;
    gap: 3px;
}

.wa-audio-play .wa-icon-pause span {
    display: block;
    width: 4px;
    height: 14px;
    background: #fff;
    border-radius: 1px;
}

.wa-audio-play.wa-playing .wa-icon-play {
    display: none;
}

.wa-audio-play.wa-playing .wa-icon-pause {
    display: flex;
}

.wa-audio-waveform {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 2px;
    height: 24px;
    cursor: pointer;
    min-width: 70px;
}

.wa-audio-waveform .bar {
    flex: 1 1 0;
    background: #b7bec4;
    border-radius: 2px;
    min-width: 2px;
    transition: background-color 0.1s linear;
}

.wa-audio-waveform .bar.played {
    background: #2098D1;
}

.wa-audio-time {
    flex: 0 0 auto;
    font-size: 11px;
    color: #667781;
    min-width: 32px;
    text-align: right;
}
