:root {
  --max-top-container-height: 100px; /* Set your desired max-height */
  --background-color: #283747;
  --text-color: black;
  --primary-bg-color: #34495E;
  --secondary-bg-color: #2E86C1;
  --highlight-bg-color: #D6EAF8;
  --progress-bg-color: #E8F5E9;
  --border-color: darkGray;
  --hover-bg-color: rgba(255, 255, 255, 0.1);
  --button-bg-color: #27AE60;
  --checkmark-bg-color: #27AE60;
  --button-hover-bg-color: #1E8449;
  --input-bg-color: white;
  --current-chat-column: #f0f0f0;
  --alt-bg-color: #27AE60;  /*#E8F8F5;*/
  --highlight-hover-bg-color: #f0f0f0;
}

body.dark-mode {
  --background-color: #121212;
  --text-color: white;
  --primary-bg-color: #1a1a1a;
  --secondary-bg-color: #333;
  --highlight-bg-color: #444;
  --progress-bg-color: #444;
  --border-color: #555;
  --hover-bg-color: rgba(255, 255, 255, 0.2);
  --button-bg-color: #555;
  --checkmark-bg-color: #eee;
  --button-hover-bg-color: #666;
  --input-bg-color: #333;
  --current-chat-column: #333;
  --alt-bg-color: #2E2E2E;
  --highlight-hover-bg-color: #555;
}
body {
  font-family: Arial, sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  margin: 0;
  padding: 0;
}

/* Code block and SQL query styling */
pre, code, .sql-query, .code-block {
  white-space: pre-wrap;       /* CSS3 */
  white-space: -moz-pre-wrap;  /* Firefox */
  white-space: -pre-wrap;      /* Opera <7 */
  white-space: -o-pre-wrap;    /* Opera 7 */
  word-wrap: break-word;       /* IE */
  overflow-wrap: break-word;   /* Modern browsers */
  max-width: 100%;
  display: block;
  padding: 10px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  margin: 10px 0;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9em;
  line-height: 1.4;
  color: var(--text-color);
}

/* Ensure tables within code blocks are responsive */
pre table, .sql-query table {
  width: 100%;
  border-collapse: collapse;
  margin: 5px 0;
  border: none;  /* Remove any table borders */
}

pre th, .sql-query th,
pre td, .sql-query td {
  padding: 6px 10px;
  text-align: left;
  border: none;  /* Remove cell borders */
}

/* Nested code blocks - remove inner borders */
pre pre, 
pre code, 
code pre, 
code code,
.sql-query pre,
.sql-query code,
.code-block pre,
.code-block code {
  border: none;
  padding: 0;
  margin: 0;
  background: transparent;
}

.top-container {
  display: flex; /* Use flexbox */
  align-items: center; /* Center vertically */
  justify-content: center; /* Center horizontally */
  background-color: var(--primary-bg-color);
  color: white;
  height: 14vh; /* Adjust this value as needed */
  max-height: var(--max-top-container-height); /* Apply the max-height */
  overflow: hidden;  /* Hide any content that overflows the max-height */
}

.chat-container {
  display: flex;
  height: calc(99vh - min(14vh, var(--max-top-container-height)));
  overflow: hidden;
}

