﻿.chat-title {
    padding: 20px 20px 0px 20px;
    font-size: 1.2rem;
    text-transform: capitalize;
}

.chat-title__container {
    display: flex;
    justify-content: space-between;
}

.pp-bot-persona img {
    max-width: 100%;
}

.ai-chat {
    max-height: 420px;
    overflow: hidden;
    overflow-y: auto;
    min-height: 300px;
    padding-top: 0px !important;
}

.ai-widget-container #botTerms {
    color: white;
}

.ai-chat__title {
    color: #6e549b;
    font-size: 3rem;
    font-weight: 600;
    line-height: 2.5rem;
    margin-bottom: 20px;
}

    .ai-chat__title .small-text {
        font-size: 1.5rem;
    }

.ai-chat .btn.btn-primary {
    white-space: normal;
    width: 100%;
    border-radius: 5px;
}

.chat-col .btn {
    padding: 5px 10px;
    width: auto;
    font-size: 1rem;
}

.ai-chat .ai-chat__message-container {
    border: 1px solid #f5f5f5;
    box-shadow: 0px 0px 5px rgba(0,0,0,.05);
    margin-bottom: 20px;
    margin-top: 40px;
    border-radius: 20px;
    padding: 15px 22px;
    min-width: 50%;
    max-width: 90%;
    position: relative;
}

    .ai-chat .ai-chat__message-container:last-of-type {
        margin-bottom: 0;
    }

    .ai-chat .ai-chat__message-container button {
        display: inline-block;
        border: 0;
        background: rgba(0, 0, 0, .05);
        color: black;
        border-radius: 3px;
        cursor: pointer;
        margin-bottom: 10px;
    }


    .ai-chat .ai-chat__message-container.ai-chat__message-container--bot {
        background: rgba(0, 0, 188, .05);
        border-color: #6e549b;
        border-bottom-left-radius: 0;
    }

        .ai-chat .ai-chat__message-container.ai-chat__message-container--bot::after {
            content: 'Poppy';
            position: absolute;
            left: 15px;
            bottom: calc(100% + 5px);
            font-weight: bold;
            font-style: italic;
        }


    .ai-chat .ai-chat__message-container.ai-chat__message-container--user {
        border-color: #b8b8b8;
        background: #f7f7f7;
        border-bottom-right-radius: 0;
    }

        .ai-chat .ai-chat__message-container.ai-chat__message-container--user::after {
            content: 'Me';
            position: absolute;
            right: 15px;
            bottom: calc(100% + 5px);
            font-weight: bold;
            font-style: italic;
        }


    .ai-chat .ai-chat__message-container .system-message button {
        border-radius: 3px;
        white-space: pre-wrap;
    }


.chat_history-col {
    max-width: 400px;
}

    .chat_history-col .chat-history {
        list-style: none;
        padding: 10px;
        margin: 0;
        overflow: hidden;
        max-height: 500px;
        overflow-y: auto;
    }

        .chat_history-col .chat-history .chat-history__item {
            background: rgba(0,0,0,.05);
            margin-bottom: 10px;
            padding: 10px 15px;
            border: 1px solid rgba(0,0,0,.2);
            position: relative;
        }

            .chat_history-col .chat-history .chat-history__item:last-of-type {
                margin-bottom: 0;
            }

            .chat_history-col .chat-history .chat-history__item a:not(.chat-link), .chat_history-col .chat-history .chat-history__item button:not(.chat-link) {
                z-index: 1;
                position: relative;
            }

            .chat_history-col .chat-history .chat-history__item .chat-history-view {
                display: flex;
                justify-content: space-between;
            }

            .chat_history-col .chat-history .chat-history__item .chat-history-item__title {
                margin-right: 10px;
                overflow-wrap: anywhere;
            }

            .chat_history-col .chat-history .chat-history__item span.chat-history-item__actions {
                min-width: 80px;
            }

            .chat_history-col .chat-history .chat-history__item .chat-link {
                z-index: 0;
            }

            .chat_history-col .chat-history .chat-history__item:hover,
            .chat_history-col .chat-history .chat-history__item:focus {
                text-decoration: none;
            }

                .chat_history-col .chat-history .chat-history__item:hover::before,
                .chat_history-col .chat-history .chat-history__item:focus::before {
                    background: rgba(0,0,0,.1)
                }

.chat-col .card-body {
    width: auto !important;
}

.chat_history-col .chat-history .chat-history-edit input [type=text] {
    height: 2.2rem;
    width: calc(100% - 34px);
    margin-top: 5px;
}

