﻿:root {
  --chat--header--background: var(--bs-primary) !important;
  --chat--body--background: var(--bs-body-bg) !important;
  --chat--message--user--background: var(--bs-light) !important;
  --chat--message--user--color: #000 !important;
  --chat--footer--background: var(--bs-body-bg) !important;
  --chat-width: 720px;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

/* **************************** */
/* Sidemenu */
/* **************************** */

.site-main {
  display: flex;
  flex-grow: 1;
  align-items: stretch;
  flex-direction: column;
  overflow: hidden;
  height: calc(100vh - var(--navHeight) + -1px);
}

.site-footer {
  display: none;
}

.ai-assistant-outer {
  position: relative;
  height: 100%;
  width: 100%;
  display: flex;
  flex: 1;
}

.ai-assistant-outer.container-fluid {
  padding-right: 0 !important;
  padding-left: 0 !important;
}

@media(max-width:576px){
  .ai-assistant-outer {
    padding-right: 0 !important;
    padding-left: 0 !important;
  }
}

.ai-assistant-inner {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: row;
  flex-grow: 1;
}

.ai-assistant-sidemenu {
  background-color: var(--bs-light) !important;
  border-right: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color);
}

@media (max-width: 992px) {
  .ai-assistant-sidemenu {
    max-width: 80%;
  }
}
  

  .ai-assistant-sidemenu .ai-assistant-menu {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    padding: 1rem;
    background-color: var(--bs-light);
    flex-grow: 1;
    overflow-y: auto;
    height: 100%;
  }

@media (min-width: 992px) {
  .ai-assistant-sidemenu .ai-assistant-menu {
    width: 280px;
  }
}

.ps-menu-inner {
  position: sticky;
  top: 1rem;
}

.ai-assistant-sidemenu .nav {
  --bs-nav-link-color: var(--bs-dark);
}

.ai-assistant-sidemenu .nav-pills {
  --bs-nav-pills-link-active-color: var(--bs-dark);
  --bs-nav-pills-link-active-bg: var(--bs-gray-300);
}

.ai-assistant-sidemenu .nav-item {
  position: relative;
  border-radius: var(--bs-border-radius);
}

  .ai-assistant-sidemenu .nav-item .nav-link {
    width: 100%;
    text-align: left;
  }

  .ai-assistant-sidemenu .nav-item:hover .ps-dropdown-options {
    visibility: visible;
  }

.ai-assistant-sidemenu .ps-dropdown-options {
  visibility: hidden;
}

@media(max-width: 992px) {
  .ai-assistant-sidemenu.show .ps-dropdown-options {
    visibility: visible;
  }
}


  .ai-assistant-sidemenu .ps-dropdown-options .dropdown-menu {
    top: -5px !important;
  }

.ai-assistant-sidemenu .nav-item:focus,
.ai-assistant-sidemenu .nav-item:hover {
  background-color: var(--bs-gray-200);
}

.ai-assistant-sidemenu .nav-item .btn-link {
  --bs-btn-color: var(--bs-dark);
}

.ai-assistant-sidemenu .dropdown-toggle::after {
  display: none;
}

/* Fix for chat bg color */
.ai-assistant-outer .ps-sidebar-bg {
  transform: translate(-100%, 0) rotate(0) skewX(0) skewY(0) scaleX(1) scaleY(1);
}
.ai-assistant-outer.container-fluid .ps-sidebar-bg {
  display: none !important;
}

/* **************************** */
/* Chat */
/* **************************** */
.ai-assistant-chat-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  overflow: hidden;
}

.ai-assistant-chat-container {
  position: relative;
  display: flex;
  flex: 1;
  overflow: hidden;
}

  .ai-assistant-chat-container > div {
    position: relative;
    display: flex;
    flex: 1;
    padding-bottom: 100px;
  }

.chat-layout {
  display: flex !important;
  overflow-y: auto;
  flex: 1;
}

/* Header */

/* Hide header */
.ai-assistant-chat-container[data-hide-header] .chat-header {
  display: none !important;
}

.chat-layout .chat-header {
  overflow: hidden !important;
  position: relative !important;
  padding-right: 140px !important;
  gap: 0 !important;
}

    @media (max-width: 768px) {
      .chat-layout .chat-header {
        --chat--heading--font-size: 1em;
      }
    }

    .chat-layout .chat-header:before {
      content: "";
      position: absolute;
      aspect-ratio: 1 / 1;
      height: 100%;
      width: auto;
      max-width: 120px;
      right: 0;
      background: center;
      background-image: var(--profile-image) !important;
      background-size: cover;
      background-repeat: no-repeat !important;
    }

    .chat-layout .chat-header h1,
    .chat-layout .chat-header p {
      margin: 0;
    }


    @media (min-width: 767.98px) {
      .chat-layout .chat-body .chat-messages-list, .chat-layout .chat-footer .chat-input {
    width: 100%;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
  }

}

.chat-footer {
  border: none !important;
  position: absolute;
  bottom: 0;
  right: 0;
  display: flex;
  justify-content: center;
  width: 100%;
  background-color: #fff;
  padding: 0 1rem 1rem 1rem;
}

  .chat-footer .chat-input {
    border: 1px solid var(--bs-gray-600) !important;
    border-radius: 30px !important;
    box-shadow: var(--bs-box-shadow-sm);
    overflow: hidden;
  }

  .chat-footer textarea {
    max-height: 100px !important;
  }

.chat-message-from-bot {
  padding: 0 !important;
}