/* Styles for mobile devices */
@media (max-width: 768px) {
  .top-container {
    height: auto; /* Allow content to dictate height */
    max-height: 50px; /* var(--max-top-container-height); */
  }
  .h1-container {
    font-size: 8pt !important;
    flex: 1;
  }
  .current-chat-column {
    margin: 0;
    padding: 0;
    flex: 1;
  }
  .history-column {
    display: none !important; /* Hide the history column */
    width: 90% !important;
    overflow-y: auto;
  }
  .chat-history {
    flex: 1; /* Fill available space */
    overflow-y: auto;
  }
  .profile-container {
    flex-shrink: 0; /* Prevent the profile-container from shrinking */
  }
  .hamburger-icon {
    display: block !important; /* Make the container inline */
    padding: 5px;
    margin-left: 10px;
    border-radius: 4px;
    align-items: center; /* Center vertically */
    justify-content: center; /* Center horizontally */
  }
  .back-button-container img {
    max-width: 80px !important; /* Set maximum width to the width of its container */
    max-height: 50px !important; /* Calculate minimum and then subtract 40px */
  }
  .back-button-container {
    flex: 1;
    padding: 3px 5px !important;
    margin: 0 !important;
  }
  .query-container {
    top: 70px !important;
    left: 10px !important;
  }
  .optional-sp {
    margin-left: 0px !important;
    margin-right: 0px !important;
    font-size: 10pt;
  }
  .bot-img {
    margin: 5px auto 5px auto !important; /* Push to the bottom */
    align-self: center; /* Center the div horizontally */
    flex: 0 0 90% !important; /* Disable growth, but allow width to be 100% */
  }
  .bot-img img {
    margin: auto !important; /* Push the image to the bottom */
    max-width: 90% !important; /* Make sure the image doesn't exceed container width */
  }
  .bot-icon img {
    padding: 2px 0 0 2px !important;
    width: 25px !important; /* Set the desired width */
    height: 25px !important; /* Set the desired height */
  }
  .user-div {
    padding: 5px !important;
    margin: 10px 5px 5px 5px !important;
  }
  .bot-div {
    padding: 5px !important;
    margin: 10px 5px 5px 5px !important;
  }
  .indicator {
    padding: 5px !important;
    margin: 10px 5px 5px 5px !important;
  }
  .icon {
    margin: 7px 3px !important;
  }
  .under-container {
    padding: 10px 0px 0px 0px !important;
    border-top: 1px solid #c0c0c0; 
  }
  .search-row {
    grid-column: 1;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
  }
  .control-row {
    grid-column: 2;
    margin: 0 !important;
    padding: 0 !important;
  }
  .control-options { display: none !important; } /* hide time limit + reasoning toggle on mobile */
  .control-actions { display: none !important; } /* hide desktop Repeat/Cont on mobile */
  /* Keep actions stacked vertically on all mobile widths */
  .search-container {
    padding: 6px !important;
    margin-right: 5px !important;
  }
  .agent-progress {
    height: 100px !important;
  }  
  .input-box {
    padding: 6px 28px 6px 8px !important; /* room for clear icon */
    font-size: 16px !important; /* prevent iOS auto-zoom */
    line-height: 1.25 !important;
    min-height: 30px !important; /* ~1 line */
    max-height: 80px !important;
    overflow-y: auto !important;
    resize: vertical;
  }
  .send-button {
    padding: 6px 10px !important;
    border-radius: 8px !important;
  }
  .clear-icon {
    font-size: 20px !important;
    height: 20px !important;
    width: 20px !important;
    right: 8px !important;
  }
  .checkbox-label.agent-label { display: none !important; }
  .checkbox-container.agent-container { display: none !important; }
  /* Swap to short labels on mobile */
  .btn-label-full { display: none !important; }
  .btn-label-short { display: inline !important; }
  /* Mobile: hide desktop control-row icons, show examples-row icons */
  .control-actions { display: none !important; }
  #examplesList .static-btn { display: inline-flex !important; }
  /* Show icon-only mobile actions inside actions-queries */
  .actions-queries .btn-icon {
    display: inline-flex !important;
    width: 32px;  /* slightly smaller on mobile */
    height: 32px;
    margin: 4px 4px;
    border-radius: 8px;
  }
  .example-button { 
    padding: 5px 6px !important; 
    font-size: 12px !important; 
    margin: 2px 4px !important; /* tighter vertical spacing on mobile */
  }
  /* Tighter wrap spacing between rows on mobile */
  #examplesList { gap: 4px !important; }
  form#planForm {
    margin-right: 0px !important;
    padding-right: 5px !important; /* Adjust the value according to your design preference */
  }
  form#planClient {
    margin-right: 0px !important;
    padding-right: 5px !important; /* Adjust the value according to your design preference */
  }
  select#plan {
    padding: 5px 0px !important;
    font-size: 10pt !important;
    margin: 0px !important;
    background-color: var(--input-bg-color);
  }
  select#client {
    padding: 5px 0px !important;
    font-size: 10pt !important;
    margin: 0px !important;
    background-color: var(--input-bg-color);
  }
  .search-container {
    padding: 8px !important;
    margin-right: 5px !important;
  }
  .input-box {
    padding: 4px !important;
    font-size: 12pt;
  }
  .image-button {
    padding: 12px 6px!important;
    border-radius: 6px;
    font-size: 12pt;
    cursor: pointer;
    margin: 3px 5px 0px 5px !important;
  }
  .instructions-box {
    flex: 1 !important;
    width: 70px !important;
  }
  .checkbox-label.agent-label {
    display: none !important;
  }
  /*.checkbox-container.agent-container {
    display: none !important;
  }*/
  .share-container {
    margin: 15px 5px 0 0 !important;
  }
  .feedback {
    padding: 8px 5px !important;
    margin: 10px 0px 0px 0px !important;
    width: 95% !important;
  }
  .sources {
    max-width: 85% !important;        /* Limit the max width to 100% of the parent (feedback div) */
  }
  form#styleForm {
    margin-right: 5px !important; /* Adjust the value according to your design preference */
  }
  select#styleDropdown {
    padding: 5px 5px;
    font-size: 10pt;
    background-color: var(--input-bg-color);
  }
  .rating i {
    margin: 0 4px 0 4px !important;
    padding: 0px 3px !important;
  }
  .rating {
    margin: 0px auto;
  }
}

.hamburger-icon {
  display: none; /* Hide the icon by default on larger screens */
  cursor: pointer;
}

.bar {
  width: 30px;
  height: 3px;
  background-color: white;
  margin: 5px 2px;
}

.show-history {
  display: flex !important; /* Override the display: none; on smaller screens */
}

.hide-history {
  display: none !important;
}

.h1-container {
  text-align: center;
  flex-grow: 3; /* Allow the <h1> container to expand and center the <h1> text */
}

.back-button-container {
  flex: 1;
  padding: 0px 30px;
}

