/****************************************************************************
 * 1) ROOT VARIABLES & BODY
 ****************************************************************************/
 :root {
    --primary-color: #0070bb;  /* Default Primary Color */
    --secondary-color: #003b6f;  /* Default Secondary Color */
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--chat-bg-color);
    color: var(--text-color); /* Apply text color to body */
}

/****************************************************************************
 * 2) MAIN CONTAINER
 ****************************************************************************/
.chat-container {
    display: flex;
    height: 100vh;
}

/****************************************************************************
 * 3) SIDEBAR
 ****************************************************************************/
/* Sidebar Toggle Button */
.sidebar-toggle-btn {
  background-color: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.6rem;
  margin-right: 10px;
  transition: color 0.4s ease;
}
.sidebar-toggle-btn:hover {
  color: #cccccc;
}

/* Sidebar Panel */
.chat-sidebar {
    width: 260px;
    transition: width 0.4s ease;
    background-color: var(--sidebar-bg-color);
    color: var(--sidebar-text-color);
    display: flex;
    flex-direction: column;
    padding: 20px 15px;
    box-sizing: border-box;
    overflow-y: auto;
}

/* Sidebar Scrollbar */
.chat-sidebar::-webkit-scrollbar {
    width: 8px;
}
.chat-sidebar::-webkit-scrollbar-thumb {
    background-color: #34495e;
    border-radius: 4px;
}
.chat-sidebar::-webkit-scrollbar-thumb:hover {
    background-color: #2c3e50;
}

/* Optional Sidebar Divider */
.sidebar-divider {
    border-top: 1px solid #2c3e50;
    margin: 20px 0;
}

/* Sidebar Sections */
.sidebar-section-title {
    font-size: 0.9rem;
    color: #bdc3c7;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid #34495e;
    padding-bottom: 5px;
}
.database-section {
    margin-bottom: 20px;
}
/* ---------- FOR DEVELOPER MODE ---------- */
/* .upload-section {
    margin-bottom: 20px;
} */
/* ---------------------------------------- */

/* Conversation Section in Sidebar */
.conversation-section {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow: hidden;
}
.conversation-list {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 20px;
}
.conversation-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 5px;
    transition: background-color 0.4s ease;
    background: transparent; /* explicitly set to transparent */
}
.conversation-item:hover {
    background-color: #34495e;
}
/* Force the conversation link to remain unchanged (or white) on hover */
.conversation-item:hover .conversation-link {
    color: #ffffff;
    background: transparent;
}
/* Remove any default anchor hover effects */
.conversation-link:hover {
    background: transparent;
    text-decoration: none;
}
.conversation-item.active {
    background-color: var(--primary-color);
}
.conversation-link {
    flex: 1;
    display: flex;
    align-items: center;
    color: #ecf0f1;
    text-decoration: none;
}
.conversation-link i {
    margin-right: 10px;
}
.conversation-item .conversation-link {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  max-width: 180px; /* or another width that works for your layout */
  vertical-align: middle;
}
.conversation-actions {
    display: flex;
}
.conversation-actions .btn {
    color: #ecf0f1;
    font-size: 1rem;
    padding: 0 5px;
    transition: color 0.4s ease;
}
.conversation-actions .btn:hover {
    color: #2980b9;
}
.conversation-item.active .conversation-link {
    font-weight: bold;
}
.conversation-item.active .conversation-actions .btn {
    color: #ffffff;
}
.conversation-item.active .conversation-actions .btn:hover {
    color: var(--secondary-color);
}

/* New Chat Button */
.new-conversation-form {
    margin-bottom: 0;
}
.new-chat-button {
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: 5px;
    padding: 10px;
    width: 100%;
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.4s ease;
}
.new-chat-button i {
    margin-right: 10px;
}
.new-chat-button:hover {
    background-color: var(--secondary-color);
}

/* Collapsed Sidebar */
.chat-sidebar.sidebar-collapsed {
    width: 0;
    padding: 0;
    overflow: hidden;
    transition: width 0.4s ease, padding 0.4s ease;
}
.chat-main.sidebar-collapsed {
    margin-left: 0;
    transition: margin-left 0.4s ease;
}

/****************************************************************************
 * 4) FORM & MISC. CONTROLS
 ****************************************************************************/
/* Form Elements */
.form-group {
    margin-bottom: 15px;
}
.form-control,
.form-control-file {
    background-color: #34495e;
    color: #ecf0f1;
    border: none;
    border-radius: 5px;
}
.form-control:focus,
.form-control-file:focus {
    background-color: #3b4a5a;
    color: #ffffff;
    outline: none;
    box-shadow: 0 0 5px rgba(41, 128, 185, 0.5);
}
.form-text {
    color: #95a5a6;
}
/* Placeholder Text Color */
.form-control::placeholder {
    color: #999999;
    opacity: 1;
}
.form-control::-webkit-input-placeholder {
    color: #999999;
    opacity: 1;
}
.form-control::-moz-placeholder {
    color: #999999;
    opacity: 1;
}
.form-control:-moz-placeholder {
    color: #999999;
    opacity: 1;
}
.form-control:-ms-input-placeholder {
    color: #999999;
    opacity: 1;
}

/* ---------- FOR DEVELOPER MODE ---------- */
/* .upload-section .btn.upload-button {
    background-color: var(--primary-color);
    border: none;
    color: #ffffff;
    border-radius: 5px;
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    transition: background-color 0.4s ease;
}
.upload-section .btn.upload-button i {
    margin-right: 8px;
}
.upload-section .btn.upload-button:hover {
    background-color: var(--secondary-color);
} */
/* ---------------------------------------- */

/****************************************************************************
 * 5) GLOBAL BUTTON OVERRIDES
 ****************************************************************************/
