:root {
  --primary-accent: #254173; /* deep blue */
  --primary-accent-hover: #1e355e; /* darker blue for hover states */
  --secondary-bg: #e5e9f7; /* very light blue background */
  --dark-text: #1c1f4a; /* dark navy for readability */
  --light-text: #7a7f99; /* medium gray for secondary text */
  --bubble-bg: #eefaff; /* light blue-gray */
  --border-color: #bfc4d9; /* light neutral blue-gray for borders */
  --hover-highlight: #a9d8e5; /* light blue for hover states */
  --input-border: #a9d8e5; /* light blue for input borders */
  --white-text: #ffffff; /* white text */
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Open Sans", Arial, sans-serif;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

.body-container {
  display: flex;
  height: 100%;
}
.body-container > div {
  height: 100%;
  overflow: auto;
  display: flex;
  flex-direction: column;
}
#sessions1 {
  flex: 1;
}

#prompts3 {
    height: 100vh; /* Adjust as needed */
    overflow-y: auto;
    overflow-x: hidden;
    width: 345px; /* Adjust width as needed */
    white-space: normal;
    word-wrap: break-word;
}


#chat_box {
  flex: 3;
}
#prompts1 {
  flex: 1;
}

.no-padding {
  padding: 0;
}

a.new-chat-link {
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  border-radius: 5px;
}

.box-header {
  background-color: var(--primary-accent);
  color: var(--white-text);
  padding: 10px;
  position: relative;
  flex: 0 0 auto;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.box-header .fa,
.box-header .glyphicon,
.box-header .ion,
.box-header .box-title,
.box-header button {
  display: inline-block;
  font-size: 18px;
  margin: 0;
  line-height: 1;
}

.sidebar {
  /* background: linear-gradient(
    to bottom,
    var(--secondary-bg) 0%,
    var(--bubble-bg) 100%
  ); */
  border-right: 1px solid var(--border-color);
}

.right-sidebar {
  /* background: linear-gradient(
    to bottom,
    var(--secondary-bg) 0%,
    var(--bubble-bg) 100%
  ); */
  border-left: 1px solid var(--border-color);
}

.box-body {
  flex: 1 1 auto;
  overflow-y: auto;
}

.box-footer {
  flex: 0 0 auto;
}

.box-footer {
  border-top: 1px solid var(--border-color);
  padding: 10px;
}

.direct-chat > .box-footer {
  border-right: 1px solid var(--border-color);
}

.history-item,
.user-history-item {
  width: 100%;
  padding: 10px;
  margin: 5px 0;
  transition: background-color 0.3s ease, transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.history-item:hover,
.user-history-item:hover {
  background-color: var(--hover-highlight);
  cursor: pointer;
  transform: scale(1.05);
}

.history-item .delete-history-btn {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 16px;
  margin-left: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-in-out;
}

.history-item:hover .delete-history-btn {
  opacity: 1;
  pointer-events: auto;
}

.user-history-item.active {
  background-color: var(--hover-highlight);
  font-weight: 600;
}

.user-history-item .session-buttons {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-in-out;
}

.user-history-item:hover .session-buttons {
  opacity: 1;
  pointer-events: auto;
}

.direct-chat-text {
  border-radius: 8px;
  position: relative;
  padding: 8px 12px;
  background-color: var(--bubble-bg);
  border: 1px solid var(--border-color);
  margin: 5px 0 0 50px;
  color: var(--dark-text);
  box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.1);
  font-size: 14px;
  line-height: 1.4;
  transition: all 0.3s ease-in-out;
  /*fix long text overflow */
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  max-width: 100%;
}

.direct-chat-text:hover {
  box-shadow: 3px 6px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px) scale(1.01);

}


.direct-chat-msg,
.direct-chat-text {
  display: block;
}

.direct-chat-text:before {
  border-width: 6px;
  margin-top: -6px;
}

.direct-chat-text:after,
.direct-chat-text:before {
  position: absolute;
  right: 100%;
  top: 10px;
  border: solid transparent;
  border: 1px solid var(--bubble-bg);
  content: " ";
  height: 0;
  width: 0;
  pointer-events: none;
}

