/* Basic highlights */
.tts-word {
    transition: background-color 0.2s ease, color 0.2s ease;
}

.tts-word.active {
    background-color: #94bbf9; /* Google active word */             /* Google blue text */
    border-radius: 2px;        /* subtle rounding like Google */
}

.tts-paragraph.active {
    background-color: #D2E3FC;
}

/* Button styling */
.tts-listen-btn {
    position: relative;
    padding: 10px 20px;
    background-color: #0073aa;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
}

.tts-listen-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.tts-listen-btn:hover:not(:disabled) {
    background-color: #005177;
}

/* Spinner inside button */
.tts-loader {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: tts-spin 0.8s linear infinite;
    display: none;
}

@keyframes tts-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


.tts-audio-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}