.btn {
    border: none;
    border-radius: 5px; /* Fully rounded corners */
    padding: 10px 16px;
    cursor: pointer;
    transition: background-color 0.4s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn.partial-rounding {
    border-radius: 0 5px 5px 0; /* Right corners only */
}

/****************************************************************************
 * 6) CHAT MAIN CONTENT
 ****************************************************************************/
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Chat Header */
.chat-header {
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 4px 10px;
    display: flex;
    align-items: center;
    color: #fff;
    position: relative;
    overflow: hidden;
    background-size: 200% 200%;
    animation: headerAnimation 5s ease infinite;
}
@keyframes headerAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.chat-header-title {
    display: flex;
    align-items: center;
}
.chat-header-title img {
    border-radius: 50%;
    margin-right: 10px;
    width: 40px;
    height: 40px;
    background-color: #ffffff;
    padding: 5px;
    box-sizing: content-box;
    border: 2px solid #ffffff;
    box-shadow: 0 0 10px #ffffff;
}
.chat-header-title h5 {
    font-size: 2.8rem;
    margin: 0;
    font-family: 'Orbitron', sans-serif;
    color: #fff;
    text-shadow:
       0 0 8px  rgba(255,255,255,0.6),
       0 0 16px rgba(255,255,255,0.3); /* <-- This creates the glow effect */
}
#sidebar-toggle {
    margin-right: 10px;
    color: #ffffff;
    font-size: 1.5rem;
}
#sidebar-toggle:hover {
    color: #cccccc;
    text-decoration: none;
}
/* Remove focus outline from the sidebar toggle button */
#sidebar-toggle:focus,
#sidebar-toggle:active {
    outline: none;
    box-shadow: none;
    text-decoration: none;
}
.chat-header-icons {
    margin-left: auto;
    display: flex;
    align-items: center;
}
.chat-header-icons .btn {
    color: #ffffff;
    font-size: 1.5rem;
    margin-left: 10px;
}
.chat-header-icons .btn:hover {
    color: #cccccc;
    text-decoration: none;
}
.chat-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: skewX(-45deg);
    transition: 0.6s;
}
.chat-header:hover::after {
    left: 150%;
}

/****************************************************************************
 * CHAT BOX
 ****************************************************************************/
.chat-box {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    position: relative;         /* keep relative for absolute children */
    background-color: var(--chat-bg-color);
    /* no background-image here */
}

.chat-box::-webkit-scrollbar {
    width: 6px;
}
.chat-box::-webkit-scrollbar-thumb {
    background-color: #888;
    border-radius: 3px;
}
.chat-box::-webkit-scrollbar-thumb:hover {
    background-color: #555;
}
.chat-box .message-row.bot:last-of-type {
    margin-bottom: 50px; /* Increase this value as needed */
}


/****************************************************************************
 * DISCLAIMER: Floating Box
 ****************************************************************************/
.disclaimer-bar {
  background-color: var(--chat-bg-color);
  color: #555;
  border: 1px solid var(--primary-color);
  border-radius: 6px;
  padding: 4px 16px;
  margin: 0 auto 0 auto;

  display: inline-flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  white-space: nowrap;

  font-size: 0.9rem;
  line-height: 1.2;

  position: absolute; /* Ensure it stays on top */
  left: 50%;
  transform: translateX(-50%);
  width: auto; /* Full chat width minus sidebar and padding */
  max-width: 800px; /* Optional: cap the width */
  z-index: 10; /* Keep above other elements */
  pointer-events: none; /* Allow clicks to pass through */
  transition: left 0.4s ease, transform 0.4s ease, opacity 0.6s ease;
  opacity: 0; /* Initially hidden */
}

.disclaimer-bar .disclaimer-icon {
  font-size: 1.2rem;
}

.disclaimer-text { text-align: left; }


/****************************************************************************
 * MESSAGES: USER/BOT BUBBLES
 ****************************************************************************/

/* 1) Message Row Container */
.message-row {
  display: flex;
  margin-bottom: 15px;
}
.message-row.user {
  justify-content: flex-end;
}
.message-row.bot {
  justify-content: flex-start;
}

/* 2) Base .message Bubble */
.message {
  max-width: 90%;
  padding: 12px 18px 8px 18px;
  border-radius: 20px;
  position: relative;
  word-wrap: break-word;
  font-size: 1.2rem;
  background-color: #ecf0f1;
  margin: 0;
  white-space: normal; /* Let text wrap naturally */
}
/* Bot messages are 90% wide, unless they're the "typing" spinner */
.message-row.bot .message:not(.typing) {
  width: 100% !important;
  max-width: none !important;
}
.message-row.bot .message img {
  display: block;
  width: 70%;
  height: auto;
  margin: 0 auto;
}

/* 3) Markdown Headings Within the Bubble */
.message h1 {
font-size: 1.2rem;
margin: 0.5em 0 0.3em;
}
.message h2 {
font-size: 1.15rem;
margin: 0.5em 0 0.3em;
}
.message h3 {
font-size: 1.1rem;
margin: 0.5em 0 0.3em;
}
.message h4,
.message h5,
.message h6 {
font-size: 1.0rem;
margin: 0.5em 0 0.3em;
}

/* 4) Paragraph, Lists, and List Items */
.message p {
  margin: 0.4em 0;
  line-height: 1.4;
}
.message ul,
.message ol {
  margin: 0;
  padding-left: 1.2em;
  list-style-position: outside;
}
.message li {
  margin: 0.5em 0;
  line-height: 1.5;
}

/* 5) Blockquotes */
.message blockquote {
  border-left: 3px solid #ccc;
  padding-left: 0.8em;
  margin-left: 0;
  color: #555;
}

/* 6) Inline Code */
.message code {
  background-color: #f0f0f0;
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-size: 0.95rem;
}

