/* 语音条（微信风格） */
.cl-voice-audio {
    display: block;
    text-align: left;
}

.voice-bubble {
    --vb-w: 120px;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-sizing: border-box;
    width: var(--vb-w);
    max-width: 100%;
    height: 40px;
    padding: 0 12px;
    border-radius: 20px;
    background: #f0f1f5;
    color: #333;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: width .2s ease, background-color .2s ease;
}

.voice-bubble:hover {
    background: #e8e9ef;
}

.voice-bubble__audio {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 1px !important;
    height: 1px !important;
    max-width: 1px !important;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

.voice-bubble__btn {
    position: relative;
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
}

.voice-bubble__btn i {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
}

.voice-bubble__btn .vb-play {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 7px 0 7px 12px;
    border-color: transparent transparent transparent currentColor;
}

.voice-bubble__btn .vb-pause {
    display: none;
    top: 0;
    width: 12px;
    height: 14px;
}

.voice-bubble__btn .vb-pause::before,
.voice-bubble__btn .vb-pause::after {
    content: "";
    position: absolute;
    top: 1px;
    bottom: 1px;
    width: 4px;
    border-radius: 2px;
    background: currentColor;
}

.voice-bubble__btn .vb-pause::before {
    left: 0;
}

.voice-bubble__btn .vb-pause::after {
    right: 0;
}

.voice-bubble.is-playing .voice-bubble__btn .vb-play {
    display: none;
}

.voice-bubble.is-playing .voice-bubble__btn .vb-pause {
    display: block;
}

.voice-bubble__wave {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    flex: 1 1 auto;
    height: 14px;
    overflow: hidden;
    opacity: .55;
}

.voice-bubble__wave i {
    display: block;
    width: 2px;
    height: 5px;
    border-radius: 1px;
    background: currentColor;
}

.voice-bubble.is-playing .voice-bubble__wave i {
    animation: vb-wave .9s ease-in-out infinite;
}

.voice-bubble.is-playing .voice-bubble__wave i:nth-child(2) {
    animation-delay: .15s;
}

.voice-bubble.is-playing .voice-bubble__wave i:nth-child(3) {
    animation-delay: .3s;
}

@keyframes vb-wave {
    0%, 100% { height: 5px; }
    50% { height: 14px; }
}

.voice-bubble__time {
    flex: 0 0 auto;
    min-width: 26px;
    font-size: 13px;
    line-height: 1;
    text-align: right;
    font-variant-numeric: tabular-nums;
    opacity: .85;
}

/* 帖子卡片（紫色渐变）内的语音条 */
.publication-audio .voice-bubble {
    background: rgba(255, 255, 255, .2);
    color: #fff;
}

.publication-audio .voice-bubble:hover {
    background: rgba(255, 255, 255, .3);
}

/* 私信气泡内的语音条 */
.message-audio .voice-bubble {
    background: #ffffff;
    color: #2b2b2b;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}

.message-audio .voice-bubble:hover {
    background: #f7f7fa;
}

/* 发帖框预览内的语音条 */
.pubbox-audio__player .voice-bubble {
    background: #f0f1f5;
}

@media (max-width: 576px) {
    .voice-bubble {
        height: 36px;
        border-radius: 18px;
        padding: 0 10px;
    }
}
