code {
    color: #000000;
    /* font-family: Public Sans", -apple-system, "system-ui", "Segoe UI", Oxygen,  */
    /* font-family: "Public Sans", -apple-system, "system-ui", "Segoe UI", Oxygen, sans-serif;
    font-size: 1rem; */
    /* sans serif */
    /* font-family: sans-serif; */
    /* font-size: 1.5rem; */
}

.dark-style code {
    color: #ffffff;
    /* font-family: "Public Sans", -apple-system, "system-ui", "Segoe UI", Oxygen, sans-serif;
    font-size: 1rem; */
    /* sans serif */
    /* font-family: sans-serif; */
    /* font-size: 1.5rem; */
}

.app-chat {
    position: relative;
    height: calc(100vh - 10.9rem)
}

.layout-navbar-hidden .app-chat {
    height: calc(100vh - 6.5rem)
}

@media(min-width: 1200px) {
    .layout-horizontal .app-chat {
        height:calc(100vh - 10.9rem - 3rem)
    }
}

@media(max-width: 992px) {
    .app-chat .app-sidebar {
        z-index:4
    }
}

.app-chat .app-sidebar .sidebar-header {
    position: relative
}

.app-chat .app-sidebar .sidebar-header .close-sidebar {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem
}

.app-chat .app-sidebar .sidebar-header .chat-sidebar-avatar {
    width: 84px;
    height: 84px
}

.app-chat .app-sidebar .sidebar-header .chat-sidebar-avatar::after {
    bottom: 6px;
    width: 16.8px;
    height: 16.8px
}

.app-chat .app-chat-contacts {
    position: absolute;
    left: calc(-21rem - 1rem);
    height: calc(100vh - 10.9rem);
    width: 21rem;
    flex-basis: 21rem;
    transition: all .25s ease
}

.layout-navbar-hidden .app-chat .app-chat-contacts {
    height: calc(100vh - 6.5rem)
}

@media(min-width: 1200px) {
    .layout-horizontal .app-chat .app-chat-contacts {
        height:calc(100vh - 10.9rem - 3rem)
    }
}

@media(min-width: 992px) {
    .app-chat .app-chat-contacts {
        position:static
    }
}

.app-chat .app-chat-contacts.show {
    left: 0rem
}

.app-chat .app-chat-contacts .sidebar-body {
    height: calc(calc(100vh - 10.9rem) - 4.7rem)
}

.layout-navbar-hidden .app-chat .app-chat-contacts .sidebar-body {
    height: calc(calc(100vh - 6.5rem) - 4.7rem)
}

@media(min-width: 1200px) {
    .layout-horizontal .app-chat .app-chat-contacts .sidebar-body {
        height:calc(calc(100vh - 10.9rem) - 4.7rem - 3rem)
    }
}

.app-chat .app-chat-contacts .sidebar-body .chat-contact-list li.chat-contact-list-item {
    display: flex;
    justify-content: space-between;
    border-radius: .375rem;
    padding: .528rem .75rem;
    margin: .25rem .75rem;
    cursor: pointer
}

.chat-message-text a {
    text-decoration: underline;
    /* color: #0d6efd; */
}

.app-chat .app-chat-contacts .sidebar-body .chat-contact-list li.chat-contact-list-item a {
    width: 100%
}

.app-chat .app-chat-contacts .sidebar-body .chat-contact-list li.chat-contact-list-item .chat-contact-info {
    min-width: 0
}

.app-chat .app-chat-contacts .sidebar-body .chat-contact-list li.chat-contact-list-item .chat-contact-info .chat-contact-name {
    line-height: 1.5
}

.app-chat .app-chat-contacts .sidebar-body .chat-contact-list li.chat-contact-list-item small {
    white-space: nowrap
}

.app-chat .app-chat-contacts .sidebar-body .chat-contact-list li.chat-contact-list-item-title {
    padding: .528rem 1.056rem .264rem
}

