.chat-menu-wrapper {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.chat-menu-container {
  position: absolute;
  width: 100vw;
  background-color: #ffff;
  border-left-width: 1px;
  border-right-width: 1px;
  border: 0;
  border-radius: 0.25rem;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  z-index: 20;
  height: 100vh;
  max-height: 100vh;
  position: fixed;
}

.resize-handle {
  display: none;
  height: 100vh;
  cursor: ew-resize;
  background-color: transparent;
  width: 2rem;
  user-select: none;
  z-index: 50;
}

.chat-menu-msg-container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100vh;
  max-height: 100vh;
}

.chat-msg-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid #e5e7eb;
  background-color: #ffff;
  position: sticky;
  top: 0;
  z-index: 50;
}

.chat-msg-title-container {
  vertical-align: middle;
  margin-top: auto;
  margin-bottom: auto;
  margin-right: 0.5rem;
  margin-left: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.75rem;
}

.chat-msg-title {
  font-size: 1rem;
  line-height: 1.5rem;
}

.command-options-container {
  display: flex;
}

.toggle-container {
  display: none;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 24px;
  margin: auto;
}

.stream-text {
  margin: auto 0.5rem;
}

.toggle-input {
  display: none;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.1s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.1s;
  border-radius: 50%;
}

.toggle-input:checked + .slider {
  background-color: #0175c9;
}

.toggle-input:checked + .slider:before {
  transform: translateX(16px);
}

.chat-control-button {
  margin: 0.5rem;
  right: 0;
  font-weight: 500;
  border-radius: 9999px;
  font-size: 0.875rem;
  line-height: 1.25rem;
  padding: 0.375rem;
}

.close-chat-control-button {
  color: #ffff;
  background-color: #0175c9;
  margin: 0.5rem;
  right: 0;
  font-weight: 500;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  width: 2.5rem;
  height: 2.5rem;
}

.close-chat-control-button:hover {
  background-color: #0261a6;
}

.chat-page-wrapper {
  flex-grow: 1;
  display: flex;
  flex: 1 1 0%;
  flex-direction: column-reverse;
}

.chat-msg-inbox {
  overflow-y: auto;
}

.chat-msg-container {
  display: flex;
  flex-direction: column;
}

.user-message-form {
  position: sticky;
  bottom: 0;
}

.user-message-bottom-wrapper {
  width: 100%;
  display: flex;
  bottom: 0;
  border-top: 2px solid #e5e7eb;
  z-index: 30;
  background-color: #ffff;
}

.user-message-text-area-wrapper {
  width: 100%;
  margin: 0.5rem 0.25rem;
  display: flex;
}

.user-chat-text-area {
  width: 100%;
  resize: none;
  border-radius: 0.5rem;
  padding: 0.25rem;
  margin: auto;
  align-self: center;
  border-color: rgb(209 213 219);
  height: 4rem;
}

.send-message-button-wrapper {
  margin: 0rem 0.25rem;
  display: flex;
}

.send-message-button {
  color: #ffff;
  background-color: rgb(156 163 175);
  font-weight: 500;
  border-radius: 9999px;
  font-size: 0.875rem;
  line-height: 1.25rem;
  padding: 0.625rem 1.25rem;
  text-align: center;
  margin: auto;
  align-self: center;
}

.chat-button-container {
  height: 100vh;
}

.chat-button-wrapper {
  margin: 1rem;
  bottom: 0;
  right: 0;
  position: fixed;
  z-index: auto;
}

.open-chat-button {
  color: #ffff;
  background-color: #0175c9;
  font-weight: 500;
  border-radius: 9999px;
  font-size: 1rem;
  line-height: 1.5rem;
  padding: 0.875rem 2rem;
  text-align: center;
}

.open-chat-button:hover {
  background-color: #0261a6;
}

.modal-window-class {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  width: 100%;
  padding: 1rem;
  overflow-x: hidden;
  overflow-y: auto;
  height: calc(100%-1rem);
  max-height: 100%;
}

.background-gray {
  background-color: rgb(156 163 175);
}

.background-lime {
  background-color: rgb(101 163 13);
}

.background-lime:hover {
  background-color: rgb(77 124 15);
}

.flex-row-right {
  flex-direction: row-reverse;
  justify-content: start;
}

.flex-row-left {
  flex-direction: row;
}

.justify-side-right {
  justify-content: end;
}

.justify-side-left {
  justify-content: start;
}