/* 7) User vs. Bot Color Scheme */
.message.user {
  background-color: var(--primary-color); /* e.g., #0070bb */
  color: #ffffff;
}
.message.bot {
  background-color: #ffffff;
  color: #333333;
}

/* 8) Special Handling for Images in Bot Responses 
    (e.g., PDF page previews)
*/
/* Center the container so its images are centered within the bubble */
.message.bot [id^="pdf_pages_"] {
  text-align: center; 
  display: block;  /* or inline-block; either is fine */
  margin: 10px auto;
}

/* Keep the images themselves centered and sized as you like */
.message.bot [id^="pdf_pages_"] img {
  display: block;    /* ensures margin auto works */
  max-width: 80%;    /* scale them down as needed */
  height: auto;
  margin: 0 auto 15px auto; /* 15px bottom margin for spacing */
}

/* 9) Timestamp and Icons (e.g., rating, speak button) inside .message */
.message .timestamp {
  font-size: 0.8em;
  color: #ecf0f1; /* Adjust for user bubble (light color) */
  margin: 5px 0 0 0;
  text-align: right;
}
.message.user .timestamp {
  color: #ecf0f1;
}
.message.bot .timestamp {
  color: #999999;
}

/* Container for the row of timestamp + possible rating/speak icons */
.timestamp-and-icons {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  justify-content: flex-end;
}
.timestamp-and-icons button {
  margin-left: 5px;
}

/****************************************************************************
 * 8) SPEAK BUTTON
 ****************************************************************************/
.speak-btn {
  background-color: var(--primary-color);
  color: #ffffff;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.4s ease, box-shadow 0.3s ease;
}
.speak-btn:hover {
  background-color: var(--secondary-color);
  text-decoration: none;
}
.speak-btn:active {
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.2);
}
.speak-btn i {
  margin: 0 !important;            /* Remove default margin */
  width: 25px;
  font-size: 1.2rem;               /* Adjust icon size as desired */
  line-height: 1;                  /* Prevent extra vertical spacing */
}

/****************************************************************************
 * 9) CHAT INPUT + MIC BUTTON + SEND BUTTON
 ****************************************************************************/
.chat-input {
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-top: 1px solid #ddd;
}
.input-group .form-control {
    background-color: #ffffff;
    color: #333333;
    border: 1px solid #ccc;
    border-radius: 5px 0 0 5px;
}
.input-group .form-control:focus {
    background-color: #ffffff;
    color: #333333;
    box-shadow: none;
    border-color: #2980b9;
}
/* Microphone Button */
.mic-button {
  background-color: var(--primary-color);
  color: #ffffff;
  border-right: 1px solid #ddd;
}
.mic-button i {
  font-size: 1.2rem;
  margin: 0;
}
.mic-button:hover {
  background-color: var(--secondary-color);
  text-decoration: none;
}
.mic-button:active {
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.2);
}
/* Send Button */
.send-button {
  background-color: var(--primary-color);
  color: #ffffff;
  border-radius: 0 5px 5px 0;
  margin-left: 1px;
}
.send-button i {
  font-size: 1.2rem;
  margin: 0;
}
.send-button:hover {
  background-color: var(--secondary-color);
  text-decoration: none;
}
.send-button:active {
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.2);
}

/****************************************************************************
 * 10) TYPING INDICATOR
 ****************************************************************************/
.typing-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 0;
}
.typing-indicator span {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin: 0 3px;
    background-color: var(--primary-color);
    border-radius: 50%;
    animation: typingIndicator 1.4s infinite ease-in-out both;
}
.typing-indicator span:nth-child(1) {
    animation-delay: -0.32s;
}
.typing-indicator span:nth-child(2) {
    animation-delay: -0.16s;
}
@keyframes typingIndicator {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}
.message.typing {
    background-color: #fff;
    color: #fff;
    text-align: center;
}

/****************************************************************************
 * 11) MODEL PARAMETERS / ADVANCED MODE
 ****************************************************************************/
/* ---------- FOR DEVELOPER MODE ---------- */
/* .model-parameters-section {
    margin-bottom: 20px;
}
.model-parameters-section .slider {
    width: 100%;
}
.model-parameters-section label {
    color: #bdc3c7;
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}
.model-parameters-section span {
    color: #ecf0f1;
}

.advanced-mode-section {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
    margin-right: 10px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    position: absolute;
    cursor: pointer;
    background-color: #ccc;
    border-radius: 34px;
    top: 0; left: 0; right: 0; bottom: 0;
    transition: .5s;
}
.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: .5s;
}
input:checked + .toggle-slider {
    background-color: var(--primary-color);
}
input:focus + .toggle-slider {
    box-shadow: 0 0 1px var(--primary-color);
}
input:checked + .toggle-slider:before {
    transform: translateX(22px);
}
.toggle-slider.round {
    border-radius: 34px;
}
.switch-label {
    color: #ffffff;
    font-weight: 500;
    cursor: pointer;
} */
/* ---------------------------------------- */

/****************************************************************************
 * 12) MODAL (E.G. CORRECTION MODAL)
 ****************************************************************************/
.custom-modal-content {
    max-height: 80vh;
    overflow-y: auto;
}
.modal-content {
    background-color: #f0f2f5;
}
.modal-header, .modal-footer {
    border: none;
}
.modal-title {
    font-weight: bold;
}
.modal-body .form-control {
    background-color: #ffffff;
    color: #333333;
    border: 1px solid #ccc;
}
.modal-body .form-control:focus {
    border-color: #2980b9;
    box-shadow: none;
}
.modal-footer .btn-primary {
    background-color: #2980b9;
    border: none;
}
.modal-footer .btn-primary:hover {
    background-color: #1f638a;
}
.modal-footer .btn-secondary {
    background-color: #7f8c8d;
    border: none;
}
.modal-footer .btn-secondary:hover {
    background-color: #5c6b70;
}