.direct-chat-text:after {
  border-width: 5px;
  margin-top: -5px;
}

.direct-chat-text:after,
.direct-chat-text:before {
  position: absolute;
  right: 100%;
  top: 10px;
  border: solid transparent;
  border: 1px solid var(--border-color);
  content: " ";
  height: 0;
  width: 0;
  pointer-events: none;
}

.right .direct-chat-text {
  margin-right: 50px;
  margin-left: 0;
}

.direct-chat-text pre {
  color: var(--dark-text);
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-x: hidden;
  max-width: 100%;
}

.tts-btn {
  border: none;
  background: none;
  color: var(--dark-text);
  margin-right: 15px;
}

.copy-btn {
  border: none;
  background: none;
  color: var(--dark-text);
}

.buttons-container {
  margin-top: 10px;
  display: none;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.action-btn {
  background-color: var(--white-text);
  color: var(--dark-text);
  border: 2px solid var(--border-color);
  border-radius: 50px; /* Makes the button round */
  padding: 0.5rem 1rem; /* Adjust padding for a better shape */
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  font-weight: bold;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
}

.action-btn:hover {
  background-color: var(--hover-highlight);
  color: var(--dark-text);
  border-color: var(--hover-highlight);
  transform: scale(1.05); /* Slightly enlarges the button on hover */
  box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.2);
}

.action-btn i {
  background: none !important; /* Prevents unwanted background */
  color: inherit; /* Ensures it keeps its original color */
  transition: none; /* Prevents any hover effects */
}

.action-btn:hover i {
  background: none !important; /* No background change on hover */
  color: inherit; /* Keeps the original icon color */
}

.btn-default {
  background-color: var(--primary-accent);
  color: var(--white-text);
  border: none;
  border-radius: 4px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.3s ease;
  text-decoration: none;
}

.btn-default:hover {
  background-color: var(--primary-accent-hover);
}

.btn-default:disabled {
  background-color: var(--border-color);
  color: var(--light-text);
  cursor: not-allowed;
}

.btn-new-chat {
  background-color: var(--primary-accent);
  color: var(--white-text);
  border: none;
  border-radius: 50px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.3s ease;
  text-decoration: none;
}

.btn-new-chat:hover {
  background-color: var(--primary-accent-hover);
  color: var(--primary-accent);
}

.input-container {
  display: flex;
  align-items: center;
  background-color: #f5f7fa;
  /* border: 1px solid var(--input-border); */
  border-radius: 4px;
  /* padding: 0.5rem; */
  width: 100%;
  margin: 0 auto;
}

.input-container input[type="text"],
.input-container input[type="search"],
.input-container textarea {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  padding: 0.5rem;
  color: #3c3c3c;
  background-color: transparent;
}

.input-container button {
  background-color: var(--primary-accent);
  color: var(--white-text);
  border: none;
  border-radius: 4px;
  padding: 0.5rem 1rem;

  cursor: pointer;
  transition: background-color 0.3s ease;
}

.input-container button:hover {
  background-color: var(--primary-accent-hover);
  color: var(--primary-accent);
}

.content-section {
  transition: all 0.3s ease;
}

.aitools_div{
  min-height: 100vh !important;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 1rem;
}


.direct-chat-info {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
  font-weight: 600;
}

.direct-chat-name {
  color: var(--dark-text);
}

.direct-chat-timestamp {
  color: var(--light-text);
}

.toggle-btn {
  visibility: hidden;
  background: transparent;
  border: none;
  color: var(--white-text);
}

#scrollToBottomBtn {
  position: absolute;
  bottom: 1rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background-color: var(--primary-accent);
  color: var(--white-text);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  text-align: center;
  line-height: 50px;
  font-size: 20px;
  z-index: 1000;
}

#scrollToBottomBtn:hover {
  background-color: var(--primary-accent-hover);
}

@media (max-width: 768px) {
  #sessions1,
  #prompts1 {
    display: none;
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80%;
    z-index: 10;
    background: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  }
  #sessions1 {
    left: 0;
  }
  #prompts1 {
    right: 0;
  }
  .overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 5;
  }

  .toggle-btn {
    visibility: visible;
    background: transparent;
    border: none;
    color: var(--white-text);
  }
}