.back-button-container img {
  max-width: 12vw; /* Set maximum width to the width of its container */
  max-height: calc(min(12vh, var(--max-top-container-height)) - 45px); /* Calculate minimum and then subtract 40px */
}

.back-button {
  background-color: var(--button-bg-color);
  color: white;
  border: none;
  padding: 8px 15px;
  font-size: 14px;
  cursor: pointer;
  border-radius: 5px;
}

.back-button:hover {
  background-color: var(--button-hover-bg-color);
}

.column {
  overflow-y: auto;
  border: 1px solid var(--border-color);
}

.history-column {
  display: flex;
  flex-direction: column;
  background-color: var(--secondary-bg-color);
  width: 250px;
  padding: 10px 10px 5px 10px;
}
.splash {
    padding: 0px;
}
.splash-query {
    padding-top: 30px;
}
.splash-version {
    padding-top: 20px;
    font-size: 10pt;
}

.ham-container {
  max-width: 20px; /* Adjust this value as needed */
  white-space: nowrap; /* Prevent line breaks */
/*    display: inline-block; /* Ensure it stays inline with text */
  margin: 0px 3px 0 0;
}

.ham-icon {
  display: inline-block; /* Make the container inline */
  padding: 4px;
  border-radius: 4px;
  align-items: center; /* Center vertically */
  justify-content: center; /* Center horizontally */
  background-color: black;
  vertical-align: middle; /* or any other value to shift it up or down */
}
.ham-bar {
  width: 20px;
  height: 2px;
  background-color: white;
  margin: 3px 2px;
}

.new-chat-container {
  padding-bottom: 20px;
}

.new-chat-row {
  display: flex;
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 10px;
}

.new-chat {
  flex-grow:1;
  display: flex;
  align-items: center;
  padding: 10px;
  cursor: pointer;
  color: white;
}

.new-chat:hover,
.new-chat-container:hover .new-chat {
  background-color: var(--hover-bg-color);
  transition: background-color 0.3s;
}

.plus-icon {
  font-size: 24px;
  cursor: pointer;
  margin-right: 10px;
}

.new-text {
  cursor: pointer;
}

.chat-history {
  flex: 1;
  overflow-y: auto;
}

.chat-tile {
  display: flex;
  align-items: center;
  padding: 10px 10px;
  cursor: pointer;
  transition: background-color 0.3s;
  border-radius: 10px;
}

.chat-tile:hover {
  background-color: var(--hover-bg-color); /* Hover color */
}

.chat-tile.selected {
  background-color: var(--hover-bg-color); /* Adjust opacity as needed */
}

.delete-icon {
  display: none;
  opacity: 0.6;
  transition: opacity 0.3s ease-in-out; /* Add a smooth transition */
  color: white;
  padding: 2px;
}

/* Show the delete icon when the chat tile is selected */
.chat-tile.selected .delete-icon {
  display: block;
}

.delete-icon:hover {
  opacity: 1;
}

/* QA delete icon styles */
.delete-qa-container {
  padding: 4px 4px 0px 4px; /* Add some padding to create space around the icon */
  width: 24px;
  height: 28px;
  margin-top: 4px;
  margin-left: 8px;
  cursor: pointer;
}

.delete-qa-icon {
  color: #888;
  font-size: 1.2em;
  vertical-align: middle;
  transition: color 0.2s;
  display: inline-block;
  background: transparent;
}

.delete-qa-icon:hover {
  color: #777;
}

.chat-icon img {
  width: 20px; /* Set the desired width */
  height: 20px; /* Set the desired height */
  margin-right: 10px;
}

.chat-description {
  flex-grow: 1;
  font-size: 10pt;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: white;
}

.profile-container {
  padding: 10px 0px 5px 0px;
  border-top: 1px solid var(--border-color);
  position: relative; /* Add this line to make it a positioning context */
}

.user-profile {
  display: flex;
  align-items: center;
}

.user-info {
  display: flex;
  flex: 1;
  align-items: center;
  cursor: pointer;
  padding: 15px 10px;
  width: max-content;
  justify-content: space-between;
}

.user-info:hover,
.user-info.hovered {
  background-color: var(--hover-bg-color);
  transition: background-color 0.3s;
}

.dot-icon {
  font-size: 20px;
  cursor: pointer;
  color: white;
}
.user-profile .user-name {
  flex: 1;
  color: white;
}
.profile-dropdown-menu {
  display: none;
  position: absolute;
  left: 0;
  bottom: 100%;
  background-color: var(--secondary-bg-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  z-index: 1;
  color: white;
  width: 100%; /* Set the width to match the parent */
  border-top: 1px solid var(--border-color);
}

.profile-dropdown-menu.active {
  display: block;
}

.profile-dropdown-item {
  display: flex;
  align-items: center;
  padding: 15px 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.profile-dropdown-item:hover {
  background-color: var(--hover-bg-color);
}

.profile-dropdown-item i {
  margin-right: 15px;
}

.current-chat-column {
  flex: 3;
  background-color: var(--current-chat-column);
  display: flex;
  flex-direction: column;
  padding: 10px;
}

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

#chatQContainer, #agentQContainer {
  margin: 10px;
}

#chatQContainer h3, #agentQContainer h3 {
  margin: 10px 10px;
  font-size: 14px;
}

