body{
    /* background-color: #555; */
    /* width: 100vw; */
    width: 100%;
    /* height: 100vh; */
    height: 100%;
}

/* main */
:root{
    --left-width: 140px;
    --slider-width: 5px;
    --label-height: 32.5px;
    --avatar-width: 50px;
    --bottom-height: 125px;
    --button-height: 30px;
    --nav-top-height: 37.5px;
    --nav-bottom-height: 17.5px;
}

body{
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.center{
    display: flex;
    justify-content: center;
    align-items: center;
}

.flex-row{
    display: flex;
    flex-direction: row;
    align-items: center;
}

.flex-col{
    display: flex;
    flex-direction: column;
    align-items: center;
}

#ai-panel{
    /* border: 1px solid; */
    position: fixed;
    justify-content: space-between;
    background-color: #eee;
    z-index: 200;
}

#ai-panel.part{
    width: 800px;
    height: 650px;
    margin-left: calc(50vw - 400px);
    margin-top: calc(50vh - 325px);
    box-shadow: 0 0 4px #000;
}

#ai-panel-dismisser{
    z-index: 500;
    position: absolute;
    top: 0px;
    right: 2px;
    color: #aaa;
    text-shadow: 0 0 2px #000;
    font-size: 25px;
}

#ai-nav{
    width: var(--left-width);
    height: 100%;
    background-color: #222;
    color: #eee;
    position: relative;
    overflow: hidden;
    /* border: 1px solid; */
}

#ai-slider{
    width: var(--slider-width);
    height: 85%;
    border-radius: 5px;
    background-color: #999;
    opacity: .7;
    cursor: pointer;
    transition: opacity 200ms ease-in;
}

#ai-slider:hover{
    opacity: 1;
}

#ai-main{
    position: relative;
    width: calc(100% - 5px - var(--slider-width) - var(--left-width));
    justify-content: space-between;
    height: 100%;
    overflow: hidden;
    /* border: 1px solid; */
}

#ai-main #ai-panel-loader{
    display: none;
    position: absolute;
    z-index: 600;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border-radius: 100%;
    color: cadetblue;
    border: 2px solid cadetblue;
    font-size: 30px;
    background-color: transparent;
    backdrop-filter: blur(1px) saturate(20%);
    -webkit-backdrop-filter: blur(1px) saturate(20%);
    cursor: pointer;
    transition: opacity 200ms ease-in, 
        box-shadow 200ms ease-in,
        color 200ms ease-in;
}

#ai-main #ai-panel-loader:hover{
    opacity: 0.75;
}

@keyframes rotate{
    from{
        transform: rotate(0deg);
    }
    to{
        transform: rotate(360deg);
    }
}

#ai-main #ai-panel-loader.loading{
    border: 2px solid coral;
    color: coral;
}

#ai-main #ai-panel-loader.loading i{
    transform-origin: center center;
    animation: rotate 2000ms infinite linear;
}

#ai-panel.collapse #ai-nav{
    width: 0;
    opacity: 0;
}

#ai-panel.collapse #ai-main{
    width: 100%;
}

#ai-nav .btn-area{
    width: 100%;
    height: var(--nav-top-height);
    /* border: 1px solid; */
}

#ai-nav .btn-area .btn{
    width: calc(var(--left-width) / 2 - 5px);
}

#ai-nav .btn-area .btn#btn-del{
    color: #fc4f30;
}

#ai-nav .btn-area .btn#btn-add{
    color: cadetblue;
}

#ai-nav .btn-area .btn#btn-del:hover{
    background-color: #fc4f30;
    color: #fff;
    border: 1.5px solid #fc4f30;
}

#ai-nav .btn-area .btn#btn-add:hover{
    background-color: cadetblue;
    color: #fff;
    border: 1.5px solid cadetblue;
}

.btn-area{
    justify-content: space-around;
    white-space: nowrap;
    overflow: hidden;
}

.btn-area .btn{
    min-width: 50px;
    height: 27.5px;
    border-radius: 5px;
    font-family: Georgia;
    user-select: none;
    white-space: nowrap;
    overflow: hidden;
    justify-content: center;
    align-items: center;
    font-size: 15px;
    border: 1.5px solid;
    cursor: pointer;
    transition: opacity 200ms ease-in, 
        background-color 200ms ease-in, 
        color 200ms ease-in;
}

.btn-area .btn i{
    margin-right: 3px;
    font-weight: normal;
}

.btn-area .btn span{
    font-weight: bold;
}

.opa{
    cursor: pointer;
    transition: opacity 200ms ease-in;
}

.opa:hover{
    opacity: 0.75;
}

#ai-nav #nav-tree{
    width: 100%;
    height: calc(100% - var(--nav-top-height) - var(--nav-bottom-height));
    overflow-y: auto;
    overflow-x: hidden;
    /* border: 1px solid; */
}

#ai-nav #nav-tree .chat-box{
    position: relative;
    width: 100%;
    height: var(--label-height);
    /* border: 1px solid; */
    cursor: default;
}