/* Details <summary> clickable style */
details summary {
    color: var(--primary-color);
    cursor: pointer;
    font-weight: bold;
    text-decoration: underline;
    margin-bottom: 5px;
}
details summary:hover {
    color: var(--secondary-color);
}

/****************************************************************************
 * 13) PRINT STYLES
 ****************************************************************************/
 @media print {
  /* Hide all elements initially */
  body * {
      visibility: hidden;
  }
  /* Show only the chat transcript (.chat-box + descendants) */
  .chat-box,
  .chat-box * {
      visibility: visible;
  }
  /* Position the chat-box at the top */
  .chat-box {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      overflow: visible;
      padding: 0;
      background-color: var(--chat-bg-color) !important; /* keep this */
  }
  /* Hide sidebar, header, input, etc. */
  .chat-header,
  .chat-sidebar,
  .chat-input {
      display: none;
  }
  /* Keep user query & assistant response together */
  .message-row {
      page-break-inside: avoid;
      margin-bottom: 10px;
  }
  /* Size & style for text in print */
  .message {
      max-width: none;
      width: auto;
      margin: 10px 0;
      font-size: 14px;
  }
  /* Print Title (if used) */
  .print-title {
      visibility: visible;
      text-align: center;
      font-size: 24px;
      margin-bottom: 20px;
  }
  @page {
      size: letter;
      margin: 10mm;
  }
  .message-row.user + .message-row.bot {
      page-break-before: avoid !important;
      page-break-after: avoid !important;
      break-inside: avoid !important; /* For more modern browsers */
  }

  /* Optional: If you still want .pdf-images somewhere else, you can keep it. 
     But if it’s unused now, feel free to remove. */
  .pdf-images {
      page-break-before: always;
      width: 100% !important;
  }
  .pdf-images img {
      max-width: 100% !important;
      height: auto !important;
      display: block;
      margin-bottom: 0px;
      page-break-inside: avoid;
  }

  .dvd-logo {
      display: none !important;
  }

  /* (A) Force the entire PDF reference block (details.pdf-ref) to start on a new page */
  details.pdf-ref {
    page-break-before: always; /* or avoid if you want it contiguous with prior text */
  }

  /* (B) Keep each PDF's "info + first page" on a single sheet */
  .pdf-ref-block {
    page-break-inside: avoid;
    margin-bottom: 1rem;
  }
  .pdf-ref-block .pdf-info {
    page-break-after: avoid;
  }

  /* (C) Force subsequent PDF pages (pdf-page:not(.first-page)) to start on new pages */
  .pdf-ref-block {
    page-break-before: always;
  }
  
  .message-row.bot .message img {
    display: block;
    width: 90%;
    height: auto;
    margin: 0 auto;
  }

  /* (D) If you want rating and speak buttons on separate page: 
     e.g. if they're in .timestamp-and-icons 
  */
  .timestamp-and-icons {
    page-break-inside: avoid; /* keep it with the rest of the message bubble */
  }
}


/****************************************************************************
 * 15) SCROLLBAR STYLING FOR .chat-box
 ****************************************************************************/
.chat-box::-webkit-scrollbar {
    width: 6px;
}
.chat-box::-webkit-scrollbar-thumb {
    background-color: #888;
    border-radius: 3px;
}
.chat-box::-webkit-scrollbar-thumb:hover {
    background-color: #555;
}

/****************************************************************************
 * 16) BOUNCING LOGO
 ****************************************************************************/
.dvd-logo {
    position: absolute;
    width: 240px;               /* adjust as you wish */
    height: 120px;
    background: url("../images/SDNA_Logo_Wide_transparent.png")
                center / contain
                no-repeat;
    pointer-events: none;       /* let clicks pass through */
    z-index: 0;                 /* ensure it’s behind the messages */
    opacity: 0.5;
}

/****************************************************************************
 * 17) FLASH
 ****************************************************************************/
 .flash-overlay {
    position: fixed;
    top: 0; 
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s, visibility 0.4s;
    display: flex;             /* let us center the .flash-popup easily */
    align-items: center;       /* vertically center */
    justify-content: center;   /* horizontally center */
    z-index: 9999;             /* on top of everything else */
  }
  
  .flash-overlay.show {
    opacity: 1;
    visibility: visible;
  }
  
