.chat-bubble {
    padding: 1rem;
    border-radius: 10px;
    line-height: 1.8;
    /*    white-space: pre-wrap;
*/ margin-top: 0.7rem;
    margin-bottom: 0.7rem;
    animation: fadeIn 0.6s ease-in;
    width: 100%;
    overflow: auto;
}

.chat-window {
    max-height: 550px;
    overflow-y: auto;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1rem;
}

.assistant-bubble {
    margin-right: auto;
    border: solid 1px rgba(0, 0, 0, .05);
    box-shadow: 0 .125rem 1rem rgba(0, 0, 0, .03);
}

.system-bubble {
    text-align: center;
    margin-right: auto;
    border: solid 1px rgba(0, 0, 0, .05);
    background-color: #e5e5e5;
    box-shadow: 0 .125rem 1rem rgba(0, 0, 0, .03);
}

.chat-list p {
    margin-bottom: 0;
}

body.hide-header .header {
    margin: 0;
    display: none;
}


.suggestion-list .suggestion {
    cursor: pointer;
    padding: 1.25rem;
    width: 222px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    border-radius: 0.75rem;
    justify-content: space-between;
    background: var(--secondary-color);
    transition: 0.2s ease;
}

    .suggestion-list .suggestion:hover {
        background: var(--secondary-hover-color);
    }

    .suggestion-list .suggestion :where(.text, .icon) {
        font-weight: 400;
        color: var(--text-color);
    }

    .suggestion-list .suggestion .icon {
        width: 42px;
        height: 42px;
        display: flex;
        font-size: 1.3rem;
        margin-top: 2.5rem;
        align-self: flex-end;
        align-items: center;
        border-radius: 50%;
        justify-content: center;
        color: var(--text-color);
        background: var(--primary-color);
    }

.chat-list {
    padding: 1rem;
    overflow-y: auto;
    scrollbar-color: #999 transparent;
}

    .chat-list .message.incoming {
        margin-top: 1.5rem;
    }

    .chat-list .message .message-content {
        display: flex;
        gap: 1.5rem;
        width: 100%;
        align-items: center;
    }

    .chat-list .message .text {
        color: var(--text-color);
        white-space: pre-wrap;
    }

    .chat-list .message.error .text {
        color: #e55865;
    }

    .chat-list .message.loading .text {
        display: none;
    }

    .chat-list .message .avatar {
        width: 40px;
        height: 40px;
        object-fit: cover;
        border-radius: 50%;
        align-self: flex-start;
    }

    .chat-list .message.loading .avatar {
        animation: rotate 3s linear infinite;
    }

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

.chat-list .message .icon {
    color: var(--text-color);
    cursor: pointer;
    height: 35px;
    width: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    font-size: 1.25rem;
    margin-left: 3.5rem;
    visibility: hidden;
}

    .chat-list .message .icon.hide {
        visibility: hidden;
    }

.chat-list .message:not(.loading, .error):hover .icon:not(.hide) {
    visibility: visible;
}

.chat-list .message .icon:hover {
    background: var(--secondary-hover-color);
}

.chat-list .message .loading-indicator {
    display: none;
    gap: 0.8rem;
    width: 100%;
    flex-direction: column;
}

.chat-list .message.loading .loading-indicator {
    display: flex;
}

.chat-list .message .loading-indicator .loading-bar {
    height: 11px;
    width: 100%;
    border-radius: 0.135rem;
    background-position: -800px 0;
    background: linear-gradient(to right, #4285f4, var(--primary-color), #4285f4);
    animation: loading 3s linear infinite;
}

    .chat-list .message .loading-indicator .loading-bar:last-child {
        width: 70%;
    }

@keyframes loading {
    0% {
        background-position: -800px 0;
    }

    100% {
        background-position: 800px 0;
    }
}

.typing-area {
    position: sticky;
    width: 100%;
    left: 0;
    bottom: 0;
    z-index: 99;
    padding: 1rem;
    background: var(--primary-color);
}

    .typing-area :where(.typing-form, .action-buttons) {
        display: flex;
        gap: 0.75rem;
    }

.typing-form .input-wrapper {
    width: 100%;
    height: 56px;
    display: flex;
    position: relative;
    gap: 0.25rem;
}

.typing-form .typing-input {
    height: 110%;
    max-height: 115%;
    width: 100%;
    border: none;
    outline: none;
    font-size: 1rem;
    color: var(--text-color);
    padding: 1.1rem 4rem 1.1rem 1.5rem;
    border-radius: 100px;
    background: var(--secondary-color);
}

    .typing-form .typing-input:focus {
        background: var(--secondary-hover-color);
    }

    .typing-form .typing-input::placeholder {
        color: var(--placeholder-color);
    }

.typing-area .icon {
    width: 56px;
    border: 0;
    height: 56px;
    flex-shrink: 0;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    font-size: 1.4rem;
    color: var(--text-color);
    align-items: center;
    justify-content: center;
    background: var(--secondary-color);
    transition: 0.2s ease;
}

    .typing-area .icon:hover {
        background: var(--secondary-hover-color);
    }

.typing-form #send-message-button {
    position: absolute;
    right: 0;
    outline: none;
    border: none;
    transform: scale(0);
    background: transparent;
    transition: transform 0.2s ease;
}