#ai-nav #nav-tree .chat-box:hover{
    background-color: #000;
}

#ai-nav #nav-tree .chat-box.active{
    background-color: #444;
}

#ai-nav #nav-tree .chat-box .omit{
    position: absolute;
    z-index: 10;
    right: 0;
    top: 0;
    color: #fff;
    width: 25px;
    height: 100%;
    border-radius: 100%;
    backdrop-filter: blur(1px) saturate(20%);    
    -webkit-backdrop-filter: blur(1px) saturate(20%);    
}

#ai-nav #nav-tree i.fa-comment{
    width: 20px;
    max-width: 20px;
    margin-right: 2px;
}

#ai-nav #nav-tree span.chat-label{
    width: calc(100% - 22px);
    max-width: calc(100% - 22px);
    white-space: nowrap;
    color: #ddd;
    /* font-size: 15px; */
    overflow: hidden;
    text-overflow: ellipsis;
}

#ai-nav #nav-tree span.chat-label input[type="text"]{
    width: calc(100% - 30px);
    /* font-size: 17px; */
    background-color: transparent;
    outline: none;
    border: 1px solid cadetblue;
    border-radius: 2px;
    color: #eee;
}

#ai-nav #nav-tree span.chat-label input[type="text"]:focus{
    border: 1px solid cyan;
}

#ai-nav #nav-tree .chat-box .label-options{
    position: absolute;
    z-index: 10;
    left: 0;
    right: 0;
    background-color: #000;
    width: 100%;
    height: 100%;
    justify-content: space-around;
    transform: translateX(100%);
    transition: transform 200ms ease-in;
}

#ai-nav #nav-tree .chat-box .label-options.expand{
    transform: none;
}

#ai-nav #nav-tree .tree-stick{
    width: 100%;
    overflow: hidden;
    font-family: sans-serif;
    height: 20px;
    font-size: 14px;
    font-weight: bold;
    color: #aaa;
    user-select: none;
    cursor: default;
}

#ai-nav #nav-tree .tree-stick i{
    margin-left: auto;
    margin-right: 3px;
    font-size: 12px;
}

#ai-nav #nav-tree .tree-stick span{
    white-space: nowrap;
    margin-right: 5px;
}

#ai-handler{
    width: 85%;
    height: var(--slider-width);
    border-radius: 5px;
    background-color: #aaa;
    opacity: .7;
    cursor: pointer;
    transition: opacity 200ms ease-in;
}

#ai-handler:hover{
    opacity: 1;
}

#ai-main #ai-main-area{
    display: block;
    width: 100%;
    height: calc(100% - 5px - var(--slider-width) - var(--bottom-height));
    overflow: auto;
    /* border: 1px solid; */
}

#ai-main #ai-main-area .one-chat{
    width: 100%;
    padding: 5px 0;
    align-items: start;
}

#ai-main #ai-main-area .one-chat .chat-avatar{
    width: var(--avatar-width);
    user-select: none;
    /* border: 1px solid; */
}

#ai-main #ai-main-area .one-chat .chat-avatar .action-button-area{
    width: 40px;
    margin-top: 3px;
    /* border: 1px solid; */
    font-size: 12px;
}

#ai-main #ai-main-area .one-chat .chat-avatar .action-button-area .btn{
    color: #fff;
    margin-top: 4px;
    white-space: nowrap;
    border-radius: 3px;
}

#ai-main #ai-main-area .one-chat .chat-avatar .action-button-area .btn i{
    margin-right: 2px;
    padding: 1px 2px;
}

#ai-main #ai-main-area .one-chat .chat-avatar .action-button-area .btn.btn-copy{
    background-color: darkkhaki;
}
#ai-main #ai-main-area .one-chat .chat-avatar .action-button-area .btn.btn-remove{
    background-color: darkslategrey;
}

#ai-main #ai-main-area .one-chat .chat-avatar img,
#ai-main #ai-main-area .one-chat .chat-avatar i.fa-user,
#ai-main #ai-main-area .one-chat .chat-avatar i.fa-brain{
    width: 40px;
    height: 40px;
    font-size: 33px;
    color: #bbb;
    display: flex;
    justify-content: center;
    align-items: center;
    object-fit: cover;
    border-radius: 5px;
}

#ai-main #ai-main-area .one-chat .chat-area{
    width: calc(100% - var(--avatar-width) - 40px);
    margin: 40px 10px;
    padding: 5px;
    /* border: 1px solid; */
    overflow: auto;
    border-radius: 10px;
}

#ai-main #ai-main-area .one-chat:nth-child(odd) .chat-area{
    background-color: rgb(232, 232, 232);
}

#ai-main #ai-main-area .one-chat:nth-child(even) .chat-area{
    background-color: rgb(242, 242, 242);
}

#ai-main #ai-main-area .one-chat .chat-area .chat-area-file{
    width: 300px;
    height: 37.5px;
    margin: 10px 20px;
    height: 45px;
    justify-content: space-around;
    border: 2px solid rgb(221, 64, 36);
    color: rgb(187, 52, 29);
    font-size: 30px;
    border-radius: 5px;
    cursor: default !important;
}