.flash-popup {
    position: relative;
    /* Increased right padding from 40px to 50px to provide extra space for the close button */
    padding: 12px 70px 12px 15px;
    margin-bottom: 20px;
    border: 1px solid var(--alert-border-color, #badbcc);
    border-left-width: 5px;
    border-left-color: var(--alert-border-left-color, #198754);
    background-color: var(--alert-bg-color, #d1e7dd);
    color: var(--alert-text-color, #0f5132);
    border-radius: 4px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    animation: fadeInAlert 0.5s ease-out;
}

@keyframes fadeInAlert {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.flash-popup .close {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-48%);
    font-size: 1.2rem;
    font-weight: bold;
    color: inherit;
    cursor: pointer;
}
  
  /* 
     When we add .show to .flash-overlay,
     we can also make .flash-popup appear with a small scale-up
     (or you can keep it simpler if you prefer).
  */
  .flash-overlay.show .flash-popup {
    transform: scale(1);
  }

/****************************************************************************
 * 18) RATING
 ****************************************************************************/
/* Keep .timestamp-and-icons layout: */
.timestamp-and-icons {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  justify-content: flex-end; /* everything to the right by default */
}

/* Container for the rating buttons (left side) */
.rating-buttons {
  display: flex;
  gap: 6px;
  margin-right: auto;  /* pushes them to the left */
}

/* Each rating button: fixed width/height + centered icon */
.rating-button {
  border: none;
  border-radius: 4px;
  width: 32px;              /* same width/height for consistent sizing */
  height: 32px; 
  display: flex;            /* flex container for centering icon */
  align-items: center;      /* vertically center icon */
  justify-content: center;  /* horizontally center icon */
  background-color: #eee;   /* default gray background */
  color: #333;
  cursor: pointer;
  transition: background-color 0.4s ease, box-shadow 0.3s ease;
}

/* Distinct color variations for each rating */
.rating-bad {
  background-color: #f8d7da; /* pinkish for "bad" */
  color: #721c24;
}
.rating-bad:hover {
  background-color: #f5c6cb;
}

.rating-ok {
  background-color: #fff3cd; /* pale yellow for "ok" */
  color: #856404;
}
.rating-ok:hover {
  background-color: #ffe8a1;
}

.rating-good {
  background-color: #d4edda; /* light green for "good" */
  color: #155724;
}
.rating-good:hover {
  background-color: #c8e6cb;
}

/* Optional: adjust icon size inside button if needed */
.rating-button i {
  margin: 0;            /* remove extra spacing */
  font-size: 1.1rem;    /* slightly bigger icon, if you want */
}

/****************************************************************************
 * 19) USER INFO IN THE HEADER
 ****************************************************************************/
/* Ensure each icon+text item in .chat-header-icons
   has consistent spacing, minimal text decoration, etc. */
.chat-header-icon {
    display: flex;
    align-items: center;
    gap: 8px;             /* space between icon and text */
    color: #fff;          /* inherits white text from header */
    font-size: 1.0rem;    /* base font size for the group */
    margin-left: 1rem;    /* uniform spacing between icons */
    text-decoration: none; 
}

/* No left margin for the very first item
   so they don’t get double‐spaced. */
.chat-header-icon:first-child {
    margin-left: 0;
}

/* If you want the icons themselves a bit bigger: */
.chat-header-icon i {
    font-size: 1.2rem;  /* or 1.3rem, whichever you prefer */
}

/* Specifically style the logout text smaller, normal weight, etc. */
.logout-text {
    font-size: 1.0rem;  /* or 0.8rem if you want even smaller */
    font-weight: normal;
}

/* Optionally, if you want the hyperlink to remain pure white or
   have no underline on hover, etc. */
.logout-link:hover {
    text-decoration: none;
}

/****************************************************************************
 * 20) PAST CONVERSATION SEARCH
 ****************************************************************************/
.conversation-search .input-group-text {
  background-color: #34495e;
  border: 1px solid #2c3e50;
  color: #ecf0f1;
}

.conversation-search .form-control {
  background-color: #2c3e50;
  color: #ecf0f1;
  border: 1px solid #2c3e50;
}

.conversation-search .form-control::placeholder {
  color: #bdc3c7;
}

/****************************************************************************
 * 21) RESPONSIVE DESIGN
 ****************************************************************************/
/* iPad Pro Portrait (e.g. 1024px x 1366px) */
@media only screen and (min-width: 1024px) and (max-width: 1100px) and (orientation: portrait) {
  /* Body Adjustments */ 
  body {
    font-size: 14px; /* Smaller base font size for iPad Pro */
  }

  /* Header Adjustments */
  .chat-header, 
  .chat-input {
    padding: 10px 15px;
  }
  .chat-header-title h5 {
    font-size: 2.3rem;
    line-height: 1.2;
  }
  .chat-header-title img,
  .chat-header-title .bot-avatar {
    width: 30px;
    height: 30px;
    margin-right: 5px;
    padding: 3px;
    border: 1px solid #ffffff;
    box-shadow: 0 0 5px #ffffff;
  }
  .chat-header-icons .btn,
  .chat-header-icons .chat-header-icon,
  .chat-header-icons .logout-text  {
    font-size: 1.0rem;
  }
  .chat-header-icons i {
    font-size: 1.0rem !important;
  }
  #sidebar-toggle {
    display: block;
    font-size: 1.1rem;
  }
  
  /* Sidebar Adjustments */
  .chat-sidebar {
    width: 250px;         /* Narrower sidebar for portrait */
    height: 100vh;
    padding: 15px;
    border-right: 1px solid #ddd;
  }
  .conversation-link {
    font-size: 0.9rem; /* Slightly smaller conversation text */
  }
  .new-chat-button {
    font-size: 1.1rem;
  }
  
  /* Form & input elements */
  .form-control {
    font-size: 1.0rem;
  }

  .message-row.bot .message img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto;
  }
  
}

/* iPad Pro Landscape (e.g. 1366px x 1024px) */
@media only screen and (min-width: 1366px) and (max-width: 1400px) and (orientation: landscape) {
  /* Body Adjustments */ 
  body {
    font-size: 14px; /* Smaller base font size for iPad Pro */
  }

  /* Header Adjustments */
  .chat-header, 
  .chat-input {
    padding: 10px 15px;
  }
  .chat-header-title h5 {
    font-size: 2.3rem;
    line-height: 1.2;
  }
  .chat-header-title img,
  .chat-header-title .bot-avatar {
    width: 36px;
    height: 36px;
    margin-right: 5px;
    padding: 3px;
    border: 1px solid #ffffff;
    box-shadow: 0 0 5px #ffffff;
  }

  .chat-header-icons .btn,
  .chat-header-icons .chat-header-icon,
  .chat-header-icons .logout-text  {
    font-size: 1.0rem;
 
  }
  .chat-header-icons i {
    font-size: 1.0rem !important;
  }
  #sidebar-toggle {
    display: block;
    font-size: 1.1rem;
  }
  
  /* Sidebar Adjustments */
  .chat-sidebar {
    width: 250px;         /* Narrower sidebar for portrait */
    height: 100vh;
    padding: 15px;
    border-right: 1px solid #ddd;
  }
  .conversation-link {
    font-size: 0.9rem; /* Slightly smaller conversation text */
  }
  .new-chat-button {
    font-size: 1.1rem;
  }
  
  /* Form & input elements */
  .form-control {
    font-size: 1.0rem;
  }
  
  .message-row.bot .message img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto;
  }
}