.typing-form .typing-input:valid ~ #send-message-button {
    transform: scale(1);
}

.typing-area .disclaimer-text {
    text-align: center;
    font-size: 0.85rem;
    margin-top: 2rem;
    color: var(--placeholder-color);
}
/* Responsive media query code for small screen */
@media (max-width: 768px) {
    .header:is(.title, .subtitle) {
        font-size: 2rem;
        line-height: 2.6rem;
    }

    .header .subtitle {
        font-size: 1.7rem;
    }

    .typing-area:where(.typing-form, .action-buttons) {
        gap: 0.4rem;
    }

    .typing-form .input-wrapper {
        height: 50px;
    }

    .typing-form .typing-input {
        padding: 1.1rem 3.5rem 1.1rem 1.2rem;
    }

    .typing-area .icon {
        height: 50px;
        width: 50px;
    }

    .typing-area .disclaimer-text {
        font-size: 0.75rem;
        margin-top: 0.5rem;
    }
}

.bot-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.status-indicator {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.3);
        opacity: 0.7;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/*.dt-container .dt-paging ul.pagination {
    justify-content: center;
}*/
/*
.dt-buttons > .dt-button, .dt-buttons > div.dt-button-split .dt-button {
    display: inline-block !important;
    font-weight: 400 !important;
    text-align: center !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    border: 1px solid transparent !important;
    padding: .375rem .75rem !important;
    font-size: 1rem !important;
    line-height: 1.5 !important;
    border-radius: .25rem !important;
    transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out !important;
    color: #212529 !important;
    background: var(--secondary-color) !important;
    border-color: var(--secondary-color) !important;
}
div.dt-buttons {
    margin-bottom: -34px;
}
div.dt-container div.dt-search {
    text-align: left;
    padding-bottom: 12px;
}*/


.chat-bubble .select2-container {
    display: inline-block;
    width: 180px !important;
    margin-right: .5rem !important;
    margin-left: .5rem !important;
}

.chat-bubble .chart-type-select {
    width: 120px;
    display: inline-block;
}

.chat-bubble .chart-x-select {
    width: 150px;
    display: inline-block;
}

.chat-bubble .chart-y-select {
    width: 180px;
    display: inline-block;
}

.chat-bubble pre {
    border-radius: 12px;
    padding: 10px;
    background: #282c34;
    filter: drop-shadow(0 0 5px #0005);
    color: #ffffff;
    /*    height: 47px;
*/
}

.ai-request-box {
    background-color: #f1f8ff;
    border: 2px solid #007acc;
    border-radius: 6px;
    padding: 12px;
    margin: 16px 0;
}

.chat-bubble h2 {
    text-align: center;
}

.chat-bubble h1 {
    text-align: center;
}

.typing-input::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.1);
    border-radius: 10px;
    background-color: #F5F5F5;
}

.typing-input::-webkit-scrollbar {
    width: 10px;
    background-color: WhiteSmoke;
}

.typing-input::-webkit-scrollbar-thumb {
    border-radius: 10px;
    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.1);
    background-color: #8E9298;
}