.actions-row {
  display: flex;
  justify-content: space-between;
  align-items: top;
  /*    border-bottom: 1px solid var(--border-color); */
  padding: 8px 8px 8px 0;
}

.control-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  margin-bottom: 13px;
  padding: 0 10px;
}
.control-options {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px; /* Reduce spacing between controls */
}
.control-options label,
.control-options select,
.control-options input[type="number"],
.control-options input[type="checkbox"] {
  margin-right: 6px;
  margin-left: 0;
}
#timeLimitInput {
  padding: 4px 8px;
  font-size: 10pt;
  background-color: var(--input-bg-color, #f8f8f8);
  color: var(--text-color);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  box-shadow: 0 1px 2px rgba(0,0,0,0.07);
  width: 50px;
}
.control-options label.agent-label {
  margin-left: 0px;
  margin-right: 4px;
}
.control-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin-left: auto; /* push to right on desktop */
}
/* Desktop: tighten icon buttons in the control row (reduce top/bottom space) */
.control-actions .btn-icon,
.control-actions .example-button {
  margin: 0 0px 0 6px !important; /* remove vertical margins */
  padding: 0 !important;     /* no extra padding around the icon */
  height: 32px;              /* slightly smaller height */
  width: 32px;
}
@media (min-width: 769px) {
  #examplesList .static-btn { display: none !important; }
}

.campaign-label {
  margin-right: 8px;
  font-weight: normal;
  font-size: 10pt;
  margin-left: 4px;
}
.checkbox-label.agent-label {
  margin-left: 16px;
  margin-bottom: 0;
  font-weight: normal;
  font-size: 12px;
}
#repeatQueryButton, #clearInputButton, #continueButton, .example-button {
  font-size: 12px;
  font-weight: normal;
  padding: 6px 12px;
  margin-left: 0;
}
#clearInputButton {
  margin-left: 0;
}
.actions-queries {
  display: flex;
  flex-wrap: wrap;
  gap: 0px;
  overflow: hidden;
  min-height: 40px; /* Ensures it doesn't shrink smaller than 40px */
  max-height: fit-content; /* Allows multiple rows of buttons when necessary */
  transition: max-height 0.3s ease;
  flex-grow: 1; /* Allow actions-queries to take up available space */
  border-right: 1px solid #ccc; /* Add left border */
  align-items: center; /* Ensures vertical alignment */
  border-right: none !important;
  min-height: 48px;
}

/* Make the inner container a row of icons + example buttons */
#examplesList {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.actions-queries.expanded {
  max-height: 300px; /* Adjust this value to show more buttons when expanded */
}

