#chatbot-container {
    z-index: 1050;
    color: #596882;
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    width: 450px;
    height: auto;
    display: flex;
    justify-content: center;
    background-color: #fff;
}


#chatbot-header span{
  filter: brightness(0) invert(1);
}


#chatbot-chat{
  border-bottom-left-radius: 0.25rem;
  border-bottom-right-radius: 0.25rem;
  overflow-y: scroll;
  font-size: 0.785rem;
}

#chatbot-chat #loaderInternal{
  position: fixed;
  left: auto;
  margin-left: 15%;
}


.chatbot-messages {
  padding: 5px 20px;
  margin: 10px;
  border-radius: 0.6rem;
  width: fit-content;
}
.chatbot-messages p {
  margin: 0;
  padding: 0;
}

.chat-collapse-scroll {
  max-height: 220px;
  overflow: auto;
}

.chatbot-received-messages,
.chatbot-form-messages {
  border-top-left-radius: 0rem;
  padding-left: 30px;
  margin-left: 20px;
  background-image: url(/common/web/img/favicon/favicon-32x32.png);
  background-position: 0px 3px;
  background-repeat: no-repeat;
  background-size: 20px;

}

.chatbot-sent-messages {
  background-color: #f4f5f8; 
  margin-right: 0;
  padding-left: 40px;
  position: relative;
  padding: 10px 20px;
  padding-left: 40px;
  margin-right: 10px;
}

.chatbot-sent-messages::before {
  color: #feb272;
  font-family: 'Material Design Icons', serif;
  content: "\F0B55";
  font-size: 22px;
  left: 10px;
  top: 8px;
  position: absolute;
  line-height: normal;
}

#chatbot-input-container{
  width: calc(100% - 115px);
  margin-left: 10px;
}

#chatbot-input {
  width: calc(100% - 10px);
  padding: 8px;
  color: #596882;
  border-radius: 0.25rem;
  outline: none;
  resize: none;
}

#chat_splitter .jqx-fill-state-normal {
  border-top: 1px solid #e2e5ed;
  border-bottom: 1px solid #fafbfc;
  background: #fafbfc;
  border-bottom-color: #fafbfc !important;
  
}

#chat_splitter .jqx-fill-state-normal::before {
  color: #cccfd7;
  font-family: 'Material Design Icons', serif;
  content: "\F01D8";
  font-size: 18px;
  left: 50%;
  top: -9px;
  position: absolute;
  line-height: normal;
  z-index: 10;
}

#chat_splitter .jqx-splitter-collapse-button-horizontal {
  display: none;
}

#chatbot-input:focus {
  outline-offset: 0px !important;
  outline: none !important;
  border: 0.1rem solid #c0ccda;
  /*box-shadow: 0 0 5px #FDB931 !important;*/
}

#chatbot-new-message-send-button{
  cursor: pointer;
}

#send-icon {
  color: #0d6efd;
  font-size: 30px;
  line-height: 30px;
}

#chatbot-open-container {
    position: fixed;
    bottom: 10px;
    right: 5px;
    background: #0d6efd;
    padding: 1rem;
    border-radius: 50%;
    width: 2.8rem;
    height: 2.8rem;
    text-align: center;
    cursor: pointer;
    z-index: 9991;
}

#chatbot-open-container i {
    margin: 0px -10px 0px -10px;
    font-size: 20px;
    color: #fff;
    line-height: 0;
}

.typing_loader {
  text-align: left;
  background: #f4f5f8;
  border-top-left-radius: 0rem !important;
  border-radius: 1rem;
  border: 1px solid #c0ccda;
  padding: 3px 15px 3px 15px;
  max-width: max-content;
}
.typing_loader span {
  display: inline-block;
  vertical-align: middle;
  width: 15px;
  height: 15px;
  background: #596882;
  border-radius: 20px;
  animation: typing_loader 0.8s infinite alternate;
}
.typing_loader span:nth-of-type(2) {
  animation-delay: 0.2s;
}
.typing_loader span:nth-of-type(3) {
  animation-delay: 0.6s;
}

/* Mic button animation start */
.btn-mic {
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  
}
.btn-mic:hover {
  background-color: #e5e8f0;
  border: 1px solid #c3c5cd;
  cursor: pointer;
}
.btn-mic.mic-active {
  background-color: #10b759;
  border: 1px solid #10b759;
  color: white;
  transition: background-color 0.25s;

}

.btn-mic.mic-active::before {
  animation: listening 1.3s infinite;
}


@keyframes listening {
  from {
    opacity: 0.1;
  }
  to {
    transform: scale(1.2);
    opacity: 1;
  }
}
/* Mic button animation end */