.btn_style i {
  font-size: 15px;
  margin-right: 10px;
  background: #a2d7e4;
  color: #253e70;
  border-radius: 20px;
  width: 30px;
  height: 30px;
  text-align: center;
  line-height: 29px;
  -webkit-transition: all 0.5s ease;
  -moz-transition: all 0.5s ease;
  -ms-transition: all 0.5s ease;
  transition: all 0.5s ease;
}

.action-btn:hover i {
  background-color: var(--primary-accent);
  color: #a2d7e4;
}
.left_bg {
  background: #eff3f5;
  border-right: 1px solid var(--border-color);
}
.right_bg {
  background: #f5f7fa;
}
.ai_imoji {
  font-size: 20px;
  margin-right: 10px;
  background: #253e70;
  color: #253e70;
  border-radius: 40px;
  width: 40px;
  height: 40px;
  text-align: center;
  line-height: 29px;
  -webkit-transition: all 0.5s ease;
  -moz-transition: all 0.5s ease;
  -ms-transition: all 0.5s ease;
  transition: all 0.5s ease;
}


/* Additional css */

.hyperlink {
  text-decoration: none;
  color: #f39c12;
  font-style: italic;
}

.hyperlink:hover {
  color: #f39c12 !important;
  text-decoration: underline !important;
  font-style: italic !important;
}

.load-gif {
  text-align: center;
}

.load-gif img {
  height: 75px;
  width: 100px;
}

.form-control.message_content {
  flex: 1;
  border: none;
  outline: none;
  padding: 5px;
  font-size: 16px;
  margin: 0 5px;
}

.back_button {
  display: inline-block;
  padding: 2px 9px;
  font-size: 16px;
  color: #fff;
  background-color: #254173; /* Blue background */
  border: 2px solid #254173; /* Border */
  border-radius: 5px; /* Rounded corners */
  text-decoration: none; /* Remove underline */
  cursor: pointer;
  transition: all 0.3s ease; /* Smooth transition */
}

.back_button:hover {
  background-color: #0056b3; /* Darker blue on hover */
  color: #fff; /* Keep text white */
  border-color: #0056b3; /* Match border with background */
  transform: scale(1.05); /* Slightly increase size */
}

.back_button i {
  margin-right: 8px; /* Space between icon and text */
}

.zoom-effect {
  animation: zoom 0.6s ease-in-out infinite alternate;
}

@keyframes zoom {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.2);
  }
}
.delete-history-btn {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 16px;
  margin-left: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-in-out;
}


.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px;
  margin: 5px 0;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.history-text {
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 16px;
  line-height: 1.2;
  margin-right: 8px;
  display: block;
}

