/* ============================================================
   P10 TTS — Estilos del botón y reproductor (frontend)
   Colores de marca: rojo #E31E23 · negro #1A1A1A
   ============================================================ */

/* ── Contenedor principal ────────────────────────────────── */
.p10-tts-wrap {
    margin: 0 0 28px;
    font-family: inherit;
}

/* ── Botón "Escuchar esta nota" ──────────────────────────── */
.p10-tts-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #E31E23;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease, opacity 0.2s ease;
    line-height: 1.4;
    text-decoration: none;
}

.p10-tts-btn:hover:not(:disabled) {
    background: #b8171b;
    transform: translateY(-1px);
}

.p10-tts-btn:active:not(:disabled) {
    transform: translateY(0);
    background: #9a1215;
}

.p10-tts-btn:disabled,
.p10-tts-btn--loading {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Icono SVG dentro del botón */
.p10-tts-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* Animación de carga (pulso) en el icono cuando está generando */
.p10-tts-btn--loading .p10-tts-icon {
    animation: p10-tts-pulse 1.2s ease-in-out infinite;
}

@keyframes p10-tts-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.35; }
}

/* ── Reproductor ─────────────────────────────────────────── */
.p10-tts-player {
    display: flex;
    align-items: center;
    background: #fff5f5;
    border: 1px solid #f5a5a7;
    border-left: 4px solid #E31E23;
    border-radius: 4px;
    padding: 10px 14px;
    gap: 10px;
    max-width: 560px;
}

.p10-tts-player-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    flex-wrap: wrap;
}

.p10-tts-player-icon {
    color: #E31E23;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.p10-tts-player-label {
    font-size: 12px;
    font-weight: 700;
    color: #1A1A1A;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Reproductor HTML5 nativo — ancho completo dentro del bloque */
.p10-tts-audio {
    flex: 1 1 200px;
    min-width: 180px;
    height: 36px;
    outline: none;
}

/* Normalizar apariencia en distintos navegadores */
.p10-tts-audio::-webkit-media-controls-panel {
    background-color: #fff5f5;
}

/* Botón cerrar (✕) */
.p10-tts-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #888;
    display: flex;
    align-items: center;
    border-radius: 50%;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}

.p10-tts-close:hover {
    background: #fce4e4;
    color: #E31E23;
}

/* ── Mensaje de error / estado ───────────────────────────── */
.p10-tts-msg {
    margin-top: 8px;
    font-size: 13px;
    color: #b71c1c;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 480px) {
    .p10-tts-btn {
        font-size: 13px;
        padding: 9px 16px;
    }

    .p10-tts-player {
        padding: 8px 10px;
    }

    .p10-tts-audio {
        min-width: 140px;
    }

    .p10-tts-player-label {
        display: none;
    }
}