.loading-box {
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.loading-content {
    text-align: center;
    font-size: 1.2em;
    border-radius: 10px;
    height: 150px;
}

.loading-message {
    display: block;
    margin-bottom: 10px;
    background: #DBE1EA;
    border-radius: 50rem;
    padding: 12px 20px;
}

.loading-effect {
    width: 50px;
    height: 50px;
    margin: auto;
    border: 5px solid #ccc;
    border-top: 5px solid #6c757d;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}







.select_fontAwesome select {
    font-family: FontAwesome !important;
    text-transform: lowercase !important;
}

    .select_fontAwesome select option {
        font-family: FontAwesome !important;
        text-transform: lowercase !important;
    }

.select_fontAwesome .picker .pc-select {
    font-family: FontAwesome !important;
    text-transform: lowercase !important;
}

    .select_fontAwesome .picker .pc-select * {
        text-transform: lowercase !important;
    }




.chart-container {
    overflow: auto;
    width: 100%;
    height: 70vh;
    position: relative;
    z-index: 1;
}

.chart-wrapper {
    position: relative;
    min-width: 100%;
    min-height: 100%;
    width: max-content;
    height: max-content;
    transform-origin: top left;
    z-index: 1;
}

.chart-container.grabbable {
    cursor: grab;
}

.chart-container.grabbing {
    cursor: grabbing;
}

.node-body {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    padding: 0;
    margin: 0;
    z-index: 1;
    list-style: none;
}

.org-chart ul {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    padding: 0;
    margin: 0;
    list-style: none;
}

.org-chart li {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 20px;
}

.node {
    margin-top: 50px;
    cursor: pointer;
    position: relative;
    padding: 10px;
    width: 160px;
    text-align: center;
    transition: all 0.2s;
}

    .node:hover {
        background: var(--bs-body-bg);
        border: 1px solid rgba(var(--bs-theme-rgb));
        transition: all 0.2s;
    }

.connectors {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}




/*
.connections {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
}*/

/*.node {
    position: absolute;
    width: 160px;
    padding: 10px;
    cursor: pointer;
}*/

.node .node-header .node-icon {
    font-size: 3.4em;
    display: block;
    width: 100%;
    padding-bottom: 15px;
}

.node-header {
    font-weight: bold;
    margin-bottom: 5px;
    cursor: pointer;
}

.node-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.node-department .node-header .node-icon {
    font-size: 3.5em;
    padding-bottom: 7px;
}

.node-agent {
    font-size: 0.7rem;
    padding: 7px;
    width: 100px;
}

    .node-agent .node-header .node-icon {
        font-size: 3em;
        padding-bottom: 7px;
    }

.node-tool {
    font-size: 0.5rem;
    padding: 2px;
    width: 80px;
}

    .node-tool .node-add-btn {
        display: none;
    }

    .node-tool .node-header .node-icon {
        font-size: 3em;
        padding-bottom: 6px;
    }

.node-list-box .node-selected {
    background: var(--bs-body-bg);
    border: 1px solid;
    border-color: var(--primary-color);
    box-shadow: 0 2px 6px var(--bs-theme-bg-subtle);
    transform: translateY(-2px);
}

.loading-message {
    text-align: center;
    font-style: italic;
    color: #888;
}

.loading-animation::after {
    content: ".";
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0% {
        content: ".";
    }

    33% {
        content: "..";
    }

    66% {
        content: "...";
    }
}

.messenger .messenger-content .system-message {
}



.messenger .messenger-content delegate {
    display: block;
    padding: 1rem;
    font-size: .875rem;
    color: var(--bs-body-color);
    word-break: break-all;
    word-wrap: break-word;
    background-color: var(--bs-body-bg);
    border: 1px solid #b3b6b7;
    border-radius: 8px;
}

pre {
    display: block;
    padding: 1rem;
    font-size: .875rem;
    color: var(--bs-body-color);
    background-color: var(--bs-card-cap-bg);
    border: 1px solid #b3b6b7;
    border-radius: 8px;
    word-break: break-all;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow: auto;
}


.timeline {
    max-width: 85%;
    margin: 0 auto;
    position: relative;
}

.timeline-container {
    position: relative;
    margin-bottom: 20px;
}

.request-card {
    border-radius: 12px;
    margin-bottom: 1rem;
    position: relative;
    background-color: var(--bs-component-bg);
    border: var(--bs-border-width) solid var(--bs-border-color);
}

    .request-card:hover {
        box-shadow: 0 2px 15px rgba(var(--bs-body-color-rgb),.07);
    }

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    border-radius: 12px !important;
    padding: .5rem 1rem;
    border: 0 !important;
    background-color: var(--bs-comp);
}

    .card-header p {
        margin-bottom: 0;
    }

    .card-header .badge-time {
        color: #6e6e73;
        font-size: 0.85rem;
    }

    .card-header .card-header-sender {
        color: #6e6e73;
        font-weight: 500;
    }

.card-details {
    font-size: 0.9rem;
    color: #6e6e73;
    margin-top: 10px;
    display: none;
    padding: .5rem 1rem;
}

.status-icon {
    position: absolute;
    left: -32px;
    top: 15px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    color: var(--bs-theme);
}

.chatbot-message-tools {
    max-width: 85%;
    margin: 0 auto 20px auto;
    position: relative;
}

    .chatbot-message-tools .card-tool-container {
        border-radius: 12px;
        position: relative;
        background-color: var(--bs-comp);
        margin-bottom: 1rem;
    }

    .chatbot-message-tools .card-tool {
        border-radius: 12px;
        position: relative;
        display: flex;
        justify-content: space-between;
        align-items: center;
        cursor: pointer;
        font-weight: 500;
        background: rgba(var(--bs-body-bg-rgb), .5);
        cursor: default;
    }

    .chatbot-message-tools .card-tool-icon {
        position: absolute;
        left: -32px;
        top: 9px;
        width: 10px;
        height: 10px;
        border-radius: 50%;
        color: var(--bs-theme);
    }

.chatbot {
    font-size: 0.95rem;
    overflow: auto;
    height: 100%;
    padding-bottom: calc(.25rem*25) !important;
}

.status-processing {
    background-color: #ff9500;
}

.status-success {
    background-color: #34c759;
}

.status-failed {
    background-color: #ff3b30;
}

.status-rejected {
    background-color: #afafaf;
}

/*.nested-line {
    position: absolute;
    left: -25px;
    top: 0;
    bottom: 0;
    width: 2px;
    border-radius: 10px;
    background-color: #b3b6b7;
}*/

.nested-requests {
    margin-left: 25px;
    position: relative;
}

@media (max-width: 768px) {
    .card-details {
        font-size: 12px;
    }

    .status-icon, .chatbot-message-tools .card-tool-icon {
        left: -25px;
    }

    .nested-line {
        left: -15px;
    }

    .nested-requests {
        margin-left: 15px;
    }
}

@media (max-width: 480px) {
    .card-header i {
        margin-top: 5px;
    }

    .nested-line {
        left: -10px;
    }
    .widget-chat {
        padding: 0 5px;
    }
}

.widget-chat .widget-chat-message p {
    margin: 5px 0
}

.chatbot .chatbot-message p {
    margin: 5px 0
}

.widget-chat-box {
    min-height: 250px;
    max-height: 400px;
    overflow: auto;
}

/*.assistant-message.typing-animation {
    overflow: hidden;
    white-space: nowrap;
    animation: typing 0.5s steps(50,end)
}

@keyframes typing {
    from {
        width: 0
    }
    to {
        width: 100%
    }
}*/
/*.chatbot-message.user-message p {
    white-space: pre-line;
}
*/

.chat-spinner-message {
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}


:root {
    --primary-color: #007bff;
    --medium-gray: #e9ecef;
    --dark-gray: #6c757d;
    --border-radius: 8px;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#toolSearchInput {
    flex-grow: 1;
    padding: 10px 15px;
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius);
    font-size: 16px;
    outline: none;
}

    #toolSearchInput:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    }