/* iPad Air Portrait (820px × 1180px): */
@media only screen and (min-width: 820px) and (max-width: 1023px) and (orientation: portrait) {
  /* Base font adjustments */
  body {
    font-size: 13px; /* Slightly smaller base font size */
  }
  
  /* Header & Input Adjustments */
  .chat-header,
  .chat-input {
    padding: 10px 15px;
  }
  .chat-header-title h5 {
    font-size: 1.6rem;  /* Reduced header title size */
    line-height: 1.2;
  }
  .chat-header-title img,
  .chat-header-title .bot-avatar {
    width: 28px;
    height: 28px;
    margin-right: 5px;
    padding: 3px;
    border: 1px solid #ffffff;
    box-shadow: 0 0 5px #ffffff;
  }
  .chat-header-icons .btn,
  .chat-header-icons .chat-header-icon,
  .chat-header-icons .logout-text  {
    font-size: 0.9rem;;
    margin-left: 0.05rem;
  }
  .chat-header-icons i {
    font-size: 0.9rem !important;
  }
  #sidebar-toggle {
    display: block;
    font-size: 1.0rem;
  }
  
  /* Sidebar & Main Chat Adjustments */
  .chat-sidebar {
    width: 210px;  /* Adjust sidebar width as needed */
  }
  .conversation-link {
    font-size: 0.90rem;  /* Slightly smaller conversation text */
  }
  .new-chat-button {
    font-size: 1.1rem;
  }
  
  /* Form Elements */
  .form-control {
    font-size: 1.0rem;
  }

  .message-row.bot .message img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto;
  }
}

/* iPad Air Landscape (1180px × 820px): */
@media only screen and (min-width: 1180px) and (max-width: 1365px) and (orientation: landscape) {
  /* Base font adjustments */
  body {
    font-size: 13px;
  }
  
  /* Header & Input Adjustments */
  .chat-header,
  .chat-input {
    padding: 10px 15px;
  }
  .chat-header-title h5 {
    font-size: 2.3rem;
    line-height: 1.2;
  }
  .chat-header-title img,
  .chat-header-title .bot-avatar {
    width: 34px;
    height: 34px;
    margin-right: 8px;
    padding: 4px;
    border: 1px solid #ffffff;
    box-shadow: 0 0 5px #ffffff;
  }

  .chat-header-icons .btn,
  .chat-header-icons .chat-header-icon,
  .chat-header-icons .logout-text  {
    font-size: 1.0rem;;
  }
  .chat-header-icons i {
    font-size: 1.0rem !important;
  }
  #sidebar-toggle {
    display: block;
    font-size: 1.1rem;
  }
  
  /* Sidebar & Main Chat Adjustments */
  .chat-sidebar {
    width: 240px;  /* Adjust sidebar width for landscape */
  }
  .conversation-link {
    font-size: 0.9rem;
  }
  .new-chat-button {
    font-size: 1.1rem;
  }
  
  /* Form Elements */
  .form-control {
    font-size: 1.0rem;
  }

  .message-row.bot .message img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto;
  }
}

/* iPad Mini Portrait (768px × 1024px): */
@media only screen and (min-width: 768px) and (max-width: 819px) and (orientation: portrait) {
  /* Base font adjustments */
  body {
    font-size: 14px;
  }

  /* Header & Input Adjustments */
  .chat-header {
    padding: 10px 5px;
  }
  .chat-input {
    padding: 10px 15px;
  }
  .chat-header-title h5 {
    font-size: 1.55rem;
    line-height: 1.2;
  }
  .chat-header-title img,
  .chat-header-title .bot-avatar {
    width: 20px;
    height: 20px;
    margin-right: 7px;
    padding: 2px;
    border: 1px solid #ffffff;
    box-shadow: 0 0 5px #ffffff;
  }
  .chat-header-icons .btn,
  .chat-header-icons .chat-header-icon,
  .chat-header-icons .logout-text  {
    font-size: 0.80rem;
    margin-left: 0.05rem;
  }
  .chat-header-icons i {
    font-size: 0.80rem !important;
  }
  #sidebar-toggle {
    display: block;
    font-size: 0.9rem;
  }
  
  /* Sidebar & Main Chat Adjustments */
  .chat-sidebar {
    width: 210px;
    padding: 15px;
    border-right: 1px solid #ddd;
  }
  .conversation-link {
    font-size: 0.80rem;
  }
  .new-chat-button {
    font-size: 1rem;
  }

  /* Form Elements */
  .form-control {
    font-size: 0.90rem;
  }

  .message-row.bot .message img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto;
  }
}

/* iPad Mini Landscape (1024px x 768px): */
@media only screen and (min-width: 1024px) and (max-width: 1179px) and (orientation: landscape) {
  /* Base font adjustments */
  body {
    font-size: 14px;
  }

  /* Header & Input Adjustments */
  .chat-header, .chat-input {
    padding: 10px 15px;
  }
  .chat-header-title h5 {
    font-size: 2.3rem;
    line-height: 1.2;
  }
  .chat-header-title img,
  .chat-header-title .bot-avatar {
    width: 28px;
    height: 28px;
    margin-right: 8px;
    padding: 4px;
    border: 1px solid #ffffff;
    box-shadow: 0 0 5px #ffffff;
  }
  .chat-header-icons .btn,
  .chat-header-icons .chat-header-icon,
  .chat-header-icons .logout-text  {
    font-size: 1.0rem;;
  }
  .chat-header-icons i {
    font-size: 1.0rem !important;
  }
  #sidebar-toggle {
    display: block;
    font-size: 1.1rem;
  }
  
  /* Sidebar & Main Chat Adjustments */
  .chat-sidebar {
    width: 220px;
    padding: 15px;
    border-right: 1px solid #ddd;
  }
  .conversation-link {
    font-size: 0.9rem;
  }
  .new-chat-button {
    font-size: 1.1rem;
  }

  /* Form Elements */
  .form-control {
    font-size: 1rem;
  }

  .message-row.bot .message img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto;
  }
}