#ai-main #ai-main-area .one-chat .chat-area .chat-area-file span{
    width: 150px;
    max-width: 150px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 22px;
    /* font-weight: bold; */
}

/* #ai-main #ai-main-area .one-chat:nth-child(odd){
    background-color: rgb(232, 232, 232);
}

#ai-main #ai-main-area .one-chat:nth-child(even){
    background-color: rgb(242, 242, 242);
} */

#ai-main #ai-main-bottom{
    width: 100%;
    min-height: 75px;
    height: var(--bottom-height);
    /* border: 1px solid; */
    justify-content: space-evenly;
}

#ai-main #ai-main-bottom textarea{
    width: 90%;
    height: calc(100% - var(--button-height) - 20px);
    min-height: 30px;
    background-color: transparent;
    outline: none;
    border: 1.5px solid #444;
    box-shadow: 0 0 2px #222;
    border-radius: 5px;
    font-size: 15px;
    resize: none;
}

#ai-main.bubble-mode #ai-main-bottom textarea{
    height: calc(100% - var(--button-height) - 50px) !important;
}

#ai-main #ai-main-bottom textarea:focus{
    box-shadow: 0 0 4px #000;
}

#ai-main #ai-main-bottom #ai-button-area{
    width: 90%;
    justify-content: space-between;
    height: var(--button-height);
    /* border: 1px solid; */
}

#ai-main #ai-main-bottom #ai-button-area .button-area{
    height: 100%;
    border-radius: 5px;
    justify-content: space-between;
    overflow: hidden;
    /* border: 1px solid; */
}

#ai-main #ai-main-bottom #ai-button-area .button-area:nth-child(1){
    width: calc(100% - 305px);
    overflow: hidden;
}

#ai-main #ai-main-bottom #ai-button-area .button-area:nth-child(2){
    width: 300px;
    overflow: hidden;
}

.button{
    box-sizing: border-box;
    height: 100%;
    color: #eee;
    border-radius: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.button i{
    margin-right: 3px;
}

#ai-main #ai-main-bottom #ai-button-area .button-area:nth-child(1) .button{
    justify-content: center;
    width: calc(33% - 3px);
}

#ai-main #ai-main-bottom #ai-button-area .button-area:nth-child(2) .button{
    justify-content: center;
    width: 75px;
}

#btn-size.button{
    background-color: rgb(98, 147, 69);
}

#btn-pdf.button{
    border: 2px solid rgb(160, 95, 95);
    color: rgb(160, 95, 95);
}

#btn-pdf.button.active{
    background-color: rgb(160, 95, 95);
    color: #fff;
}

#btn-save.button{
    border: 2px solid rgb(129, 95, 160);
    color: rgb(129, 95, 160);
}

#btn-save.button.active{
    background-color: rgb(129, 95, 160);
    color: #fff;
}

#btn-char.button{
    border: 2px solid rgb(157, 157, 157);
    color: #666;
    width: 95px !important;
}

#btn-part.button{
    width: 120px !important;
    border: 2px solid rgb(39, 140, 147);
    color: rgb(39, 140, 147);
}

#btn-part.button i{
    margin-left: 4px;
    font-size: 1.2em;
}

#btn-send.button{
    background-color: rgb(157, 157, 157);
}

#btn-char.button span#char-count{
    width: 100%;
    height: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#ai-nav #nav-footer{
    width: 100%;
    height: calc(var(--nav-bottom-height) - 5px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #999;
    /* text-decoration: underline; */
    cursor: default;
    padding-bottom: 5px;
    cursor: pointer;
    user-select: none;
    /* border: 1px solid red; */
}

#ai-nav #nav-footer:hover{
    opacity: 0.75;
}

#ai-nav #nav-footer-tooltip{
    position: absolute;
    bottom: 25px;
    left: 5px;
    border-radius: 5px;
    border: 2px solid #444;
    background: linear-gradient(to bottom, #222, #333);
    border-radius: 4px;
    width: calc(100% - 15px);
    height: 200px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    /* display: none; */
}

#ai-nav #nav-footer-tooltip .nft-mo{
    width: 100%;
    height: 27px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    font-family: monospace;
    border-bottom: 2px solid #333;
    cursor: pointer;
}
#ai-nav #nav-footer-tooltip .nft-mo.active{
    border-bottom: 2px solid #555;
    color: #fff;
    text-shadow: 0 0 1px #fff;
}

#item-bar{
    width: 100%;
    height: 32.5px;
    /* border: 1px solid; */
    overflow: hidden;
}

#item-bar::-webkit-scrollbar{
    display: none;
}

#item-bar .bubble-item{
    margin-left: 2px;
    margin-right: 2px;
    padding: 2px 8px;
    font-size: 13px;;
    font-family: Georgia;
    border-radius: 4px;
    user-select: none;
}