.app-chat .app-chat-sidebar-left {
    position: absolute;
    top: 0;
    left: calc(-21rem - 1rem);
    width: 21rem;
    height: calc(100vh - 10.9rem);
    opacity: 0;
    z-index: 5;
    transition: all .25s ease
}

.layout-navbar-hidden .app-chat .app-chat-sidebar-left {
    height: calc(100vh - 6.5rem)
}

@media(min-width: 1200px) {
    .layout-horizontal .app-chat .app-chat-sidebar-left {
        height:calc(100vh - 10.9rem - 3rem)
    }
}

.app-chat .app-chat-sidebar-left.show {
    left: 0;
    opacity: 1
}

.app-chat .app-chat-sidebar-left .sidebar-body {
    height: calc(calc(100vh - 10.9rem) - 12.5rem)
}

.layout-navbar-hidden .app-chat .app-chat-sidebar-left .sidebar-body {
    height: calc(calc(100vh - 6.5rem) - 12.5rem)
}

@media(min-width: 1200px) {
    .layout-horizontal .app-chat .app-chat-sidebar-left .sidebar-body {
        height:calc(calc(100vh - 10.9rem) - 12.3rem - 3rem)
    }
}

.app-chat .app-chat-history {
    position: relative;
    height: calc(100vh - 10.9rem);
    transition: all .25s ease
}

.layout-navbar-hidden .app-chat .app-chat-history {
    height: calc(100vh - 6.5rem)
}

@media(min-width: 1200px) {
    .layout-horizontal .app-chat .app-chat-history {
        height:calc(100vh - 10.9rem - 3rem)
    }
}

.app-chat .app-chat-history .chat-history-header {
    padding: 1.015rem 1.5rem;
    margin-top: -1px
}

.app-chat .app-chat-history .chat-history-body {
    height: calc(100vh - 22rem);
    padding: 1.5rem 1.5rem;
    overflow: hidden
}

@media (max-width: 767.98px) { /* Mobile screens */
    .app-chat .app-chat-history .chat-history-body {
        padding: 1.5rem 0rem; /* Remove padding on small screens */
    }
}

.layout-navbar-hidden .app-chat .app-chat-history .chat-history-body {
    height: calc(100vh - 17.6rem)
}

@media(min-width: 1200px) {
    .layout-horizontal .app-chat .app-chat-history .chat-history-body {
        height:calc(100vh - 22rem - 3rem)
    }
}

.app-chat .app-chat-history .chat-history-body .chat-history .chat-message {
    display: flex;
    justify-content: flex-start
}

.app-chat .app-chat-history .chat-history-body .chat-history .chat-message .chat-message-text {
    border-radius: .375rem;
    padding: .543rem 1rem
}

.app-chat .app-chat-history .chat-history-body .chat-history .chat-message.chat-message-right {
    justify-content: flex-end
}

.app-chat .app-chat-history .chat-history-body .chat-history .chat-message.chat-message-right .chat-message-text {
    border-top-right-radius: 0
}

.app-chat .app-chat-history .chat-history-body .chat-history .chat-message.chat-message-right .user-avatar {
    margin-right: 0rem;
    margin-left: 1rem
}

.app-chat .app-chat-history .chat-history-body .chat-history .chat-message:not(.chat-message-right) .chat-message-text {
    border-top-left-radius: 0
}

.app-chat .app-chat-history .chat-history-body .chat-history .chat-message .thumbnail {
    cursor: zoom-in
}

.app-chat .app-chat-history .chat-history-body .chat-history .chat-message:not(:last-child) {
    margin-bottom: 0rem
}

.app-chat .app-chat-history .chat-history-footer {
    padding: .5rem;
    padding-inline-start:2px;margin: 1.5rem;
    border-radius: .375rem
}

.app-chat .app-chat-history .chat-history-footer .form-control.message-input {
    padding: calc(.426rem - var(--bs-border-width)) calc(.9375rem - var(--bs-border-width))
}

