.tts-button {
    position: relative;
    transition: all 0.3s ease;

}


.tts-button:hover {
    transform: scale(1.05);
}

.tts-button.playing {
    background-color: #dc2626;
}

.tts-button.playing::after {
    animation: none;
}

.tts-button.playing .speaking-waves {
    display: flex;
}

.speaking-waves {
    display: none;
    gap: 2px;
    align-items: flex-end;
    height: 20px;
}

.speaking-waves span {
    width: 3px;
    height: 100%;
    background-color: white;
    border-radius: 15px;
    display: inline-block;
    margin-right: 2px;
    border-radius: 3px;
}

.speaking-waves span:nth-child(1) {
    animation: wave 0.5s linear infinite;
    height: 60%;
}

.speaking-waves span:nth-child(2) {
    animation: wave 0.5s linear infinite;
    animation-delay: 0.2s;
    height: 90%;
}

.speaking-waves span:nth-child(3) {
    animation: wave 0.5s linear infinite;
    animation-delay: 0.4s;
    height: 70%;
}

.tts-icon {
    transition: all 0.3s ease;
}

.tts-button:hover .tts-icon {
    transform: scale(1.1);
}


@keyframes wave {
    0% {
        transform: scaleY(1);
    }
    50% {
        transform: scaleY(0.5);
    }
    100% {
        transform: scaleY(1);
    }
}

[dir="rtl"] .speaking-waves {
    left: auto;
    right: -15px;
    margin-right: 0;
    margin-left: 8px;
}