/* Chatbot comercial - nexodigitaldesing */

#nexo-chatbot {
    position: fixed;
    right: 24px;
    bottom: 100px;
    z-index: 9999;
    font-family: Arial, sans-serif;
}

#nexo-chat-boton {
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 14px 22px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

#nexo-chat-boton:hover {
    background: #1d4ed8;
}

#nexo-chat-ventana {
    position: absolute;
    bottom: 65px;
    right: 0;
    width: 360px;
    height: 480px;
    max-width: calc(100vw - 32px);
    max-height: calc(100dvh - 190px);
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    color: #1e293b;
}

#nexo-chat-ventana[hidden] {
    display: none;
}

.nexo-chat-cabecera {
    background: #1e293b;
    color: white;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

#nexo-chat-cerrar {
    background: transparent;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

#nexo-chat-mensajes {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #f8fafc;
}

.nexo-chat-asistente,
.nexo-chat-usuario {
    padding: 12px;
    border-radius: 12px;
    margin: 0 0 12px;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    line-height: 1.5;
}

.nexo-chat-asistente {
    background: #e2e8f0;
}

.nexo-chat-usuario {
    background: #dbeafe;
    margin-left: 24px;
}

#nexo-chat-formulario {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: white;
    border-top: 1px solid #e2e8f0;
}

#nexo-chat-entrada {
    flex: 1;
    min-width: 0;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
}

#nexo-chat-formulario button {
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 14px;
    cursor: pointer;
}

@media (max-width: 480px) {
    #nexo-chatbot {
        right: 16px;
        bottom: 88px;
    }

    #nexo-chat-ventana {
        width: calc(100vw - 32px);
        height: min(480px, calc(100dvh - 180px));
    }
}
/* Corrección de legibilidad de mensajes */
#nexo-chatbot .nexo-chat-asistente {
    color: #172338 !important;
    background-color: #e8edf5 !important;
    opacity: 1 !important;
    -webkit-text-fill-color: #172338 !important;
}

#nexo-chatbot .nexo-chat-usuario {
    color: #10243d !important;
    background-color: #dbeafe !important;
    opacity: 1 !important;
    -webkit-text-fill-color: #10243d !important;
}

#nexo-chatbot #nexo-chat-mensajes {
    opacity: 1 !important;
}