/* iPhone 14 Pro Max Adjustments (430x932 Portrait) */
@media only screen and (min-width: 430px) and (max-width: 767px) and (orientation: portrait) {
  /* Reduce text sizes for chat box messages and sidebar */
  .chat-box .message {
    font-size: 0.9rem; /* Reduced from 1.2rem */
  }
  .chat-sidebar,
  .chat-sidebar * {
    font-size: 0.7rem; /* Reduced from 0.9rem */
  }
  
  /* Header & Input */
  .chat-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 10px 15px;
  }
  .chat-input {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 10px 15px;
    background-color: #f8f9fa;
  }
  .chat-header {
    padding: 12px 0px;
  }
  .chat-input {
    padding: 10px 5px;
  }
  .chat-header-title h5 {
    font-size: 1.1rem;
    line-height: 1.2;
  }
  .chat-header-title img,
  .chat-header-title .bot-avatar {
    width: 14px;
    height: 14px;
    margin-right: 8px;
    padding: 3px;
    border: 1px solid #ffffff;
    box-shadow: 0 0 5px #ffffff;
  }
  .chat-header-icons .btn,
  .chat-header-icons .chat-header-icon,
  .chat-header-icons .logout-text  {
    font-size: 0.6rem;
    margin-left: 0.01rem;
  }

  .chat-header-icons i {
    font-size: 0.6rem !important;
  }
  
  /* Disclaimer */
  .disclaimer-bar {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    padding: 4px 8px;
    max-width: 90%;
  }
  
  /* Interactive Controls */
  #sidebar-toggle {
    display: block;
    font-size: 0.7rem;
  }
  /* ---------- FOR DEVELOPER MODE ---------- */
  /* .advanced-mode-section {
    font-size: 0.7rem;
  } */
  /* ---------------------------------------- */
  
  /* Sidebar: occupy the space between header and input */
  .chat-sidebar {
    position: fixed;
    top: 60px;           /* start below header */
    bottom: 60px;        /* end above input */
    left: 0;
    width: 50vw !important;
    z-index: 1000;
    background-color: var(--sidebar-bg-color);
    overflow-y: auto;
  }
  .chat-sidebar.sidebar-collapsed {
    width: 0 !important;
    padding: 0 !important;
  }
  
  /* Main Chat: add bottom margin so content isn’t hidden by the fixed input */
  .chat-main {
    margin-top: 55px;
    margin-bottom: 50px;
  }

  .conversation-link {
    font-size: 0.8rem;
  }
  .new-chat-button {
    font-size: 1.0rem;
  }

  /* Form Elements */
  .form-control {
    font-size: 0.9rem;
  }

  .message-row.bot .message img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto;
  }
}

/* iPhone 14 Pro Max Adjustments (932x430 Landscape) */
@media only screen and (min-width: 932px) and (max-width: 1023px) and (orientation: Landscape) {
    /* Reduce text sizes for chat box messages and sidebar */
    .chat-box .message {
      font-size: 1.0rem; /* Reduced from 1.2rem */
    }
    .chat-sidebar,
    .chat-sidebar * {
      font-size: 0.8rem; /* Reduced from 0.9rem */
    }
    
    /* Header & Input */
    .chat-header {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 1000;
      padding: 10px 15px;
    }
    .chat-input {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      z-index: 1000;
      padding: 10px 15px;
      background-color: #f8f9fa;
    }
    .chat-header {
      padding: 10px 15px;
    }
    .chat-input {
      padding: 10px 15px;
    }
    .chat-header-title h5 {
      font-size: 2.2rem;
      line-height: 1.2;
    }
    .chat-header-title img,
    .chat-header-title .bot-avatar {
      width: 28px;
      height: 28px;
      margin-right: 8px;
      padding: 5px;
      border: 1px solid #ffffff;
      box-shadow: 0 0 5px #ffffff;
    }
    .chat-header-icons .btn,
    .chat-header-icons .chat-header-icon,
    .chat-header-icons .logout-text  {
      font-size: 1.0rem;
    }
  
    .chat-header-icons i {
      font-size: 1.0rem !important;
    }
    
    /* Disclaimer */
    .disclaimer-bar {
      position: fixed;
      bottom: 80px;
      left: 50%;
      transform: translateX(-50%);
      font-size: 0.75rem;
      padding: 4px 8px;
      max-width: 90%;
    }
    
    /* Interactive Controls */
    #sidebar-toggle {
      display: block;
      font-size: 1.1rem;
    }
    /* ---------- FOR DEVELOPER MODE ---------- */
    /* .advanced-mode-section {
      font-size: 0.7rem;
    } */
    /* ---------------------------------------- */
    
    /* Sidebar: occupy the space between header and input */
    .chat-sidebar {
      position: fixed;
      top: 60px;           /* start below header */
      bottom: 60px;        /* end above input */
      left: 0;
      width: 30vw !important;
      z-index: 1000;
      background-color: var(--sidebar-bg-color);
      overflow-y: auto;
    }
    .chat-sidebar.sidebar-collapsed {
      width: 0 !important;
      padding: 0 !important;
    }
    
    /* Main Chat: add bottom margin so content isn’t hidden by the fixed input */
    .chat-main {
      margin-top: 60px;
      margin-bottom: 50px;
    }

    .conversation-link {
      font-size: 0.9rem;
    }
    .new-chat-button {
      font-size: 1.1rem;
    }
  
    /* Form Elements */
    .form-control {
      font-size: 1.0rem;
    }
    
    .message-row.bot .message img {
      display: block;
      width: 100%;
      height: auto;
      margin: 0 auto;
    }
  }

