/* dParranda News TTS Styles */

:root {
    --tts-primary: #dc2626;
    /* Coincide con el chatbot */
    --tts-primary-dark: #b91c1c;
    --tts-dark: #0f172a;
    --tts-gray: #64748b;
    --tts-light: #f8fafc;
    --tts-border: rgba(226, 232, 240, 0.8);
    --tts-radius: 12px;
}

.dparranda-tts-container {
    background: #ffffff;
    border: 1px solid var(--tts-border);
    border-radius: var(--tts-radius);
    padding: 16px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    font-family: 'Inter', system-ui, sans-serif;
    max-width: 600px;
    position: relative;
    overflow: hidden;
}

.dparranda-tts-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Play/Pause Button */
.tts-btn {
    background: #b92c1c;
    color: white;
    border: none;
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    line-height: 0;
    box-sizing: border-box;
}

.tts-btn:hover {
    background: var(--tts-primary);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.tts-btn:active {
    transform: scale(0.95);
}

.tts-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    stroke: none;
}

/* Secondary Button (Stop) */
/* Secondary Button (Stop) */
.tts-btn-secondary {
    background: #000000;
    /* Darker gray for visibility */
    color: var(--tts-gray);
    width: 36px;
    height: 36px;
    border: none;
    /* No border */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tts-btn-secondary:hover {
    background: #cbd5e1;
    /* Darker on hover */
    color: var(--tts-primary);
    /* No border change */
}

.tts-btn-secondary svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
}

/* Info Text */
.tts-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tts-label {
    font-weight: 600;
    color: var(--tts-dark);
    font-size: 15px;
    line-height: 1.2;
    margin-bottom: 4px;
}

.tts-status {
    font-size: 13px;
    color: var(--tts-gray);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Animation for speaking state */
.tts-speaking .tts-status::before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--tts-primary);
    animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(220, 38, 38, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
    }
}

/* Progress Bar (Fake/Indeterminate or calculated) */
.tts-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--tts-light);
}

.tts-progress {
    height: 100%;
    background: var(--tts-primary);
    width: 0%;
    transition: width 0.3s linear;
}

/* Dark Mode Support logic if needed, but per requests, keeping elements consistent */