.example-button {
  margin: 5px;
  padding: 7px 6px;
  background-color: var(--input-bg-color);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.example-button:hover {
  background-color: var(--highlight-hover-bg-color);
}

.example-queries {
  position: relative;
  background-color: var(--input-bg-color);
  border: 1px solid var(--border-color);
  max-height: 300px;
  overflow-y: auto;
}

.agent-progress {
  display: none; /* Initially hidden */
  position: relative;
  top: 5px;
  left: 10px;
  width: calc(100% - 44px); /* Same width as the under-container */
  height: 200px;
  overflow-y: scroll;
  background-color: var(--progress-bg-color);
  color: var(--text-color);
  border: 3px solid var(--border-color);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 10pt;
  z-index: 1000;
}

.member-info {
  display: flex;
  align-items: center; /* Vertically center the items */
  padding: 8px 10px 12px 10px;
}

.member-info label {
  margin-right: 0px; /* Add space between label and input */
  margin-left: 10px;
  font-weight: normal;
  font-size: 11pt;
}

.member-text {
  flex: 1;
  margin-right: 10px;
  border: 1px solid var(--border-color);
  color: var(--text-color);
  font-size: 10pt;
  padding: 10px 8px;
  border-radius: 5px;
  box-sizing: border-box; /* Include padding and border in width calculation */
  background-color: var(--input-bg-color); /* Optional: Add a light background color */
}

.member-id {
  width: 90px;
  border: none; /*1px solid var(--border-color);*/
  color: var(--text-color);
  padding: 6px;
  border-radius: 5px;
  box-sizing: border-box; /* Include padding and border in width calculation */
  background-color: var(--input-bg-color); /* Optional: Add a light background color */
}
.member-id:focus {
  outline: none;
}

.member-info button {
  background-color: var(--button-bg-color);
  color: white;
  padding: 6px 7px; /* Padding */
  border: none; /* No border */
  cursor: pointer; /* Cursor on hover */
  border-radius: 5px; /* Rounded corners */
  margin-left: 5px; /* Space between input box and button */
}

.member-info button:hover {
  background-color: var(--button-hover-bg-color);
}

.member-info .toggle-button {
  background-color: #aaa;  /*#4CAF50; /* Green background */
  color: white; /* White text color */
  padding: 8px 8px; /* Padding */
  border: none; /* No border */
  cursor: pointer; /* Cursor on hover */
  border-radius: 5px; /* Rounded corners */
  margin-left: 10px; /* Space between input box and button */
}

.member-info .toggle-button:hover {
  background-color: #888; /*#45a049; /* Darker green background on hover */
}

.qhid-container {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Add shadow effect */
  align-items: center;
  padding: 3px 5px;
  border-radius: 5px;
  background-color: var(--input-bg-color);
  border: 1px solid var(--border-color);
  display: block;
  /*flex: 1;*/
  margin: 0 10px 0 5px;
}

.member-info .accum-button {
  margin-right: 10px;
  padding: 10px 7px;
  border-radius: 5px; /* Rounded corners */
}

.member-info .hep-button {
  margin-right: 5px;
  padding: 10px 7px;
  border-radius: 5px; /* Rounded corners */
}

.progress-text {
  font-size: 16px;
  font-weight: bold;
  margin: 5px;
  text-align: left;
  color: var(--text-color);
}

.progress-container {
  width: 100%;
  background-color: var(--progress-bg-color);
  border-radius: 10px;
  overflow: hidden;
  margin: 10px 40% 0 10px;
  padding: 3px;
}

.progress-bar {
  height: 20px;
  width: 0%;
  padding: 3px;
  background-color: var(--button-bg-color);
  text-align: center;
  color: var(--text-color);
  line-height: 20px;
  border-radius: 10px;
  transition: width 0.3s ease-in-out;
}

.under-container {
  padding: 5px 10px 0px 10px;
  border-top: 1px solid #c0c0c0; 
}

.search-row {
  display: flex;
  align-items: center;
  padding: 20px 0px 10px 0px;
  border-top: 1px solid var(--border-color);
  /*border-bottom: 1px solid var(--border-color); */
  border-top: none !important;
  margin-top: 0;
  padding-top: 0;
}

.input-container {
  display: flex;
  align-items: center;
  padding: 5px 0px 10px 0px;
  margin: 0px 10px;
  border-top: 1px solid var(--border-color);
}

.batch-size-container {
    display: flex;
    align-items: center;
    gap: 5px; /* Space between label and input */
}

.batch-size-container label {
    font-weight: normal;
}

.batch-size-input {
    width: 40px;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-align: center;
}

.hidden-file-input {
  display: none;
}
.fileLabels {
  display: inline-block;
  font-size: 14px;
  padding: 7px 10px;
  background-color: #3498db; /*#27AE60; /*#239B56; /*#2E86C1; /* CornflowerBlue; */ /* #007bff; */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Add shadow effect */
  color: white;
  border-radius: 5px;
  cursor: pointer;
}
.fileLabels:hover {
  background-color: #2980b9;
}
.fileInputs {
  background-color: #f0f0f0;
  border: 1px solid #ccc;
  padding: 5px;
}
.file-selection {
    flex: 1;
    border: none;
    padding: 7px 10px;
    border-radius: 4px;
    font-size: 12pt;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Add shadow effect */
    background-color: white;
    display: flex;
    margin: 0px 10px;
    white-space: nowrap; /* Prevent text from wrapping */
    overflow: auto;
}
.file-input-container {
    flex: 1;
    position: relative;
    display: flex;
    overflow: hidden;
}
.clear-file-selection {
    position: absolute;
    top: 1px;
    right: 12px;
    padding: 8px;
    cursor: pointer;
    background-color: #8E44AD;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    display: none;
}
.edit-button {
    background-color: #3498db; /*#27AE60; /*#239B56; /*#2E86C1; /* CornflowerBlue; */ /* #007bff; */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Add shadow effect */
    color: white;
    border: none;
    padding: 7px 10px;
    border-radius: 5px;
    font-size: 12pt;
    cursor: pointer;
    margin: 3px 10px 0px 10px;
}

form#planForm {
  margin-right: 10px; /* Adjust the value according to your design preference */
}
form#clientForm {
  margin-right: 10px; /* Adjust the value according to your design preference */
}
select#plan {
  padding: 5px 5px;
  font-size: 10pt;
  background-color: var(--input-bg-color);
  color: var(--text-color);
  border-radius: 8px; /* Adjust the value to control the border roundness */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Add shadow effect */
  border: 1px solid #eee; /* Set the border color to gray (#888) */
  margin-left: 0px;
}
select#client {
  padding: 5px 5px;
  font-size: 10pt;
  background-color: var(--input-bg-color);
  color: var(--text-color);
  border-radius: 8px; /* Adjust the value to control the border roundness */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Add shadow effect */
  border: 1px solid #eee; /* Set the border color to gray (#888) */
  margin-left: 0px;
}
.search-container {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Add shadow effect */
  align-items: center;
  padding: 6px;
  border-radius: 5px;
  background-color: var(--input-bg-color);
  border: 1px solid var(--border-color);
  display: flex;
  flex: 1;
  margin-right: 8px;
}

.input-box {
  flex: 1;
  border: none;
  padding: 6px 20px 6px 8px; /* Right padding increased for clear button */
  background-color: var(--input-bg-color);
  color: var(--text-color);
  border-radius: 5px;
  box-sizing: border-box; /* Include padding and border in width calculation */
  font-size: 11pt;
  font-family: Arial, sans-serif; /* Replace with your desired font */
  /* Desktop: approx 3 rows */
  min-height: 66px;
}