.app-chat .app-chat-sidebar-right {
    position: absolute;
    top: 0;
    right: calc(-21rem - 1rem);
    width: 21rem;
    height: calc(100vh - 10.9rem);
    opacity: 0;
    z-index: 5;
    transition: all .25s ease
}

.layout-navbar-hidden .app-chat .app-chat-sidebar-right {
    height: calc(100vh - 6.5rem)
}

@media(min-width: 1200px) {
    .layout-horizontal .app-chat .app-chat-sidebar-right {
        height:calc(100vh - 10.9rem - 3rem)
    }
}

.app-chat .app-chat-sidebar-right.show {
    opacity: 1;
    right: 0
}

.app-chat .app-chat-sidebar-right .sidebar-body {
    height: calc(calc(100vh - 10.9rem) - 12.3rem)
}

.layout-navbar-hidden .app-chat .app-chat-sidebar-right .sidebar-body {
    height: calc(calc(100vh - 6.5rem) - 12.3rem)
}

@media(min-width: 1200px) {
    .layout-horizontal .app-chat .app-chat-sidebar-right .sidebar-body {
        height:calc(calc(100vh - 10.9rem) - 11.1rem - 3rem)
    }
}

@media(max-width: 576px) {
    .app-chat .app-chat-sidebar-right.show,.app-chat .app-chat-sidebar-left.show,.app-chat .app-chat-contacts.show {
        width:100%
    }
}

.light-style .app-chat .app-sidebar .sidebar-header .chat-sidebar-avatar::after {
    box-shadow: 0 0 0 4px #fff
}

.light-style .app-chat .app-chat-contacts,.light-style .app-chat .app-chat-sidebar-left {
    background-color: #fff
}

.light-style .app-chat .app-chat-contacts .chat-actions .chat-search-input,.light-style .app-chat .app-chat-sidebar-left .chat-actions .chat-search-input {
    background-color: #f8f7fa
}

.light-style .app-chat .app-chat-contacts .sidebar-body .chat-contact-list li.active,.light-style .app-chat .app-chat-sidebar-left .sidebar-body .chat-contact-list li.active {
    color: #fff;
    box-shadow: 0px 2px 6px 0px rgba(115,103,240,.3)
}

.light-style .app-chat .app-chat-contacts .sidebar-body .chat-contact-list li.active h6,.light-style .app-chat .app-chat-contacts .sidebar-body .chat-contact-list li.active .text-muted,.light-style .app-chat .app-chat-sidebar-left .sidebar-body .chat-contact-list li.active h6,.light-style .app-chat .app-chat-sidebar-left .sidebar-body .chat-contact-list li.active .text-muted {
    color: #fff !important
}

.light-style .app-chat .app-chat-history {
    background-color: #f3f2f5
}

.light-style .app-chat .app-chat-history .chat-history-wrapper {
    background-color: #f3f2f5
}

.light-style .app-chat .app-chat-history .chat-history-header,.light-style .app-chat .app-chat-history .chat-history-footer {
    background-color: #fff
}

.light-style .app-chat .app-chat-history .chat-history-body .chat-history .chat-message .chat-message-text {
    background-color: #fff;
    box-shadow: 0 .0625rem .375rem 0 rgba(47,43,61,.1)
}

.light-style .app-chat .app-chat-history .chat-history-body .chat-history .chat-message.chat-message-right {
    justify-content: flex-end
}

.light-style .app-chat .app-chat-history .chat-history-body .chat-history .chat-message.chat-message-right .chat-message-text {
    color: #fff
}

.light-style .app-chat .app-chat-sidebar-right {
    background-color: #fff;
    box-shadow: 16px 1px 45px 3px rgba(47,43,61,.5)
}

@media(max-width: 992px) {
    .light-style .app-chat .app-chat-contacts .chat-actions .chat-search-input {
        background-color:#fff
    }
}

.dark-style .app-chat .app-sidebar .sidebar-header .chat-sidebar-avatar::after {
    box-shadow: 0 0 0 4px #2f3349
}

