/* BOOTSTRAP */
:root {
  --bs-primary: #ff6c2f;
  --bs-primary-rgb: 255, 108, 47;
  --bs-primary-text-emphasis: #a63f14;
  --bs-primary-bg-subtle: #ffe2d5;
  --bs-primary-border-subtle: #ffc2a8;

  --bs-nav-link-color: #ff6c2f;
  --bs-nav-link-hover-color: #cc4f1e;
}

.nav-link.active,
.nav-tabs .nav-link.active {
  color: #ff6c2f;
}

/* END BOOTSTRAP */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.main-frame {
  display: flex;
  flex-direction: row;
  max-height: 100vh;
}

.left-pane {
  display: flex;
  flex-direction: column;
  /* width: 260px; */
  min-width: 260px;
  background-color: #eceff1;
  overflow-y: scroll;
}

.middle-pane {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-top: 10px;
  margin-bottom: 10px;
  gap: 1em;
}


.right-pane {
  display: flex;
  flex-direction: column;
  /* width: 260px; */
  min-width: 360px;
  max-width: 360px;
  background-color: #eceff1;
  overflow-y: scroll;
  overflow-x: hidden;
  align-items: center;
}

.ocr-asset-group-list {
  display: flex;
  flex-direction: column;
  /* width: 260px; */
  /* min-width: 260px; */
  /* background-color: #eceff1; */
  /* overflow-y: scroll; */
  align-items: center;
}

.ocr-asset-group-header {
  /* 17px for scrollbar */
  max-width: calc(270px - 17px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ocr-asset-group {
  display: flex;
  flex-direction: column;
  /* width: 260px; */
  /* min-width: 260px; */
  /* background-color: #eceff1; */
  /* overflow-y: scroll; */
  align-items: center;
}


.ocr-asset {
  /* max-height: 260px; */
  max-width: 260px;
}

.chat-pane {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  height: 100vh;
}

.candidate-document-gallery {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  /* widths taken to match .message-history */
  width: min(768px, calc(100vw - 260px));
  min-width: 300px;
  /* Issue: horizontal scrollbar takes up room when height=auto */
  /* height: 100%; */
  overflow-x: visible;
  overflow-y: hidden;
  min-height: 100px;
  gap: 0.5em;
}

.conversation-history-pane {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  margin-left: 10px;
  margin-top: 10px;
  justify-content: center;
  align-items: center;
}


.message-history {
  display: flex;
  flex-direction: column;
  padding-left: 10px;
  padding-right: 10px;
  padding-top: 1em;
  padding-bottom: 1em;
  height: 100%;
  /* 260px is the left pane width */
  width: min(768px, calc(100vw - 260px));
  min-width: 300px;
  gap: 1em;
  overflow-y: scroll;
  /* Instead of max-width here, the messages have a max-width with padding. */
}

.user-message {
  background-color: #e3f2fd;
  align-self: flex-end;
  /* max-width: 70%; */
  border-radius: 10px;
  /* Width intended to be max 0.7*768px = 537 px*/
  max-width: 537px;
  /* TODO margin approach doesn't work because the max-width effects the 100% and the vh used below. */
  /* Instead, need to put this message into yet another div that has full width. */
  /* R margin pushes message box to the correct location */
  margin-right: max(calc((1vh - 537px)/2), 0px);
  /* L margin ensures overall width s.t. parent scrollbar pushed out to edge of screen */
  margin-left: max(calc((1vh - 537px)/2), 0px);
}

.ai-message {
  background-color: #eceff1;
  max-width: 768px;
  border-radius: 10px;
}

.composer-message-box {
  flex-grow: 1;
  min-height: 75px;
  border-radius: 10px;
  width: 100%;
  padding: 10px;
}

.conversation-history-header {
  display: flex;
  justify-self: center;
}

.conversation {
  display: flex;
  margin: auto;
  /* required for "x" in top-right corner */
  position: relative;
  background-color: #ffffff;
  align-items: center;
  /* Center text in button */
  justify-content: center;
  border-radius: 10px;
  min-height: 50px;
  min-width: 50px;
  /* Add padding for X button */
  padding: 10px 15px 10px 10px;
  cursor: pointer;
}

.create-conversation {
  /* Don't need padding for X to close */
  padding: 10px
}

.conversation:hover {
  background-color: #e7e7e7;
}

.selected-conversation {
  background-color: #e7e7e7;
}

.pending-delete-conversation {
  background-color: #333;
}

/* Set hover to pending-delete-conversation colour */
.pending-delete-conversation:hover {
  background-color: #333;
}

/* 
--- The Close 'X' Button --- 
Generated by google
*/
.close-button {
  position: absolute;
  top: 0px;
  right: 2px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #888;
  z-index: 10;
  /* Ensures it's on top */
  padding: 1px;
  line-height: 1;
  /* transition: color 0.2s ease; */
}

.close-button:hover {
  color: #333;
}

/* BOOTSRAP RESTYLING BY DAVID */


.candidate-documents-panel {
  margin-bottom: 1rem;
}

.candidate-documents-summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.5rem 0;
}

.candidate-documents-summary:hover {
  opacity: 0.85;
}

.table-preview-html {
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid black;
  padding: 4px;
}

.table-preview-html table {
  width: 100% !important;
  max-width: 200% !important;
  table-layout: fixed;
  font-size: 0.5rem;
}

.table-preview-html td,
.table-preview-html th {
  border: 1px solid black;
  padding: 4px 6px;
}


.chat-conversation-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.chat-conversation-text {
  margin-bottom: 0.75rem;
}

.chat-conversation-list .chat-ctext-wrap {
  background: var(--bs-tertiary-bg);
  border-radius: 0 0.5rem 0.5rem 0.5rem;
  display: inline-block;
  padding: 0.5rem 1rem;
  max-width: 750px;
  margin-left: 10px;
}

.chat-conversation-list .chat-ctext-wrap p {
  margin: 0;
}

.chat-conversation-list .odd .chat-conversation-text {
  text-align: right;
}

.chat-conversation-list .odd .chat-ctext-wrap {
  background-color: var(--bs-primary);
  color: #fff;
  border-radius: 0.5rem 0 0.5rem 0.5rem;
  margin-left: 0;
  margin-right: 10px;
}



.form-check-input:checked {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
}

.b-b {
  border-bottom: 1px solid var(--bs-border-color);
}

.b-primary {
  border-color: #ff6c2f !important;
}

.nav-active-primary .nav-tabs {
  border-bottom: 0;
  margin-bottom: -1px;
}

.nav-active-primary .nav-tabs .nav-link {
  color: #6c757d;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
}

.nav-active-primary .nav-tabs .nav-link:hover,
.nav-active-primary .nav-tabs .nav-link:focus {
  color: #ff6c2f;
  border-color: transparent transparent #ff6c2f transparent;
}

.nav-active-primary .nav-tabs .nav-link.active,
.nav-active-primary .nav-tabs .nav-item.show .nav-link {
  color: #ff6c2f;
  background: transparent;
  border: 0;
  border-bottom: 2px solid #ff6c2f;
}

.p-a {
  padding: 1rem;
}

.m-b-md {
  margin-bottom: 1rem;
}

/* END BOOTSRAP RESTYLING BY DAVID */