.input-box:focus {
  outline: none;
}

/* Clear button styles */
.clear-icon {
  position: relative;
  right: 8px; /* Position to the left of the send button */
  top: 50%;
  color: var(--text-color);
  cursor: pointer;
  z-index: 10;
  border: none;
  font-size: 24px;
  height: 24px;
  width: 24px;
  padding: 0 3px;
  display: flex;
  align-items: right;
  justify-content: center;
  opacity: 0.5;
  transition: all 0.2s ease;
  background: transparent;
  margin-left: 10px;
}

.clear-icon:hover {
  background-color: var(--highlight-hover-bg-color);
}

.send-button {
  background-color: var(--button-bg-color);
  color: white;
  border: none;
  padding: 6px 8px;
  margin-left: 5px;
  border-radius: 4px;
  cursor: pointer;
}

.send-button:hover {
  background-color: var(--highlight-hover-bg-color);
}

/* Icon-only button base (visible on all viewports) */
.btn-icon {
  display: inline-flex;
  width: 36px;
  height: 36px;
  padding: 0;
  align-items: center;
  justify-content: center;
}

/* Disabled state visuals for action buttons (desktop and mobile) */
.example-button:disabled,
.btn-icon[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(0.2);
}

/* Default: show full labels, hide short */
.btn-label-full { display: inline; }
.btn-label-short { display: none; }

.image-button {
  background-color: var(--button-bg-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Add shadow effect */
  color: white;
  border: none;
  padding: 12px 15px;
  border-radius: 8px;
  font-size: 12pt;
  cursor: pointer;
  margin: 3px 0px 0px 15px;
}

.image-button:hover {
background-color: var(--button-hover-bg-color);
}

.instructions-box {
  flex: 2;
  border: 1px solid var(--border-color);
  background-color: var(--input-bg-color);
  color: var(--text-color);
  padding: 8px;
  border-radius: 5px;
}

select#offerDropdown {
  padding: 5px 5px;
  font-size: 10pt;
  background-color: var(--input-bg-color);
  color: var(--text-color);
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
}

.optional-sp {
  margin-left: 0px;
  margin-right: 5px;
  font-size: 10pt;
}

form#pbmForm {
  margin-right: 7px; /* Adjust the value according to your design preference */
}

select#pbmDropdown {
  padding: 5px 5px;
  font-size: 10pt;
  background-color: var(--input-bg-color);
  color: var(--text-color);
  border-radius: 8px; /* Adjust the value to control the border roundness */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Add shadow effect */
  border: 1px solid #eee; /* Set the border color to gray (#888) */
}

form#preForm {
  margin-right: 7px; /* Adjust the value according to your design preference */
}

select#preDropdown {
  padding: 5px 5px;
  font-size: 10pt;
  background-color: var(--input-bg-color);
  color: var(--text-color);
  border-radius: 8px; /* Adjust the value to control the border roundness */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Add shadow effect */
  border: 1px solid #eee; /* Set the border color to gray (#888) */
}

form#modeForm {
  margin-right: 15px; /* Adjust the value according to your design preference */
}

select#modeDropdown {
  padding: 5px 5px;
  font-size: 10pt;
  background-color: var(--input-bg-color);
  color: var(--text-color);
  border-radius: 8px; /* Adjust the value to control the border roundness */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Add shadow effect */
  border: 1px solid #eee; /* Set the border color to gray (#888) */
}

form#styleForm {
  margin-right: 15px; /* Adjust the value according to your design preference */
}

select#styleDropdown {
  padding: 5px 5px;
  font-size: 10pt;
  background-color: var(--input-bg-color);
  color: var(--text-color);
  border-radius: 8px; /* Adjust the value to control the border roundness */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Add shadow effect */
  border: 1px solid #eee; /* Set the border color to gray (#888) */
}

.optional-src {
  margin-left: 0px;
  margin-right: 0px;
  font-size: 10pt;
}

.checkbox-label.agent-label {
    display: block;
}
.checkbox-container.agent-container {
    display: block;
}

.user-div {
  background-color: var(--input-bg-color);
  padding: 20px;
  margin: 10px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  line-height: 1.5;
  white-space: pre-line;
  display: flex;
  align-items: flex-start;
}

.bot-div {
  background-color: var(--highlight-bg-color);
  padding: 15px 20px 20px 20px;
  margin: 10px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  line-height: 1.5;
  white-space: pre-line;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-wrap: wrap; /* Allow items to wrap if needed */
  max-width: 100%; /* Set a maximum width */
}

.alt-div {
  background-color: var(--alt-bg-color);
  padding: 15px 20px 20px 20px;
  margin: 10px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  line-height: 1.5;
  white-space: pre-line;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-wrap: wrap; /* Allow items to wrap if needed */
  max-width: 100%; /* Set a maximum width */
}

.bot-response {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-wrap: wrap; /* Allow items to wrap if needed */
  flex: 1; /* Allow the bot-response to grow and take available space */
  padding-top: 5px;
}
.alt-response {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-wrap: wrap; /* Allow items to wrap if needed */
  flex: 1; /* Allow the bot-response to grow and take available space */
  padding-top: 5px;
}