/* iPhone 12 Pro and SE Adjustments (390x844 & 375x667 Portrait) */
@media only screen and (min-width: 300px) and (max-width: 429px) and (orientation: portrait) {
  /* Reduce text sizes for chat box messages and sidebar */
  .chat-box .message {
    font-size: 0.9rem; /* Reduced from 1.2rem */
  }
  .chat-sidebar,
  .chat-sidebar * {
    font-size: 0.7rem; /* Reduced from 0.9rem */
  }
  
  /* Header & Input */
  .chat-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 10px 15px;
  }
  .chat-input {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 10px 15px;
    background-color: #f8f9fa;
  }
  .chat-header {
    padding: 13px 0px;
  }
  .chat-input {
    padding: 10px 5px;
  }
  .chat-header-title h5 {
    font-size: 0.8rem;
    line-height: 1.2;
  }
  .chat-header-title img,
  .chat-header-title .bot-avatar {
    width: 12px;
    height: 12px;
    margin-right: 8px;
    padding: 3px;
    border: 1px solid #ffffff;
    box-shadow: 0 0 5px #ffffff;
  }
  .chat-header-icons .btn,
  .chat-header-icons .chat-header-icon,
  .chat-header-icons .logout-text  {
    font-size: 0.5rem;
    margin-left: 0.01rem;
  }

  .chat-header-icons i {
    font-size: 0.5rem !important;
  }
  
  /* Disclaimer */
  .disclaimer-bar {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    padding: 4px 8px;
    max-width: 90%;
  }
  
  /* Interactive Controls */
  #sidebar-toggle {
    display: block;
    font-size: 0.6rem;
  }
  /* ---------- FOR DEVELOPER MODE ---------- */
  /* .advanced-mode-section {
    font-size: 0.7rem;
  } */
  /* ---------------------------------------- */
  
  /* Sidebar: occupy the space between header and input */
  .chat-sidebar {
    position: fixed;
    top: 60px;           /* start below header */
    bottom: 60px;        /* end above input */
    left: 0;
    width: 50vw !important;
    z-index: 1000;
    background-color: var(--sidebar-bg-color);
    overflow-y: auto;
  }
  .chat-sidebar.sidebar-collapsed {
    width: 0 !important;
    padding: 0 !important;
  }
  
  /* Main Chat: add bottom margin so content isn’t hidden by the fixed input */
  .chat-main {
    margin-top: 55px;
    margin-bottom: 50px;
  }

  .conversation-link {
    font-size: 0.8rem;
  }
  .new-chat-button {
    font-size: 1.0rem;
  }

  /* Form Elements */
  .form-control {
    font-size: 0.9rem;
  }

  .message-row.bot .message img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto;
  }
}

/* iPhone 12 Pro and SE Adjustments (844x390 & 667x375 Landscape) */
@media only screen and (min-width: 500px) and (max-width: 931px) and (orientation: landscape) {
    /* Reduce text sizes for chat box messages and sidebar */
    .chat-box .message {
      font-size: 0.8rem; /* Reduced from 1.2rem */
    }
    .chat-sidebar,
    .chat-sidebar * {
      font-size: 0.6rem; /* Reduced from 0.9rem */
    }
    
    /* Header & Input */
    .chat-header {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 1000;
      padding: 10px 15px;
    }
    .chat-input {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      z-index: 1000;
      padding: 10px 15px;
      background-color: #f8f9fa;
    }
    .chat-header {
      padding: 12px 15px;
    }
    .chat-input {
      padding: 10px 15px;
    }
    .chat-header-title h5 {
      font-size: 1.8rem;
      line-height: 1.2;
    }
    .chat-header-title img,
    .chat-header-title .bot-avatar {
      width: 22px;
      height: 22px;
      margin-right: 8px;
      padding: 5px;
      border: 1px solid #ffffff;
      box-shadow: 0 0 5px #ffffff;
    }
    .chat-header-icons .btn,
    .chat-header-icons .chat-header-icon,
    .chat-header-icons .logout-text  {
      font-size: 0.8rem;
    }
  
    .chat-header-icons i {
      font-size: 0.8rem !important;
    }
    
    /* Disclaimer */
    .disclaimer-bar {
      position: fixed;
      bottom: 80px;
      left: 50%;
      transform: translateX(-50%);
      font-size: 0.75rem;
      padding: 4px 8px;
      max-width: 90%;
    }
    
    /* Interactive Controls */
    #sidebar-toggle {
      display: block;
      font-size: 0.9rem;
    }
    /* ---------- FOR DEVELOPER MODE ---------- */
    /* .advanced-mode-section {
      font-size: 0.7rem;
    } */
    /* ---------------------------------------- */
    
    /* Sidebar: occupy the space between header and input */
    .chat-sidebar {
      position: fixed;
      top: 60px;           /* start below header */
      bottom: 60px;        /* end above input */
      left: 0;
      width: 30vw !important;
      z-index: 1000;
      background-color: var(--sidebar-bg-color);
      overflow-y: auto;
    }
    .chat-sidebar.sidebar-collapsed {
      width: 0 !important;
      padding: 0 !important;
    }
    
    /* Main Chat: add bottom margin so content isn’t hidden by the fixed input */
    .chat-main {
      margin-top: 60px;
      margin-bottom: 50px;
    }

    .conversation-link {
      font-size: 0.7rem;
    }
    .new-chat-button {
      font-size: 0.9rem;
    }
  
    /* Form Elements */
    .form-control {
      font-size: 0.8rem;
    }
    
    .message-row.bot .message img {
      display: block;
      width: 100%;
      height: auto;
      margin: 0 auto;
    }
  }