.tool-box-body {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
    max-height: 400px
}

.max-height-300 {
    overflow-y: auto;
    max-height: 300px
}

.max-height-400 {
    overflow-y: auto;
    max-height: 400px
}

.breadcrumb {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    font-size: 14px;
}

#currentToolkitName {
    font-weight: bold;
    color: var(--text-color);
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.items-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toolkit-item, .tool-item {
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius);
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    text-align: left;
}

    .toolkit-item:hover, .tool-item:hover {
        border-color: var(--bs-btn-hover-border-color);
        box-shadow: 0 2px 6px var(--bs-theme-bg-subtle);
        transform: translateY(-2px);
    }

.selectbox-container {
    max-height: 350px;
    overflow-y: auto;
    padding: 5px;
}

.selectbox-item {
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius);
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: flex;
}

    .selectbox-item:hover {
        border-color: var(--primary-color);
        box-shadow: 0 2px 6px var(--bs-theme-bg-subtle);
        transform: translateY(-2px);
    }

    .selectbox-item.d-none {
        display: none !important;
    }

.item-icon {
    font-size: 27px;
    margin-right: 12px;
    width: 30px;
    text-align: center;
}

.item-details {
    flex-grow: 1;
}

.item-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-color);
    margin-bottom: 4px;
}

.item-description, .tool-item-toolkit-name {
    font-size: 13px;
    color: var(--dark-gray);
}

.tool-item-toolkit-name {
    font-style: italic;
}

.cart-top-header {
    top: 0;
    position: sticky;
    z-index: 2;
}

.max-height-65vh {
    max-height: 65vh;
    overflow-y: auto;
}


.dropdown-menu li {
    position: relative;
}

.dropdown-menu .dropdown-submenu {
    display: none;
    position: absolute;
    left: 100%;
    top: -7px;
}

.dropdown-menu .dropdown-submenu-left {
    right: 100%;
    left: auto;
}

.dropdown-menu > li:hover > .dropdown-submenu {
    display: block;
}

.form-control-image {
    max-width: 100px;
    height: 50px;
    object-fit: contain;
    border-radius: 8px;
}
.cursor-default {
    cursor: default;
}
.cursor-text {
    cursor: text;
}

.widget-chat .chatbot-message table {
    margin-bottom: 0.5rem;
}

.widget-chat .chatbot-message .table-responsive {
    margin-bottom: 0.5rem;
}