/* Mobile chat UI start*/
@media (max-width:575.98px) {
  #chatbot-container {
    left: 0;
    width: 100%;
  }
}
@media (max-width:575.98px) {
#chatbot-interface {
    width: 100%;
  }
}
/* Mobile chat UI end*/

@keyframes typing_loader {
  0% {
    opacity: 0.9;
    transform: scale(0.5);
  }
  100% {
    opacity: 0.1;
    transform: scale(1);
  }
}

@media (min-width:576px) {
  #chatbot-container .ui-resizable-w::before {
    color: #cccfd7;
    font-family: 'Material Design Icons', serif;
    content: "\F01D9";
    font-size: 20px;
    line-height: 0;
    position: absolute;
    top: 50%;
    left: -5px;
    cursor: col-resize;
  }

  #chatbot-container.ui-resizable-resizing .ui-resizable-w::before,
  #chatbot-container.ui-resizable-resizing .ui-resizable-n::before  {
    color: #1eaf6b;
  }

  #chatbot-container.ui-resizable-resizing #chatbot-interface {
    border-left: 1px solid #1eaf6b !important;
  }

  #chatbot-container .ui-resizable-n::before {
    color: #d9d9d9;
    font-family: 'Material Design Icons', serif;
    content: "\F01D8";
    font-size: 20px;
    line-height: 0;
    position: absolute;
    left: 50%;
    top: 5px;
  }
  #chatbot-container.ui-resizable-resizing #chatbot-footer {
    border-left: 1px solid #1eaf6b !important;
  }
  #chatbot-footer {
    background-color: #fafbfc !important;
  }
  .ui-resizable-n {
    cursor: row-resize;
    /* bottom: 0 !important; */
  }
}

.show_tbl.mdi-table-eye,
.show_sug_tbl.mdi-table-large-remove {
  color: #fff;
  background-color: #0168fa;
}

/* ------------------------------------------------------------------------
   Chatbot tabular forms (Select Input Table, FACT Join score table, etc.)
   Rendered by DynamicForm into .chatbot-messages > form > table.table.
   Goal: lift the default Bootstrap look to something production-grade.
   ------------------------------------------------------------------------ */
/* Bubble override: the default .chatbot-messages uses width:fit-content,
   so a wide table makes the bubble grow past the 450px chat panel and
   nothing scrolls. When the bubble contains a form table, pin it to the
   panel's content width so the inner form's overflow-x:auto kicks in. */
.chatbot-messages:has(form .table) {
  width: calc(100% - 30px);
  max-width: calc(100% - 30px);
  box-sizing: border-box;
}
.chatbot-messages form .table {
  font-size: 0.75rem;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06),
              0 1px 2px rgba(15, 23, 42, 0.04);
  margin-bottom: 6px;
  border-collapse: separate;
  border-spacing: 0;
  /* No max-width — the chat panel is only ~450px and 3 columns squeezed
     under that produces single-word vertical wrapping. Let the table
     take its natural width and the wrapping form scroll horizontally
     (overflow-x: auto on .chatbot-form-messages form). */
  width: max-content;
  min-width: 100%;
}
.chatbot-messages form .table thead th {
  background: #f8f9fc;
  font-weight: 600;
  color: #596882;
  border: 0;
  border-bottom: 1px solid #e2e5ed;
  padding: 7px 10px;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.45px;
  white-space: nowrap;
}
.chatbot-messages form .table tbody td {
  padding: 8px 10px;
  vertical-align: middle;
  border: 0;
  border-top: 1px solid #f1f3f7;
  color: #34495e;
  /* Wrap on word boundaries, not mid-word. break-word fragments long
     descriptions like "associated wit / tickets, includi" — overflow-wrap
     keeps whole words together and only breaks if a single word is too
     long for the column. */
  overflow-wrap: anywhere;
  word-break: normal;
}
/* Per-column width hints — keeps datasource name on a couple of lines,
   table name on one line (set via .form-check-label nowrap), and gives
   description enough room to wrap on word boundaries. */