/* --- User History Item Alignment --- */
.user-history-item {
  position: relative;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Wrapper for buttons to keep them aligned */
.session-buttons {
  display: flex;
  gap: 10px; /* Space between buttons */
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}

/* Common button styles */
.rename-session-btn,
.delete-session-close-btn {
  background: none;
  border: none;
  padding: 4px;
  color: inherit;
  font-size: 16px;
}

/* Rename button hover effect */
/* .rename-session-btn:hover {
  background-color: rgba(0, 0, 255, 0.1);
  border: 2px solid blue;
  color: blue;
  transition: all 0.3s ease;
} */

/* Delete button hover effect */
/* .delete-session-close-btn:hover {
  background-color: rgba(255, 0, 0, 0.1);
  border: 2px solid red;
  color: red;
  transition: all 0.3s ease;
} */


.history-text {
  margin-right: 30px; /* Add space for the delete button */
  display: inline-block;
}

/* Style the scrollbar */
::-webkit-scrollbar {
  width: 8px;  /* Set the width for vertical scrollbar */
  height: 6px; /* Set the height for horizontal scrollbar */
}

/* Style the track (the area the scrollbar moves within) */
::-webkit-scrollbar-track {
  background: #f1f1f1;  /* Light grey track */
  border-radius: 10px;
}

/* Style the thumb (the draggable part of the scrollbar) */
::-webkit-scrollbar-thumb {
  background: #888;  /* Grey thumb */
  border-radius: 10px;
}

/* Hover state for the thumb */
::-webkit-scrollbar-thumb:hover {
  background: #555;  /* Darker grey when hovered */
}

.preview_html {
  display: inline-block;
  padding: 4px 8px;
  background-color: #254173; /* Blue background */
  color: white;
  text-decoration: none;
  border-radius: 20px; /* Rounded edges */
  font-weight: bold;
  transition: background 0.3s ease;
  margin: 10px 0; /* Adds space above and below */
}

.preview_html:hover {
  background-color: #007bff; /* Darker blue on hover */
}

.removeAnswerGroup {
  color: white;
  background-color: red;
  padding: 10px; /* Adjusted padding for a round shape */
  border: 2px solid darkred; /* Added a border */
  border-radius: 50%; /* Fully round button */
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s;
  width: 40px; /* Set fixed width */
  height: 40px; /* Set fixed height */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.removeAnswerGroup:hover {
  background-color: darkred;
  transform: scale(1.1);
}

/* Reset Button Base Style */
.file-upload-button {
  padding: 10px;
  border: 2px solid #4CAF50;
  border-radius: 8px;
  background-color: #f9f9f9;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
}

/* Hover Effect */
.file-upload-button:hover {
  background-color: #e0f7fa;
  border-color: #008CBA;
}

.file-preview {
  border: 1px solid #ccc; /* Light gray border */
  border-radius: 5px; /* Slightly rounded corners */
  padding: 5px; /* Add some space inside */
  display: inline-block; /* Keeps it compact */
  background-color: #f9f9f9; /* Light background for better visibility */
}

#evaluate_process_qa {
  position: relative;
  overflow: hidden;
}

#loadingBar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background-color: #fff; /* White filling effect */
  transition: width 2s ease-in-out;
}

.open-popup {
  cursor: pointer;
  background-color: #f8f9fa;
}

.open-popup:focus {
  outline: none;
}

/* Base table styles */
.gridjs-table {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  color: #333;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Table headers */
.gridjs-table th {
  background-color: #f8f9fa;
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 2px solid #dee2e6;
  white-space: normal !important;
  word-break: normal;
  overflow-wrap: anywhere;
  max-width: 250px;
  vertical-align: top;
}

/* Table cells */
.gridjs-table td {
  padding: 10px 16px;
  border-bottom: 1px solid #e9ecef;
  white-space: normal !important;
  word-break: normal;
  overflow-wrap: anywhere;
  max-width: 250px;
  vertical-align: top;
  transition: background-color 0.2s ease;
}

/* Hover effect for rows */
.gridjs-table tr:hover td {
  background-color: #f1f3f5;
}

/* Alternating row colors */
.gridjs-table tr:nth-child(even) td {
  background-color: #fcfcfc;
}

/* Optional: On hover, show full content */
.gridjs-table td:hover {
  white-space: normal;
  overflow: visible;
  background: #fff;
  z-index: 2;
  position: relative;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

#evaluateDisplay {
  min-height: 100vh !important;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 1rem;
}

#evaluateFormContainer {
  flex: 1;
}

/* Uniform height for all .box-header.with-border elements */
.box-header.with-border {
  height: 50px;
  min-height: 50px;
  max-height: 50px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
}

@media (max-width: 600px) {
  .box-header.with-border {
    height: 48px;
    min-height: 48px;
    max-height: 48px;
  }
}

.ocr-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.ocr-box, .pdf-frame {
  flex: 1;
  min-height: 10%;
}

.ocr-box {
  padding: 10px;
  background-color: #f8f9fa;
  overflow-y: auto;
  border-bottom: 1px solid #ccc;
}

.pdf-frame {
  width: 100%;
  border: none;
}


.styled-select {
  appearance: none;
  background-color: white;
  border: 1px solid #ccc;
  padding: 10px 14px;
  font-size: 14px;
  color: #333;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M35 50l35 40 35-40' stroke='%23666' stroke-width='15' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px;
  transition: border-color 0.2s ease;
}

.styled-select:focus {
  border-color: #007BFF;
  outline: none;
}