.dark-style .app-chat .app-chat-contacts,.dark-style .app-chat .app-chat-sidebar-left {
    background-color: #2f3349
}

.dark-style .app-chat .app-chat-contacts .chat-actions .chat-search-input,.dark-style .app-chat .app-chat-sidebar-left .chat-actions .chat-search-input {
    background-color: #25293c
}

.dark-style .app-chat .app-chat-contacts .sidebar-body .chat-contact-list li.active,.dark-style .app-chat .app-chat-sidebar-left .sidebar-body .chat-contact-list li.active {
    color: #fff;
    box-shadow: 0px 2px 6px 0px rgba(115,103,240,.3)
}

.dark-style .app-chat .app-chat-contacts .sidebar-body .chat-contact-list li.active h6,.dark-style .app-chat .app-chat-contacts .sidebar-body .chat-contact-list li.active .text-muted,.dark-style .app-chat .app-chat-sidebar-left .sidebar-body .chat-contact-list li.active h6,.dark-style .app-chat .app-chat-sidebar-left .sidebar-body .chat-contact-list li.active .text-muted {
    color: #fff !important
}

.dark-style .app-chat .app-chat-history {
    background-color: #202534
}

.dark-style .app-chat .app-chat-history .chat-history-wrapper {
    background-color: #202534
}

.dark-style .app-chat .app-chat-history .chat-history-header,.dark-style .app-chat .app-chat-history .chat-history-footer {
    background-color: #2f3349
}

.dark-style .app-chat .app-chat-history .chat-history-body .chat-history .chat-message .chat-message-text {
    background-color: #2f3349;
    box-shadow: 0 .0625rem .375rem 0 rgba(19,17,32,.16)
}

.dark-style .app-chat .app-chat-history .chat-history-body .chat-history .chat-message.chat-message-right {
    justify-content: flex-end
}

.dark-style .app-chat .app-chat-history .chat-history-body .chat-history .chat-message.chat-message-right .chat-message-text {
    color: #fff
}

.dark-style .app-chat .app-chat-sidebar-right {
    background-color: #2f3349
}

