/**
 * GrowBot Chat Styles
 *
 * @package    GrowBot
 * @author     Alejandro Caballero - lava.caballero@gmail.com
 */

.mbot-wrapper .widget-contanier.chat .content {
    display: flex;
    flex-wrap: wrap;
    position: relative;
    background-color: whitesmoke;
    align-items: stretch;
    align-content: stretch;
}

.mbot-wrapper .widget-contanier.chat .content .messages {
    padding: 2px;
    position: relative;
    width: 100%;
    overflow: auto;
    margin-bottom: 28px;
    height: calc(100% - 28px);
}

.mbot-wrapper .widget-contanier.chat .content .messages .mbot-chat-message {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    align-content: stretch;
    margin-bottom: 10px;
    position: relative;
}

.mbot-wrapper .widget-contanier.chat .content .messages .mbot-chat-message:last-child {
    margin-bottom: 0;
}

.mbot-wrapper .widget-contanier.chat .content .messages .mbot-chat-message.chat-notice {
    margin-top:   0;
    margin-left:  0;
    margin-right: 0;
    font-size:    0.9em;
}

.mbot-wrapper .widget-contanier.chat .content .messages .mbot-chat-message .sent {
    font-size: 0.8em;
    color: grey;
    align-self: flex-end;
}

.mbot-wrapper .widget-contanier.chat .content .messages .mbot-chat-message .message {
    display: inline-block;
    width: auto;
    padding: 2px 4px;
    border: 1px solid transparent;
    border-radius: 5px;
    max-width: calc(80% - 32px);
}

.mbot-wrapper .widget-contanier.chat .content .messages .mbot-chat-message .message-body .cometchat_smiley {
    width: auto;
    height: 1em;
    vertical-align: bottom;
}

.mbot-wrapper .widget-contanier.chat .content .messages .mbot-chat-message .author {
    font-weight: bold;
}

.mbot-wrapper .widget-contanier.chat .content .messages .mbot-chat-message p {
    margin-top: 0;
    margin-bottom: 0;
}

.mbot-wrapper .widget-contanier.chat .content .messages .mbot-chat-message .image {
    max-width: 100%;
    max-height: 200px;
}

.mbot-wrapper .widget-contanier.chat .content .input {
    position: absolute; width: 100%;
    white-space: nowrap; 
    bottom: 0; padding: 0 2px;
}

.mbot-wrapper .widget-contanier.chat .content .input textarea {
    padding-right: 28px;
    width: 100%;
}

.mbot-wrapper .widget-contanier.chat .content .input .buttons {
    display: inline-block;
    position: absolute;
    top: 2px;
    right: 4px;
    z-index: 1;
    font-size: 12px;
}

.mbot-wrapper .widget-contanier.chat .content .messages .mbot-chat-message .arrow { width: 10px; }



.mbot-wrapper .widget-contanier.chat .content .messages .mbot-chat-message.incoming .arrow.left  { order: 1; }
.mbot-wrapper .widget-contanier.chat .content .messages .mbot-chat-message.incoming .message     { order: 2; }
.mbot-wrapper .widget-contanier.chat .content .messages .mbot-chat-message.incoming .sent        { order: 3; padding-left: 4px; }
.mbot-wrapper .widget-contanier.chat .content .messages .mbot-chat-message.incoming .arrow.right { order: 4; flex-grow: 1; }

.mbot-wrapper .widget-contanier.chat .content .messages .mbot-chat-message.incoming .message {
    background-color: #e6e9ed; border-color: dimgrey;
}

.mbot-wrapper .widget-contanier.chat .content .messages .mbot-chat-message.incoming .arrow.left .tip {
    display: inline-block;
    width: 0;
    height: 0;
    border: 10px solid transparent;
    border-right-color: dimgrey;
    border-left: 0;
    border-top: 0;
}
.mbot-wrapper .widget-contanier.chat .content .messages .mbot-chat-message.incoming .arrow.right .tip {
    display: none;
}



.mbot-wrapper .widget-contanier.chat .content .messages .mbot-chat-message.outgoing .arrow.left   { order: 1; flex-grow: 1; }
.mbot-wrapper .widget-contanier.chat .content .messages .mbot-chat-message.outgoing .sent         { order: 2; padding-right: 4px; }
.mbot-wrapper .widget-contanier.chat .content .messages .mbot-chat-message.outgoing .message      { order: 3; }
.mbot-wrapper .widget-contanier.chat .content .messages .mbot-chat-message.outgoing .arrow.right  { order: 4; }

.mbot-wrapper .widget-contanier.chat .content .messages .mbot-chat-message.outgoing .message {
    background-color: #dcf8c6; border-color: green;
}

.mbot-wrapper .widget-contanier.chat .content .messages .mbot-chat-message.outgoing .arrow.left  .tip {
    display: none;
}
.mbot-wrapper .widget-contanier.chat .content .messages .mbot-chat-message.outgoing .arrow.right .tip {
    display: inline-block;
    width: 0;
    height: 0;
    border: 10px solid transparent;
    border-left-color: green;
    border-right: 0;
    border-top: 0;
}