.background-color-right {
  background-color: #0175c9;
}

.background-color-left {
  background-color: rgb(209 213 219);
}

.text-color-right {
  color: #ffff;
}

.text-color-left {
  color: #000;
}

.margin-side-right {
  margin-left: 5rem;
}

.margin-side-left {
  margin-right: 5rem;
}

.msg-bubble-container {
  display: flex;
  padding: 0.5rem;
}

.msg-img {
  border-radius: 9999px;
  border: 1px solid #d9d9d9;
  margin: auto 0.5rem;
}

.msg-bubble {
  width: 100%;
  position: relative;
  flex: 1 1 0%;
}

.msg-text {
  font-size: 14px;
  line-height: 1.15rem;
}

.msg-info-wrapper {
  display: flex;
  margin: 0.125rem 0.5rem;
}

.msg-container {
  display: flex;
}

.msg-content {
  padding: 0.375rem;
  border-radius: 0.5rem;
  max-width: 100%;
}

.cited-sources {
  display: flex;
  flex-wrap: wrap;
}

.msg-info-time {
  display: flex;
  margin: 0.25rem 0.5rem;
}

.system-msg-bubble-wrapper {
  display: flex;
  margin: 0.5rem;
  cursor: pointer;
}

.system-msg-bubble {
  width: 100%;
}

.system-msg-container {
  display: flex;
}

.system-msg-content {
  background-color: rgb(156 163 175);
  padding: 0.375rem;
  border-radius: 0.5rem;
}

.system-msg-content:hover {
  background-color: rgb(107 114 128);
}

.cited-source-a-tag {
  margin-right: 0.5rem;
  margin: 0.15rem 0.25rem;
  background-color: rgb(156 163 175);
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  text-wrap: wrap;
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: pre-wrap;
}

.cited-source-a-tag:hover {
  text-decoration-line: underline;
  cursor: pointer;
}

.citation-margin-top {
  margin-top: 1rem;
}

.citation-source-span-tag {
  font-weight: 700;
  margin-right: 0.375rem;
  margin: auto 0;
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 42rem;
  max-height: 100%;
}

.modal-header-wrapper {
  position: relative;
  background-color: #ffff;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.modal-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  padding: 2rem;
  border-bottom: 1px;
  border-top-left-radius: 0.25rem;
  border-top-right-radius: 0.25rem;
}

.cited-source-modal-title {
  font-size: 1.25rem;
  line-height: 1.75rem;
  font-weight: 600;
  color: rgb(17 24 39);
}

.close-modal-button {
  color: rgb(156 163 175);
  background-color: transparent;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  padding: 0.375rem;
  margin-left: auto;
  display: flex;
  align-items: center;
}

.close-modal-button:hover {
  background-color: rgb(229 231 235);
  color: rgb(17 24 39);
}

.disclaimer-text {
  text-align: center;
  color: #777;
  margin: 0;
}

.display-none {
  display: none;
}

@media (min-width: 640px) {
  .chat-msg-title-container {
    margin-right: 0.5rem;
    margin-left: 0.5rem;
  }

  .toggle-container {
    display: flex;
  }
}

@media (min-width: 768px) {
  .chat-page-wrapper {
    overflow-y: hidden;
    margin-bottom: 0;
  }

  .modal-window {
    inset: 0;
  }
}

@media (min-width: 1280px) {
  .chat-menu-container {
    width: 100%;
    right: 0;
    border-left: 2px solid #e5e7eb;
  }

  .user-message-form {
    position: relative;
  }

  .resize-handle {
    display: block;
    position: absolute;
  }
}

@media (min-width: 2560px) {
  .chat-msg-title {
    font-size: 1.25rem;
    line-height: 1.75rem;
  }

  .msg-info-name {
    font-size: 1.125rem;
    line-height: 1.75rem;
  }

  .msg-text {
    font-size: 1.25rem;
    line-height: 1.75rem; 
  }

  .msg-prompt-user-section {
    font-size: 1.25rem;
    line-height: 1.75rem;
  }

  .cited-sources {
    font-size: 1.25rem;
    line-height: 1.75rem;
  }

  .msg-info-time {
    font-size: 1.125rem;
    line-height: 1.75rem;
  }
}

.chat-button-text {
  margin: 0;
  padding: 0;
  text-align: center;
  line-height: 0.875rem;
  color: #ffff;
  font-size: 0.75rem;
}