.indicator {
  display: none;
  background-color: var(--highlight-bg-color);  /*background-color: #D6EAF8;*/
  padding: 20px;
  margin: 10px;
  border-radius: 20px;
  border: 1px solid darkGray;
  line-height: 1.5;
  position: relative;
  height: 50px;
}
.icon {
  width: 30px;
  height: 30px;
  margin: 5px 10px;
}
.user-icon img {
  width: 30px; /* Set the desired width */
  height: 30px; /* Set the desired height */
}
.bot-icon img {
  width: 30px; /* Set the desired width */
  height: 30px; /* Set the desired height */
}
.user-icon {
  background-color: #fff; /* Bot icon color */
  border-radius: 6px; /* Rounded corners */
  border: 1px solid darkGray;
  padding: 3px;
}
.bot-icon {
  background-color: #fff; /* Bot icon color */
  border-radius: 6px; /* Rounded corners */
  border: 1px solid darkGray;
  padding: 3px;
}
.gpt-icon img {
  width: 27px; /* Set the desired width */
  height: 27px; /* Set the desired height */
}
.gpt-icon {
  background-color: #27AE60;
  border-radius: 6px; /* Rounded corners */
  border: 1px solid #202020;
  padding: 2px 1px 2px 3px;
}
.bot-div .text {
  text-indent: 0;
}
.bot .text {
  text-indent: 0; /* Remove text indentation */
  clear: both !important;
}
.share-container {
  padding: 4px 4px 0px 4px; /* Add some padding to create space around the icon */
  border: 1px solid gray; /*#2E86C1 ; /* Gray border */
  border-radius: 6px; /* Rounded corners */
  background-color: #fff; /* White background */
  transition: background-color 0.3s; /* Smooth background color transition on hover */
  width: 24px;
  height: 28px;
  margin-top: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15); /* Add shadow effect */
}
.share-container:hover {
  background-color: #fff; /* Change background color on hover */
}
.share-icon {
  opacity: 0.7;
  transition: opacity 0.3s ease-in-out; /* Add a smooth transition */
}
.share-icon:hover {
  opacity: 1;
}
.share-icon img {
  width: 22px; /* Set the desired width */
  height: 22px; /* Set the desired height */
  cursor: pointer;
}
.tooltip-text {
  visibility: hidden; /* Initially hide the tooltip text */
  opacity: 0;
  background-color: white;
  color: #303030;
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 5px;
  margin-right: 5px;
  position: relative; /* Position the tooltip text absolutely */
  bottom: 140%; /* Position it below the container */
  right: 60%; /* Center it horizontally */
  transform: translateX(-100%); /* Center it horizontally */
  transition: visibility 0.2s, opacity 0.2s; /* Add a transition effect */
  font-size: 10pt;
  width: 70px;
}
.share-container:hover .tooltip-text {
  visibility: visible; /* Show the tooltip text on hover */
  opacity: 1;
}
.bot-img-container {
  display: flex;
  justify-content: center; /* Center horizontally */
  width: 100%;
}
.bot-img {
  background-color: white;
  padding: 20px 10px;
  border-radius: 10px;
  border: 1px solid Gray;
  line-height: 1.5;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center; /* Center horizontally */
  text-align: center; /* Center content horizontally */
  margin: 15px auto 10px auto; /* Push to the bottom */
  align-self: center; /* Center the div horizontally */
  flex: 0 0 70%; /* Disable growth, but allow width to be 100% */
}
.bot-img img {
  margin-top: auto; /* Push the image to the bottom */
  max-width: 70%; /* Make sure the image doesn't exceed container width */
}
.text {
    padding: 10px;
    flex: 1;
}
.user-div .text {
    text-indent: 0px;
}
.checkbox-wrapper {
    display: flex;
    flex-direction: column; /* Stack label above checkbox */
    align-items: center;  /* Center both label and checkbox */
    text-align: center;
    gap: 8px;  /* Small space between label and checkbox */
    padding-left: 5px; /* Add padding so text is not too close to the border */
    margin-right: 5px;
    max-width: 80px; /* Adjust width to help with wrapping */
    word-wrap: break-word; /* Ensure wrapping works */
}

.checkbox-label {
  padding-left: 10px;
  font-size: 10pt;
}

.checkbox-container {
  display: block;
  position: relative;
  padding: 0 3px 0 0; /* Adjust the spacing to your liking */
  margin-right: 10px;
  cursor: pointer;
}

.checkbox-container.disabled {
  visibility: hidden; /* Change the color to a grayish tone */
  cursor: not-allowed; /* Change the cursor style to "not-allowed" */
}

.checkbox-container input[type="checkbox"] {
  display: none;
}

.checkbox-checkmark {
  position: relative;
  bottom: -1px;
  left: 10px;
  height: 20px; /* Adjust the size of the checkbox */
  width: 20px; /* Adjust the size of the checkbox */
  background-color: var(--input-bg-color);
  border: 1px solid var(--border-color);
  border-radius: 3px;
  display: inline-block; /* Added to ensure the checkbox has width */
}

