/* Chatbot Pro 5.1 - Estilos Base + SVG Icons GRANDES */
:root {
    --chatbot-bg: #FFFFFF;
    --chatbot-text: #1F2937;
    --chatbot-border: #E5E7EB;
    --chatbot-bot-bg: #F3F4F6;
}

#chatbot-pro-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    position: fixed;
    z-index: 999999;
}

/* Posicionamiento Desktop */
#chatbot-pro-container.chatbot-pro-bottom-right { bottom: 20px; right: 20px; }
#chatbot-pro-container.chatbot-pro-bottom-left { bottom: 20px; left: 20px; }
#chatbot-pro-container.chatbot-pro-top-right { top: 20px; right: 20px; }
#chatbot-pro-container.chatbot-pro-top-left { top: 20px; left: 20px; }

/* Botón flotante - SOPORTE SVG */
#chatbot-pro-button {
    width: 60px; height: 60px;
    background: var(--chatbot-button);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    color: white;
    position: relative;
}
#chatbot-pro-button:hover { filter: brightness(1.1); transform: scale(1.1); box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4); }

/* SVG Icons - MÁS GRANDES Y VISIBLES */
.chatbot-icon { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}

.chatbot-icon svg { 
    color: white; 
    stroke: white; 
    width: 36px !important;  /* Más grande */
    height: 36px !important; 
}

#chatbot-pro-button svg { 
    color: white; 
    stroke: white; 
    width: 36px !important;  /* Más grande en botón flotante */
    height: 36px !important; 
}

.chatbot-avatar svg { 
    color: white; 
    stroke: white; 
    width: 28px;  /* Avatar en header ligeramente más pequeño */
    height: 28px; 
}

/* Badge de notificación con animación */
.chatbot-notification-badge {
    position: absolute; top: -5px; right: -5px; background: #EF4444; color: white; border-radius: 50%;
    width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: bold; animation: pulse 2s infinite; z-index: 1000001;
}
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.1); opacity: 0.8; } }

/* Ventana */
#chatbot-pro-window {
    position: absolute; bottom: 80px; right: 0;
    width: 380px; height: 600px;
    background: var(--chatbot-bg);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: none; flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}
#chatbot-pro-window.active { display: flex; }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* Header y Status */
#chatbot-pro-header { color: white; padding: 16px; display: flex; justify-content: space-between; align-items: center; }
.chatbot-header-content { display: flex; align-items: center; gap: 12px; }
.chatbot-avatar { width: 40px; height: 40px; background: rgba(255, 255, 255, 0.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.chatbot-title { font-weight: 600; font-size: 16px; }
.chatbot-status { font-size: 12px; opacity: 0.9; display: flex; align-items: center; gap: 6px; }
.status-indicator { width: 8px; height: 8px; background: #10B981; border-radius: 50%; animation: blink 2s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
#chatbot-pro-close { background: transparent; border: none; color: white; cursor: pointer; padding: 4px; border-radius: 4px; }

/* Mensajes */
#chatbot-pro-messages { flex: 1; overflow-y: auto; padding: 20px; background: #F9FAFB; display: flex; flex-direction: column; gap: 12px; }
#chatbot-pro-messages::-webkit-scrollbar { width: 6px; }
#chatbot-pro-messages::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 3px; }

.chatbot-message { max-width: 80%; padding: 12px 16px; border-radius: 12px; line-height: 1.5; font-size: 14px; animation: fadeIn 0.3s ease; white-space: pre-wrap; word-wrap: break-word; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.chatbot-message.bot { background: var(--chatbot-bot-bg); color: var(--chatbot-text); align-self: flex-start; border-bottom-left-radius: 4px; }
.chatbot-message.user { color: white; align-self: flex-end; border-bottom-right-radius: 4px; }

/* Botones de flujo dinámicos */
.chatbot-flow-options { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; align-self: flex-start; max-width: 100%; }
.chatbot-flow-option {
    background: white !important; border: 2px solid; padding: 10px 16px; border-radius: 8px;
    cursor: pointer; transition: all 0.2s; font-size: 14px; text-align: left; font-weight: 500;
}

/* Indicador de Escritura */
.chatbot-typing { display: flex; gap: 4px; padding: 12px 16px; background: var(--chatbot-bot-bg); border-radius: 12px; border-bottom-left-radius: 4px; align-self: flex-start; max-width: 80px; }
.chatbot-typing span { width: 8px; height: 8px; background: #9CA3AF; border-radius: 50%; animation: typing 1.4s infinite; }
.chatbot-typing span:nth-child(2) { animation-delay: 0.2s; }
.chatbot-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-10px); } }

/* Input y Enviar */
#chatbot-pro-input-container { padding: 16px; background: white; border-top: 1px solid var(--chatbot-border); display: flex; gap: 8px; }
#chatbot-pro-input { flex: 1; padding: 12px 16px; border: 1px solid var(--chatbot-border); border-radius: 24px; font-size: 14px; outline: none; }
#chatbot-pro-send { width: 44px; height: 44px; border: none; border-radius: 50%; color: white; cursor: pointer; display: flex; align-items: center; justify-content: center; }

/* ==============================================
   RESPONSIVE MÓVIL - TU CÓDIGO ORIGINAL
   ============================================== */
@media (max-width: 768px) {
    #chatbot-pro-window, #chatbot-pro-window.active {
        position: fixed !important; left: 50% !important; right: auto !important; transform: translateX(-50%) !important;
        width: 90% !important; max-width: 380px !important; height: 70vh !important; max-height: 500px !important;
        bottom: 95px !important; border-radius: 15px !important; z-index: 999999 !important;
    }
    #chatbot-pro-window.active { animation: slideUpCenterMobile 0.3s ease-out !important; }
    @keyframes slideUpCenterMobile {
        from { opacity: 0; transform: translateX(-50%) translateY(20px) !important; }
        to { opacity: 1; transform: translateX(-50%) translateY(0) !important; }
    }
}