/* Thinking shiny sweep */
.shiny {
  display: inline-block;
  color: transparent;
  background: linear-gradient(135deg, #6c757d, #d2d4d8, #6c757d);
  background-size: 200% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: text-shimmer 3s linear infinite;
}

.dark-style .shiny {
  background: linear-gradient(135deg, #6c757d, #d2d4d8, #6c757d);
  background-size: 200% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

@keyframes text-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.tool-icon-animation {
  animation: fade 1s linear infinite;
}

@keyframes fade {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

[dir=rtl] .app-chat .app-chat-sidebar-left,[dir=rtl] .app-chat .app-chat-contacts {
    right: calc(-21rem - 1rem);
    left: auto
}

[dir=rtl] .app-chat .app-chat-sidebar-left.show,[dir=rtl] .app-chat .app-chat-contacts.show {
    left: auto;
    right: 0
}

[dir=rtl] .app-chat .app-chat-sidebar-right {
    left: calc(-21rem - 1rem);
    right: auto
}

[dir=rtl] .app-chat .app-chat-sidebar-right.show {
    left: 0;
    right: auto
}

[dir=rtl] .app-chat .app-chat-history .chat-history-body .chat-history .chat .user-avatar {
    margin-left: 1rem;
    margin-right: 0
}

[dir=rtl] .app-chat .app-chat-history .chat-message:not(.chat-message-right) .chat-message-text {
    border-top-right-radius: 0 !important;
    border-top-left-radius: .375rem !important
}

[dir=rtl] .app-chat .app-chat-history .chat-message.chat-message-right .chat-message-text {
    border-top-left-radius: 0 !important;
    border-top-right-radius: .375rem !important
}



#toolInfoModal h1 {
    font-size: 1.5em; /* Reduced size for h1 elements inside the toolInfoModal */
}

.scroll-bottom-btn {
    transition: opacity 0.3s ease-in-out;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.dark-style .scroll-bottom-btn {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.chat-history-wrapper .chat-history-footer {
    margin-top: 0px;
    box-shadow: 0 1px 3px rgba(0.2, 0.2, 0.2, 0.2), 0 -1px 3px rgba(0.2, 0.2, 0.2, 0.2);
}

.dark-style .chat-history-wrapper .chat-history-footer {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 -1px 3px rgba(0, 0, 0, 0.3);
}

.chat-history-wrapper .chat-history-footer {
    margin-top: 0px;
    box-shadow: 0 1px 3px rgba(0.2, 0.2, 0.2, 0.2), 0 -1px 3px rgba(0.2, 0.2, 0.2, 0.2)
}

/* File tree styles */
.file-tree { padding-left: 0.25rem; }
.file-tree .file-tree-item { margin: 2px 0; }
.file-tree .file-tree-row { padding: 4px 6px; border-radius: 4px; }
.file-tree .file-tree-row:hover { background: rgba(0,0,0,0.05); }
.dark-style .file-tree .file-tree-row:hover { background: rgba(255,255,255,0.08); }
.file-tree .file-tree-row.active { background: rgba(25,118,210,0.12); }
.file-tree .file-tree-children { border-left: 1px dashed rgba(0,0,0,0.1); }
.dark-style .file-tree .file-tree-children { border-left-color: rgba(255,255,255,0.15); }

.clear-chat-btn {
    margin-right: 1.5rem;
}


.mention-dropdown {
    max-height: 200px;
    overflow-y: auto;
}

.mention-item {
    cursor: pointer;
    padding: 0.5rem 1rem;
}

.mention-item:hover,
.mention-item.active {
    background-color: #53536d;
}

.shimmer-text {
    background: linear-gradient(
        90deg,
        #6c757d 0%,
        #c7cdd3 15%,
        #6c757d 30%,
        #6c757d 100%
    );
    background-size: 200% 100%;
    background-repeat: no-repeat;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #6c757d;
    background-position: 0% center;
}

.dark-style .shimmer-text {
    background: linear-gradient(
        90deg,
        #6c757d 0%,
        #c7cdd3 15%,
        #6c757d 30%,
        #6c757d 100%
    );
    background-size: 200% 100%;
    background-repeat: no-repeat;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #6c757d;
    background-position: 0% center;
}

.thinking-text {
    margin-left: 0.5rem;
    font-size: 0.875rem;
    opacity: 0.8;
    font-style: italic;
}

.thinking-text.shimmer-text {
    opacity: 1;
    font-weight: 500;
}

.thinking-timeout {
    margin-left: 0.5rem;
    font-size: 0.875rem;
    opacity: 0.9;
    font-style: italic;
    /* color: #f39c12; */
    font-weight: 500;
}

.dark-style .thinking-timeout {
    /* color: #f1c40f; */
}

.tool-bubble-wrapper {
    background-color: var(--bs-tertiary-bg) !important;
}

.dark-style .tool-bubble-wrapper {
    background-color: #343a46 !important;
}

/* Enhanced tool visualization styles */
.tool-input-display {
    font-size: 0.75rem;
    max-width: 400px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.tool-input-display small {
    cursor: pointer;
}

.tool-input-display:hover small {
    opacity: 0.8;
    text-decoration: underline;
}

/* Tool bubble with shimmering effect */
.tool-bubble-wrapper.tool-shimmer {
    position: relative;
    overflow: hidden;
    background: var(--bs-tertiary-bg) !important;
}

.dark-style .tool-bubble-wrapper.tool-shimmer {
    background: #343a46 !important;
}

.tool-bubble-wrapper.tool-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: tool-shimmer 2s infinite;
}

.dark-style .tool-bubble-wrapper.tool-shimmer::after {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
}

@keyframes tool-shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Completed tool styling */
.tool-bubble-wrapper:not(.tool-shimmer) {
    transition: all 0.3s ease;
}

.tool-operation-status {
    font-size: 0.875rem;
    font-weight: 500;
}