.checkbox-container input[type="checkbox"]:checked + .checkbox-checkmark:after {
  content: '\2713'; /* Unicode checkmark character */
  font-size: 16px; /* Adjust the size of the checkmark */
  color: var(--checkmark-bg-color); /* Color when checked */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Hover effect for better visibility */
.checkbox-container:hover .checkbox-checkmark {
  border-color: var(--highlight-color, #007bff);
}

.user-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0px;
  margin: 0px;
  width: 100%;
}

.feedback {
  display: flex;
  flex-direction: column;  /* Stack the spans vertically */
  justify-content: flex-start;
  align-items: stretch;  /*stretch*/
  padding: 0px 5px 0px 5px;
  margin: 10px 10px 0px 10px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  width: 95%;
}

.comment-rating-container {
  display: flex;
  flex-direction: row;  /* Align the comment and rating spans horizontally */
  max-width: 100%;
  align-items: center;  /* Center items vertically */
  margin: 3px 5px;
}

.comment {
  flex-grow: 1;  /* Allow the comment span to grow and take up available space */
  overflow-x: auto;  /* Enable horizontal scrolling */
  white-space: nowrap;  /* Prevent text from wrapping */
  font-size: 10pt;
  min-height: 10pt;
  padding: 3px 5px 3px 8px;
  border-radius: 4px;
  background-color: var(--highlight-hover-bg-color);
}

.rating {
  display: flex;
  align-items: center;  /* Center items vertically */
  flex-direction: row;  /* Align icons in a row */
  padding-left: 10px;
  /*border-left: 1px solid var(--border-color);*/
}

.rating .emoji-icon {
  cursor: pointer;
  font-size: 22px;
  margin-right: 10px;
}

.sources-container {
  padding: 5px 5px 0px 5px;
  max-width: 100%;
  margin-left: 5px;
  border-top: 1px solid var(--border-color);
  overflow-x: auto; /* Enable horizontal scrolling on the container */
  /*background-color: var(--highlight-hover-bg-color); /* Example: Red background with 50% opacity */
}

.sources {
  display: inline-block; /* Ensure it behaves like an inline element for width */
  overflow-x: auto;      /* Enable horizontal scrolling */
  min-width: 100%;       /* Ensure it takes at least 100% of the parent's width */
  /*width: 95%;        /* Limit the max width to 100% of the parent (sources-container) */
  white-space: pre;       /* Preserve spaces and line breaks */
  font-size: 10pt;
}

.plan-info-container {
  padding: 5px 10px;
  border-top: 1px solid var(--border-color);
  margin-top: 5px;
  /*background-color: var(--background-color);  */
  font-size: 10pt;
}

.custom-popup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60%; /* Set the width as a percentage of the screen */
  max-height: 80vh; /* Set the maximum height as a percentage of the viewport height */
  overflow-y: auto; /* Enable vertical scrolling when content exceeds the height */
  padding: 20px;
  background-color: var(--input-bg-color);
  border: 6px solid var(--button-bg-color);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.popup-content {
  margin-bottom: 10px;
}

.close-popup {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 20px;
  cursor: pointer;
}

.popup-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.popup-list-item {
  margin-bottom: 0px;
}

.popup-list-item span:hover {
  color: #52BE80; /* Change the color on hover to your desired color */
  text-decoration: underline; /* Underline on hover */
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.spinner-animation circle{
animation: spin 1s linear infinite;
}

.spinner-animation {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Styles for the modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 10;
}

.modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(0, 0, 0, 0.5);
  width: 400px;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  z-index: 11;
}

.modal-content {
  background-color: var(--input-bg-color);
  padding: 20px;
  border-radius: 5px;
}

.modal-button {
  background-color: #ddd;
  border: none;
  padding: 10px 20px;
  margin-right: 10px;
  border-radius: 5px;
  cursor: pointer;
}

.modal-button:hover {
  background-color: #aaa;
}

.close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
}

/* Style for the cancel button */
.cancel-button {
  background-color: #f1f1f1;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
}

.cancel-button:hover {
  background-color: #ddd;
}

.admin-user-row {
  margin-bottom: 20px;
}

.admin-user-header {
  margin-bottom: 8px;
  font-size: 16px;
}

.admin-user-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 15px;
  margin-bottom: 5px;
}

.admin-user-controls label {
  display: flex;
  align-items: center;
  font-weight: normal;
  font-size: 14px;
}

.delete-button {
  background: none;
  border: none;
  color: #c00;
  cursor: pointer;
  font-size: 16px;
  padding: 4px 8px;
}

.delete-button:hover {
  color: #a00;
}

#clearInputButton, #repeatQueryButton {
  cursor: pointer;
}

#clearInputButton:disabled, #repeatQueryButton:disabled, #continueButton:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Delineate bottom of scrolling window in dark mode */
.current-chat-column, .chat-box {
  border-bottom: 1px solid #e0e0e0;
}
body.dark-mode .current-chat-column, body.dark-mode .chat-box {
  border-bottom: 1px solid #444;
}