.chat-input-container {
    background: white;
    border: 1px solid #bebbbb;
    border-bottom: 3px solid #6e549b;
    border-radius: 5px;
}

    .chat-input-container input {
        border: 0;
    }

.ai-widget-container {
    position: fixed;
    right: 70px;
    bottom: 0;
    z-index: 3;
    max-width: 500px;
}

    .ai-widget-container .card-body {
        width: auto !important;
    }

    .ai-widget-container img {
        max-width: 100%;
    }

    .ai-widget-container .ai-widget-toggle.btn {
        padding: 10px 5px 0 5px;
        border-radius: 5px 5px 0 0;
        backdrop-filter: blur(2px);
        background: rgb(255 252 252 / 80%);
        border-top: 5px solid #6e549b;
        border-right: 5px solid #6e549b;
        border-left: 5px solid #6e549b;
        z-index: 1;
    }

        .ai-widget-container .ai-widget-toggle.btn:focus {
            background: rgb(110 84 155 / 30%);
        }

        .ai-widget-container .ai-widget-toggle.btn:active {
            backdrop-filter: blur(2px);
            background: rgb(255 252 252 / 100%);
            border-top: 5px solid #6e549b;
            border-right: 5px solid #6e549b;
            border-left: 5px solid #6e549b;
            box-shadow: none;
        }

    .ai-widget-container .ai-widget-toggle .pp-bot-persona {
        max-width: 150px;
    }

    .ai-widget-container .ai-widget-toggle:not(.collapsed) .pp-bot-persona img {
        margin-bottom: -5px;
    }

    .ai-widget-container .ai-widget-panel {
        padding: 5px;
        border-radius: 5px 0 0 0;
        backdrop-filter: blur(2px);
        background: #6e549b;
    }

        .ai-widget-container .ai-widget-panel .card-body {
            min-height: 420px;
        }

        .ai-widget-container .ai-widget-panel .chat_history-col .card-body {
            min-height: 476px;
        }

        .ai-widget-container .ai-widget-panel .chat-name-edit {
            position: absolute;
            top: 5px;
            left: 5px;
            width: calc(100% - 105px);
        }

            .ai-widget-container .ai-widget-panel .chat-name-edit input {
                width: calc(100% - 80px);
            }


        .ai-widget-container .ai-widget-panel .chat-col, .ai-widget-container .ai-widget-panel .chat-col.chat_history-col {
            max-width: 500px;
            width: 100%;
            height: 600px;
            max-height: 100%;
        }

.ai-widget-panel::after {
    content: '';
    display: block;
    position: absolute;
    width: 160px;
    height: 9px;
    top: 0;
    background: linear-gradient(#ffffff, #f7f7f7);
    right: 5px;
}

input[type=text].user-msg {
    width: 100%;
    display: inline-block;
    height: 38px;
    padding-right: 70px;
}

.ai-chat__send {
    width: 60px;
    margin-left: 16px;
    display: inline-block;
    padding: 4px 15px;
    position: absolute;
    right: 18px;
    bottom: 4px;
    background: transparent !important;
    color: #425563 !important;
    font-size: large;
    border: 0;
}

.chat-history__item .btn-primary--delete::before,
.ai-widget-panel .btn-primary--delete::before {
    margin-right: 0;
}

.alert-bubble {
    position: absolute;
    top: -80px;
    right: 180px;
    width: auto;
    white-space: nowrap;
    color: white;
    background: #6e549b;
    border: 5px solid #6e549b;
    padding: 25px;
    border-radius: 25px 25px 0px 25px;
}

.bounce {
    animation: bounce 2s ease 3;
}


#ai-chat-page .btn.btn-clear {
    color: #425563;
}

    #ai-chat-page .btn.btn-clear:hover,
    #ai-chat-page .btn.btn-clear:focus {
        color: #6e549b;
    }

#ai-chat-page .btn.btn-primary.btn-primary--delete::before {
    margin-right: 0;
}

#ai-chat-page .btn.btn-clear.bot-terms {
    font-size: small;
    padding: 0;
    margin-top: 15px;
    margin-bottom: 5px;
    color: white;
    width: 100%;
}

    #ai-chat-page .btn.btn-clear.bot-terms:hover,
    #ai-chat-page .btn.btn-clear.bot-terms:hover:focus {
        color: white;
        text-decoration: underline;
    }

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
        transform: scale(100%)
    }

    40% {
        transform: translateY(-30px);
        transform: scale(50%,50%)
    }

    60% {
        transform: translateY(-15px);
    }
}

@media (max-width:992px) {
    .chat-col {
        margin-bottom: 20px;
    }

    .chat_history-col {
        max-width: 100%;
    }
}
