/*include font-awesome, located in font-awesome relative folder url*/
@import url('font-awesome/css/all.min.css');

* {
    box-sizing: border-box;
    font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    font-size: 16px;
}
html, body {
    background-color: #FFFFFF;
    margin: 0;
    width: 100%;
    height: 100%;
}
.chat-ai {
    display: flex;
    width: 100%;
    height: 100%;
}
.chat-ai .open-sidebar {
    position: absolute;
    display: none;
    text-decoration: none;
    align-items: center;
    justify-content: center;
    top: 20px;
    left: 0;
    width: 50px;
    height: 50px;
    background-color: #2e3137;
    border-radius: 0 5px 5px 0;
    box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15);
    z-index: 2;
}
.chat-ai .open-sidebar i {
    color: #fff;
    font-size: 20px;
}
.chat-ai .open-sidebar:hover {
    background-color: #292c31;
}
.chat-ai .conversations {
    position: relative;
    display: flex;
    flex-flow: column;
    align-items: center;
    width: 280px;
    min-width: 280px;
    height: 100%;
    background-color: #292c31;
    z-index: 2;
    box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15);
}
.chat-ai .conversations .new-conversation {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 12px;
    margin: 20px 0;
    width: calc(100% - 35px);
    color: #fff;
    border: 1px solid #696b6f;
    border-radius: 5px;
    font-size: 14px;
    transition: border .2s ease;
}
.chat-ai .conversations .new-conversation i {
    margin-right: 7px;
}
.chat-ai .conversations .new-conversation:hover {
    border: 1px solid #fff;
}
.chat-ai .conversations .list {
    display: flex;
    flex-flow: column;
    flex: 1;
    overflow-y: auto;
    width: 100%;
    height: 100%;
}
.chat-ai .conversations .list .conversation {
    display: flex;
    align-items: center;
    text-decoration: none;
    height: 43px;
    min-height: 43px;
    padding: 12px 16px;
    width: calc(100% - 35px);
    color: #fff;
    font-size: 14px;
    margin: 0 auto 5px auto;
    border-radius: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.chat-ai .conversations .list .conversation i {
    margin-right: 10px;
}
.chat-ai .conversations .list .conversation:hover {
    background-color: #1d2023;
}
.chat-ai .conversations .list .conversation.selected {
    background-color: #16181b;
}
.chat-ai .conversations .footer {
    display: flex;
    width: 100%;
    padding: 12px;
    border-top: 1px solid #35383f;
}
.chat-ai .conversations .footer a {
    display: inline-flex;
    text-decoration: none;
    color: #696b6f;
    padding: 10px;
}
.chat-ai .conversations .footer a.close-sidebar {
    margin-left: auto;
}
.chat-ai .conversations .footer a:hover {
    color: #bfc0c1;
}
.chat-ai .content {
    background-color: #444850;
    color: #fff;
    position: relative;
    width: 100%;
}
.chat-ai .content::after {
    content: "";
    position: absolute;
    bottom: 0;
    height: 200px;
    width: 100%;
    background: linear-gradient(to top, #444850 50%, transparent);
}
.chat-ai .content .welcome {
    display: flex;
    flex-flow: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    font-size: 20px;
    padding-bottom: 200px;
}
.chat-ai .content .welcome h1 {
    display: flex;
    align-items: center;
    margin: 0;
    font-size: 70px;
    background-color: #f3ec78;
    background-image: linear-gradient(45deg, #12C2E9 0%, #c471ed 50%, #f64f59 100%);
    background-size: 100%;
    background-clip: text;
    -webkit-background-clip: text;
    -moz-background-clip: text;
    -webkit-text-fill-color: transparent;
    -moz-text-fill-color: transparent;
}
.chat-ai .content .welcome h1 .ver {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 35px;
    width: 55px;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    border-radius: 5px;
    margin-left: 15px;
    font-weight: 500;
    background-color: #383c42;
    background-clip: border-box;
    -webkit-background-clip: border-box;
    -moz-background-clip: border-box;
    -webkit-text-fill-color: currentcolor;
    -moz-text-fill-color: currentcolor;
}
.chat-ai .content .welcome p {
    margin: 0;
    font-size: 20px;
    padding: 40px 0 60px 0;
}
.chat-ai .content .welcome p a {
    color: #c5c8ce;
    font-size: inherit;
    text-decoration: none;
    border-bottom: 1px dotted #c5c8ce;
}
.chat-ai .content .welcome p a:hover {
    color: #e1e2e5;
}
.chat-ai .content .welcome .open-database {
    display: inline-block;
    text-decoration: none;
    color: #fff;
    font-weight: 500;
    font-size: 14px;
    padding: 12px 15px;
    background-color: #316bc2;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    transition: background-color .2s ease;
}
.chat-ai .content .welcome .open-database i {
    margin-right: 8px;
}
.chat-ai .content .welcome .open-database:hover {
    background-color: #2e64b6;
}
.chat-ai .content .messages {
    display: flex;
    flex-flow: column;
    flex-direction: column-reverse;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding-bottom: 200px;
}
.chat-ai .content .messages .conversation-title {
    display: flex;
    align-items: center;
    justify-content: center;
    word-break: break-all;
    padding: 15px;
    border-bottom: 1px solid #3f434a;
}
.chat-ai .content .messages .conversation-title h2 .text {
    font-size: 24px;
    font-weight: 500;
    color: #ecedee;
}
.chat-ai .content .messages .conversation-title h2 i {
    cursor: pointer;
    position: relative;
    font-size: 14px;
    top: -3px;
    margin-left: 10px;
    color: #8f9196;
}
.chat-ai .content .messages .conversation-title h2 i:hover {
    color: #c7c8cb;
}
.chat-ai .content .messages .message {
    padding: 50px;
}
.chat-ai .content .messages .message .wrapper {
    display: flex;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}
.chat-ai .content .messages .message .wrapper .avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    max-width: 50px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #3a71c5;
    font-weight: 500;
}
.chat-ai .content .messages .message .wrapper .details {
    flex: 1;
}
.chat-ai .content .messages .message .wrapper .details .date {
    font-size: 12px;
    font-weight: 500;
    padding: 0 25px;
    color: #8f9196;
}
.chat-ai .content .messages .message .wrapper .details .text {
    padding: 5px 25px;
    width: 100%;
}
.chat-ai .content .messages .message .wrapper .details .text pre {
    display: block;
    width: 100%;
    padding: 15px 20px;
    border-radius: 5px;
    background-color: #2d2f34;
}
.chat-ai .content .messages .message .wrapper .details .text pre code {
    text-indent: 40px;
    font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    font-size: 14px;
}
.chat-ai .content .messages .message .wrapper .details .text .tokens {
    display: inline-block;
    padding: 5px 7px;
    border-radius: 4px;
    background-color: #3b3e45;
    font-size: 12px;
    font-weight: 500;
    margin-top: 25px;
    color: rgba(255, 255, 255, 0.7);
}
.chat-ai .content .messages .message.assistant {
    border-top: 1px solid #3f434a;
    border-bottom: 1px solid #3f434a;
    background-color: #484c54;
}
.chat-ai .content .messages .message.assistant .wrapper .avatar {
    background-color: #21bd81;
}
.chat-ai .content .messages .message.assistant .wrapper .text .blink {
    animation: blink 1s infinite;
}
@keyframes blink {
    0% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}
.chat-ai .content .message-form {
    position: absolute;
    bottom: 50px;
    max-width: 600px;
    width: 90%;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    background-color: #575c66;
    z-index: 1;
}
.chat-ai .content .message-form input {
    width: 100%;
    height: 100%;
    padding: 15px 40px 15px 15px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    outline: 0;
    color: #fff;
    background-color: transparent;
}
.chat-ai .content .message-form input::placeholder {
    color: #8e949f;
}
.chat-ai .content .message-form button {
    position: absolute;
    right: 10px;
    top: 0;
    bottom: 0;
    appearance: none;
    border: none;
    background-color: transparent;
    color: #8e949f;
    cursor: pointer;
    transition: color .2s ease;
}
.chat-ai .content .message-form button:hover {
    color: #b7bbc2;
}
.chat-ai .error-toast, .chat-ai .success-toast {
    display: flex;
    padding: 12px 15px;
    max-width: 100%;
    position: fixed;
    top: 25px;
    right: 25px;
    background-color: #ffc3c3;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-left: 3px solid #df4747;
    font-weight: 500;
    font-size: 14px;
    color: #bb3c3c;
    opacity: 1;
    transition: opacity 5s ease;
}
.chat-ai .success-toast {
    background-color: #c3ffdc;
    border-left: 3px solid #4bcc81;
    color: #50ad77;
}
.chat-ai-modal {
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    position: fixed;
    top: 0;
    left: 0;
    display: none;
    z-index: 999999;
    align-items: center;
    justify-content: center;
}
.chat-ai-modal .content {
    border-radius: 5px;
    overflow: hidden;
    transform: scale(0.5);
    background-color: #3c4047;
    box-shadow: 0px 0px 5px 2px rgba(0, 0, 0, 0.03);
    width: 400px;
}
.chat-ai-modal .content .heading {
    display: flex;
    padding: 20px;
    margin: 0;
    font-weight: 500;
    justify-content: space-between;
    color: #fff;
    border-bottom: 1px solid #464a52;
    align-items: center;
}
.chat-ai-modal .content .heading .modal-close {
    font-size: 24px;
    line-height: 24px;
    padding-bottom: 4px;
    cursor: pointer;
    color: gray;
}
.chat-ai-modal .content .heading .modal-close:hover {
    color: white;
}
.chat-ai-modal .content .footer {
    display: flex;
    border-top: 1px solid #464a52;
    background-color: #40444c;
    padding: 20px;
}
.chat-ai-modal .content form {
    display: flex;
    flex-flow: column;
    padding: 20px;
}
.chat-ai-modal .content form.file-manager-editor {
    padding: 0;
}
.chat-ai-modal .content form label {
    color: #fff;
    padding-bottom: 10px;
    font-size: 14px;
}
.chat-ai-modal .content form input {
    width: 100%;
}
.chat-ai-modal .content form input, .chat-ai-modal .content form select {
    font-size: 14px;
    border: none;
    border-radius: 4px;
    padding: 0 8px;
    height: 38px;
    margin-bottom: 15px;
    background-color: #535963;
    color: #b1b3b5;
}
.chat-ai-modal .content form input[type="checkbox"] {
    width: auto;
}
.chat-ai-modal .content form .group {
    display: flex;
}
.chat-ai-modal .content form .group > :first-child {
    margin-right: 10px;
}
.chat-ai-modal.large .content {
    width: 900px;
}
.chat-ai-modal.medium .content {
    width: 600px;
}
.chat-ai-modal.open {
    display: flex;
}
.chat-ai-modal.open .content {
    transform: scale(1);
    transition: all 0.2s ease;
}
.chat-ai-modal .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    appearance: none;
    cursor: pointer;
    border: 0;
    background-color: #316bc2;
    color: #fff;
    padding: 0 14px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    height: 38px;
}
.chat-ai-modal .btn:hover {
    background-color: #2e64b6;
}
.chat-ai-modal .btn.alt {
    color: #fff;
    background-color: #31343a;
}
.chat-ai-modal .btn.alt:hover {
    background-color: #2f3237;
}
.chat-ai-modal .btn.disabled {
    pointer-events: none;
    background-color: #b1b3b4;
}
.chat-ai-modal .btn.disabled:hover {
    background-color: #a9abad;
}
.chat-ai-modal .btn.right {
    margin-left: auto;
}
@media screen and (max-width: 800px) {
    .chat-ai .open-sidebar {
        display: flex;
    }
    .chat-ai .conversations {
        display: none;
        position: absolute;
        top: 0;
        left: 0;
    }
    .chat-ai .content .messages .message {
        padding: 20px;
    }
    .chat-ai .content .messages .message .wrapper .avatar {
        min-width: 40px;
        max-width: 40px;
        width: 40px;
        height: 40px;
    }
    .chat-ai .content .messages .message .wrapper .details .date {
        padding: 0 15px;
    }
    .chat-ai .content .messages .message .wrapper .details .text {
        padding: 5px 15px;
    }
    .chat-ai .content .message-form {
        bottom: 25px;
    }
}
