/* ConversaPro ChatBot - Estilos CSS */

/* Widget del chatbot flotante */
#chatbot-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Botón flotante del chatbot */
#chatbot-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#chatbot-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

/* Ventana del chat */
#chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e1e5e9;
}

#chatbot-window.open {
    display: flex;
}

/* Header del chat */
#chatbot-header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 15px 20px;
    font-weight: 600;
    font-size: 16px;
    text-align: center;
    border-radius: 12px 12px 0 0;
}

/* Área de mensajes */
#chatbot-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Scrollbar personalizada */
#chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

#chatbot-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#chatbot-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

#chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Mensajes del bot */
.bot-msg {
    background: white;
    padding: 12px 16px;
    border-radius: 18px 18px 18px 4px;
    max-width: 80%;
    align-self: flex-start;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e1e5e9;
    color: #333;
    line-height: 1.4;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Mensajes del usuario */
.user-msg {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 12px 16px;
    border-radius: 18px 18px 4px 18px;
    max-width: 80%;
    align-self: flex-end;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
    line-height: 1.4;
    word-wrap: break-word;
}

/* Formulario del chat */
#chatbot-form {
    display: flex;
    padding: 15px;
    background: white;
    border-top: 1px solid #e1e5e9;
    gap: 10px;
}

#chatbot-input {
    flex: 1;
    border: 2px solid #e1e5e9;
    border-radius: 25px;
    padding: 12px 18px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

#chatbot-input:focus {
    border-color: #007bff;
}

#chatbot-form button {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 70px;
}

#chatbot-form button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* Formulario de datos del usuario */
#chatbot-user-form {
    padding: 20px;
    background: white;
    border-top: 1px solid #e1e5e9;
}

#chatbot-user-form label {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

#chatbot-user-form input {
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

#chatbot-user-form input:focus {
    border-color: #007bff;
}

#chatbot-user-form .btn {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

#chatbot-user-form .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bot-msg, .user-msg {
    animation: fadeInUp 0.3s ease;
}

/* Efectos de flotación para el botón */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
}

#chatbot-btn {
    animation: float 3s ease-in-out infinite;
}

/* Responsive para móviles */
@media (max-width: 480px) {
    #chatbot-window {
        width: 320px;
        height: 450px;
        bottom: 80px;
        right: 10px;
    }
    
    #chatbot-widget {
        bottom: 15px;
        right: 15px;
    }
    
    #chatbot-btn {
        width: 55px;
        height: 55px;
        font-size: 22px;
    }
}

@media (max-width: 360px) {
    #chatbot-window {
        width: 300px;
        height: 400px;
    }
}

/* Estados de carga */
.loading-dots {
    display: inline-block;
}

.loading-dots::after {
    content: '';
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}

/* Indicador de typing */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    background: white;
    border-radius: 18px 18px 18px 4px;
    max-width: 60px;
    align-self: flex-start;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e1e5e9;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #999;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
} 