.chatbot-messages form .table tbody td:nth-child(1),
.chatbot-messages form .table thead th:nth-child(1) {
  min-width: 110px;
  max-width: 150px;
}
.chatbot-messages form .table tbody td:nth-child(2),
.chatbot-messages form .table thead th:nth-child(2) {
  white-space: nowrap;
}
.chatbot-messages form .table tbody td:nth-child(3),
.chatbot-messages form .table thead th:nth-child(3) {
  min-width: 180px;
  max-width: 280px;
}
.chatbot-messages form .table tbody tr:first-child td {
  border-top: 0;
}
.chatbot-messages form .table tbody tr:hover td {
  background: #fafbff;
}
.chatbot-messages form .table tbody td > div {
  margin: 0;
}
.chatbot-messages form .table tbody td label {
  margin: 0;
  color: #4a5876;
  line-height: 1.35;
  font-weight: 400;
}
/* Checkbox cell — the "Table" column on Select Input Table */
.chatbot-messages form .table .form-check {
  margin: 0;
  padding-left: 1.4rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.chatbot-messages form .table .form-check-input {
  margin-top: 0;
  margin-left: -1.4rem;
}
.chatbot-messages form .table .form-check-label {
  font-weight: 500;
  color: #1c2c4c;
  cursor: pointer;
  white-space: nowrap;
}
/* Datasource cell — first column on Select Input Table */
.chatbot-messages form .table tbody td:first-child label {
  font-size: 0.7rem;
  color: #707b94;
}
/* Score pill — FACT join confidence column */
.chatbot-messages form .table .join-score label {
  display: inline-block;
  background: #eef3ff;
  color: #2c5cd9;
  padding: 2px 9px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.68rem;
  min-width: 44px;
  text-align: center;
}
/* Submit-button row (always last in the tabular forms) */
.chatbot-messages form .table tbody tr:last-child td {
  background: #fafbfc;
  border-top: 1px solid #e2e5ed;
  padding: 8px 10px;
}
.chatbot-messages form .bot-gen-etl-source,
.chatbot-messages form .bot-gen-join-confirm {
  background: #0168fa;
  color: #fff;
  border: 0;
  border-radius: 4px;
  padding: 5px 16px;
  font-weight: 500;
  font-size: 0.72rem;
  box-shadow: 0 1px 2px rgba(1, 104, 250, 0.25);
  transition: background 0.15s ease;
}
.chatbot-messages form .bot-gen-etl-source:hover,
.chatbot-messages form .bot-gen-join-confirm:hover {
  background: #0156d6;
}
.chatbot-messages form .bot-gen-etl-source:disabled,
.chatbot-messages form .bot-gen-join-confirm:disabled {
  background: #b0c0d9;
  cursor: not-allowed;
  box-shadow: none;
}
/* Form caption ("Select Input Table", "Review and Configure Join Mappings") */
.chatbot-messages > form {
  margin: 0;
}
/* The form-msg + <br> sits as a text node just before the <form>; style it
   via the wrapper. Also expand width so the table doesn't overflow the
   bubble's width:fit-content default. */
.chatbot-form-messages {
  background-color: transparent;
  width: calc(100% - 50px);
  max-width: 100%;
}
.chatbot-form-messages form {
  max-width: 100%;
  overflow-x: auto;
}

/* Brief warning flash for the chatbot form table when the user clicks
   Submit without selecting any row. Drawn on the .table by the
   .bot-gen-etl-source click handler in etl-bot-event.js. */
.chatbot-messages form .table.dm-form-invalid {
  animation: dm-form-shake 0.4s ease-in-out 0s 2;
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.55),
              0 1px 3px rgba(220, 53, 69, 0.25);
}
@keyframes dm-form-shake {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-4px); }
  75%      { transform: translateX(4px); }
}

/* DynamicForm.createButton hardcodes "btn bg-gray-50" on every button. For
   .btn-success that leaves white text on a gray background — the "Yes"
   button in the partial-selection confirmation looks empty. Re-apply
   readable colours for the variants used in chat bubbles. */
.chatbot-messages form .btn-success {
  background-color: #28a745 !important;
  border-color: #28a745;
  color: #fff !important;
}
.chatbot-messages form .btn-success:hover {
  background-color: #218838 !important;
  border-color: #1e7e34;
}
.chatbot-messages form .btn-success:disabled {
  background-color: #94d3a3 !important;
  border-color: #94d3a3;
  color: #fff !important;
}
.chatbot-messages form .btn-light {
  background-color: #f8f9fa !important;
  border-color: #ced4da;
  color: #495057 !important;
}
.chatbot-messages form .btn-light:hover {
  background-color: #e2e6ea !important;
  border-color: #adb5bd;
}
.chatbot-messages form .btn-danger {
  background-color: #dc3545 !important;
  border-color: #dc3545;
  color: #fff !important;
}
.chatbot-messages form .btn-danger:hover {
  background-color: #c82333 !important;
  border-color: #bd2130;
}

/* Asset / Data Product use-case cards in the bot panel.
 * Replaces inline `style="width:375px"` / `style="width:350px"` /
 * `style="max-width:300px"` which CSP `style-src 'self'` was stripping. */
.use_case_card {
  width: 375px;
}
.use_case_card.use_case_card--narrow {
  width: 350px;
}
.use_case_text-truncate-300 {
  max-width: 300px;
}