/* cyrillic-ext */
@font-face {
  font-family: '__Inter_e8ce0c';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/_next/static/media/55c55f0601d81cf3-s.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: '__Inter_e8ce0c';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/_next/static/media/26a46d62cd723877-s.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
  font-family: '__Inter_e8ce0c';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/_next/static/media/97e0cb1ae144a2a9-s.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
  font-family: '__Inter_e8ce0c';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/_next/static/media/581909926a08bbc8-s.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: '__Inter_e8ce0c';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/_next/static/media/df0a9ae256c0569c-s.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: '__Inter_e8ce0c';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/_next/static/media/8e9860b6e62d6359-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: '__Inter_e8ce0c';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/_next/static/media/e4af272ccee01ff0-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}@font-face {font-family: '__Inter_Fallback_e8ce0c';src: local("Arial");ascent-override: 90.49%;descent-override: 22.56%;line-gap-override: 0.00%;size-adjust: 107.06%
}.__className_e8ce0c {font-family: '__Inter_e8ce0c', '__Inter_Fallback_e8ce0c';font-style: normal
}

/* Base styles */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f0f0f0;
  height: 100vh;
  overflow: hidden;
}

/* Allow scrolling on non-chat pages - override with !important */
body:not(.chat-page-body) {
  overflow: auto !important;
  height: auto !important;
}

.app-container {
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* Allow scrolling on non-chat pages for app container */
body:not(.chat-page-body) .app-container {
  overflow: auto !important;
  height: auto !important;
}

h1 {
  text-align: center;
  color: #333;
}

/* User ID container */
.user-id-container {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-id-container label {
  font-weight: bold;
}

.user-id-container input {
  flex: 1 1;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 16px;
}

/* Document Loader */
.document-loader {
  margin-bottom: 20px;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: #f8f9fa;
}

.load-button {
  background-color: #28a745;
  color: white;
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

.load-button:hover {
  background-color: #218838;
}

.load-button:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
}

.result-container {
  margin-top: 15px;
  padding: 10px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background-color: white;
}

/* Chat container with sidebar layout */
.chat-container-with-sidebar {
  display: flex;
  width: 100%;
  height: calc(100vh - 60px); /* navbar is 60px high */;
  overflow: hidden;
  position: relative;
}

/* Add a CSS variable for the sidebar width that we can use in other calculations */
:root {
  --sidebar-width: 280px;
  --sidebar-collapsed-width: 40px;
}

.chat-main {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: -1;
  transition: margin-left 0.3s ease;
}

.sidebar-open .chat-main {
  margin-left: var(--sidebar-width);
}

.sidebar-closed .chat-main {
  margin-left: var(--sidebar-collapsed-width);
}

.chat-container {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 60px);
  overflow: hidden;
}

/* Header */
.chat-header {
  background: #f9f9f9;
  padding: 16px;
  display: flex;
  flex-shrink: 0;
  justify-content: flex-end;
  height: 64px; /* Match the height of sidebar-header */
  align-items: center;
}

/* Sidebar toggle button in header - only shows when sidebar is closed */
.sidebar-toggle-button {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  background-color: transparent;
  color: #666;
  border: none;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
  margin-right: auto;
  margin-left: 16px;
}

.sidebar-toggle-button:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: #333;
}

.sidebar-toggle-button:active {
  background-color: rgba(0, 0, 0, 0.1);
}

/* New Chat button in header - only shows when sidebar is collapsed */
.header-new-chat-button {
  display: flex;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  background-color: transparent;
  color: #666;
  border: none;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
  margin-left: 12px;
  position: relative;
}

.header-new-chat-button:disabled {
  background-color: transparent;
  color: #ccc;
  cursor: not-allowed;
}

.sidebar-closed .header-new-chat-button {
  display: flex;
  margin-right: auto;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  background-color: transparent;
  color: #666;
  border: none;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
  margin-left: 12px;
  position: relative;
}

.header-new-chat-button:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: #333;
}

.header-new-chat-button:active {
  background-color: rgba(0, 0, 0, 0.1);
}

.header-new-chat-button .plus-icon {
  font-weight: normal;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-header h2 {
  margin: 0;
  color: #333;
}

.error-message {
  color: #d9534f;
  background-color: #f9eaea;
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 15px;
  font-size: 14px;
}

.success-message {
  color: #3c763d;
  background-color: #dff0d8;
  border: 1px solid #d6e9c6;
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 15px;
  font-size: 14px;
}

/* Messages area */
.messages-container {
  flex: 1 1;
  overflow-y: auto;
  padding: 15px;
  background: #f9f9f9;
  scroll-behavior: smooth;
  position: relative;
  -webkit-overflow-scrolling: touch;
}

/* Prevent scrolling when empty state is active */
.messages-container.empty-state-active {
  overflow: hidden;
}

/* Scroll to bottom button */
.scroll-to-bottom-button {
  position: fixed;
  bottom: 100px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #26B4B4;
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: opacity 0.3s ease;
  z-index: 1000;
}

.scroll-to-bottom-button:hover {
  background-color: #149f9f;
  transform: scale(1.1);
}

.empty-state {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  color: #888;
  font-style: italic;
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 15px;
  height: auto;
  overflow-y: visible;
  will-change: transform;
}

/* Message wrappers */
.message-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  margin-bottom: 0px;
}

.message-wrapper.user {
  align-items: flex-end;
}

.message-wrapper.bot,
.message-wrapper.error {
  align-items: flex-start;
}

/* Message bubbles */
.message {
  max-width: 85%;
  padding: 0.5em 0.8em;
  margin: 0;
  border-radius: 8px;
  line-height: 1.4;
  transition: all 0.3s ease;
  width: auto;
}

.message.user {
  background: #0e8a93;
  color: white;
  text-align: right;
}

.message.bot {
  background: transparent;
  color: #333;
  border: none;
  text-align: left;
  max-width: 95%;
}

.message.error {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ffcdd2;
}

.message.streaming {
  background: transparent;
  border: none;
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Source citations */
.sources {
  margin-top: 8px;
  font-size: 0.85em;
  color: #666;
}

.sources h4 {
  margin: 0 0 5px 0;
  font-size: 0.9em;
}

.sources ul {
  margin: 0;
  padding-left: 20px;
}

.processing-time {
  margin-top: 5px;
  font-size: 0.8em;
  color: #888;
  text-align: right;
}

/* Input area - seamlessly integrated */
.chat-input-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: #f9f9f9;
  padding: 15px;
  margin: 0;
  gap: 10px;
}

.input-wrapper {
  position: relative;
  width: 70%;
  max-width: 750px;
  min-width: 400px;
}

.chat-input {
  width: 100%;
  padding: 12px 90px 12px 15px;
  border: 1px solid #ddd;
  border-radius: 25px;
  font-size: 14px;
  max-height: 150px;
  min-height: 24px;
  height: auto;
  overflow-y: auto;
  overflow-x: hidden;
  resize: none;
  word-wrap: break-word;
  white-space: pre-wrap;
  line-height: 1.4;
  transition: height 0.2s ease, border-color 0.2s ease;
  font-family: Arial, sans-serif;
  vertical-align: middle;
  margin: 0;
  background-color: white;
  color: #333;
  box-sizing: border-box;
  /* Hide scrollbar while maintaining scroll functionality */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

/* Hide scrollbar for webkit browsers (Chrome, Safari, etc.) */
.chat-input::-webkit-scrollbar {
  display: none;
}

.chat-input:focus {
  outline: none;
  border-color: #9ca3af;
}

.send-button {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: #999;
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
  font-size: 14px;
  padding: 0;
  z-index: 10;
}

.paperclip-button {
  position: absolute;
  right: 50px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: #999;
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
  font-size: 14px;
  padding: 0;
  z-index: 10;
}

.send-button:hover:not(:disabled) {
  background-color: #777;
}

.send-button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.send-button.stop-mode {
  background-color: #999;
}

.send-button.stop-mode:hover {
  background-color: #777;
}

.paperclip-button:hover:not(:disabled) {
  background-color: #777;
}

.paperclip-button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.send-icon, .stop-icon {
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stop-icon {
  font-size: 14px;
}

.chat-disclaimer {
  text-align: center;
  font-size: 12px;
  color: #666;
  padding: 8px 15px 15px 15px;
  margin: 0;
  line-height: 1.4;
  background-color: #f9f9f9;
}

/* Chat input form */
.chat-input-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 15px;
  background-color: #f5f5f5;
  border-top: 1px solid #ddd;
}

.model-selector {
  display: flex;
  align-items: center;
  gap: 10px;
}

.model-selector label {
  font-weight: bold;
  color: #333;
}

.model-selector select {
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background-color: white;
  flex-grow: 1;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.model-selector select:hover {
  border-color: #9ca3af;
  box-shadow: 0 2px 6px rgba(156, 163, 175, 0.15);
}

.model-selector select:focus {
  outline: none;
  border-color: #9ca3af;
  box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.1);
}

.input-container {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.stop-button, .cancel-edit-button {
  align-self: flex-start;
  height: 40px; /* Match the original button height */
}

/* Markdown formatting for messages */
.message-text {
  word-wrap: break-word;
  line-height: 1.4;
  margin: 0;
  padding: 0;
  font-size: 14px;
}

/* Preserve whitespace only in code blocks */
.message-text pre {
  white-space: pre;
}

.message-text p,
.message-text li,
.message-text table td,
.message-text table th {
  white-space: normal;
}

/* List styling */
.message-text ul, .message-text ol {
  margin: 0;
  padding-left: 2em;
  list-style-position: outside;
}

.message-text ul {
  list-style-type: disc;
}

.message-text ol {
  list-style-type: decimal;
}

.message-text li {
  margin: 0;
  padding: 0;
  display: list-item;
}

.message-text li > p {
  margin: 0;
  display: inline;
}

/* Ensure proper spacing between elements */
.message-text > *:first-child {
  margin-top: 0;
}

.message-text > *:last-child {
  margin-bottom: 0;
}

/* Fix spacing between consecutive lists */
.message-text ul + ul,
.message-text ol + ol,
.message-text ul + ol,
.message-text ol + ul {
  margin-top: 0.3em;
}

/* Adjust spacing for nested lists */
.message-text li > ul,
.message-text li > ol {
  margin-top: 0;
  margin-bottom: 0;
}

/* Heading styling */
.message-text h1, .message-text h2, .message-text h3, .message-text h4 {
  margin: 0.4em 0 0.2em 0;
  line-height: 1.3;
}

.message-text h1:first-child,
.message-text h2:first-child,
.message-text h3:first-child,
.message-text h4:first-child {
  margin-top: 0;
}

/* Paragraph styling */
.message-text p {
  margin: 0 0 0.3em 0;
  line-height: 1.4;
}

.message-text p:last-child {
  margin-bottom: 0;
}

/* Code block styling */
.message-text pre {
  margin: 0.3em 0;
  padding: 0;
  background-color: #f8f9fa;
  border-radius: 8px;
  overflow-x: auto;
  position: relative;
}

.message-text pre code {
  display: block;
  padding: 0.6em;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 13px;
  line-height: 1.4;
  background: none;
  border: none;
  white-space: pre;
  overflow-x: auto;
  color: #24292e;
}

/* Copy button styling */
.copy-button {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 8px;
  background-color: #e9ecef;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  color: #495057;
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0;
}

.copy-button:hover {
  background-color: #dee2e6;
  color: #212529;
}

.message-text pre:hover .copy-button {
  opacity: 1;
}

/* Inline code styling */
.message-text code:not(pre code) {
  background-color: #f8f9fa;
  padding: 0.1em 0.3em;
  border-radius: 3px;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 13px;
  color: #24292e;
}

/* Table styling */
.message-text table {
  border-collapse: collapse;
  width: 100%;
  margin: 0.3em 0;
  font-size: 14px;
}

.message-text th, .message-text td {
  border: 1px solid #ddd;
  padding: 0.3em 0.5em;
  text-align: left;
  line-height: 1.3;
}

.message-text th {
  background-color: #f5f5f5;
  font-weight: bold;
}

.message-text tr:nth-child(even) {
  background-color: #f9f9f9;
}

/* Edit and Copy message buttons */
.edit-message-button,
.copy-message-button {
  padding: 2px 6px;
  background-color: transparent;
  color: #888;
  border: none;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
  height: 20px;
  line-height: 1;
}

.edit-message-button:hover,
.copy-message-button:hover {
  background-color: #f0f0f0;
  color: #555;
}

.copy-message-button {
  margin-right: 8px;
}

.edit-message-button-container {
  display: flex;
  width: 100%;
  margin-top: 4px;
  height: 20px;
}

.message-wrapper.user .edit-message-button-container {
  justify-content: flex-end;
  padding-right: 5px;
}

.message-wrapper.bot .edit-message-button-container,
.message-wrapper.error .edit-message-button-container {
  justify-content: flex-start;
  padding-left: 5px;
}

/* Cancel edit button */
.cancel-edit-button {
  padding: 8px 12px;
  background-color: #f5f5f5;
  color: #666;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.2s;
  font-size: 13px;
  height: 32px;
}

.cancel-edit-button:hover {
  background-color: #e0e0e0;
  color: #333;
}

/* Chat search styling */
.chat-search {
  padding: 8px 10px;
  margin-bottom: 10px;
}

.chat-search-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  background-color: white;
  transition: border-color 0.2s ease;
}

.chat-search-input:focus {
  outline: none;
  border-color: #4285f4;
  box-shadow: 0 0 0 1px rgba(66, 133, 244, 0.2);
}

.chat-search-input::placeholder {
  color: #aaa;
  font-style: italic;
}

/* Chat title editing */
.chat-title-edit {
  width: 100%;
  padding: 4px 6px;
  border: 1px solid #4285f4;
  border-radius: 4px;
  font-size: 14px;
  background-color: white;
  color: #333;
  box-shadow: 0 0 0 1px rgba(66, 133, 244, 0.2);
}

.chat-title-edit:focus {
  outline: none;
}

.chat-title {
  cursor: default;
}

.chat-title:hover {
  text-decoration: underline;
  cursor: pointer;
}

/* Model selector positioning */
.chat-header .custom-dropdown-button {
  margin-left: auto;
  margin-right: 12px;
}

.model-selector {
  width: 200px;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background-color: white;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.model-selector:hover {
  border-color: #9ca3af;
  box-shadow: 0 2px 6px rgba(156, 163, 175, 0.15);
}

.model-selector:focus {
  outline: none;
  border-color: #9ca3af;
  box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.1);
}

.form-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

input, select {
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

/* Override general select styling for model selectors */
select.model-selector,
.model-selector select,
select.model-select {
  font-size: 14px !important;
  border-radius: 6px !important;
}

.user-id-input {
  flex: 1 1;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.model-select {
  width: 200px;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background-color: white;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.model-select:hover {
  border-color: #9ca3af;
  box-shadow: 0 2px 6px rgba(156, 163, 175, 0.15);
}

.model-select:focus {
  outline: none;
  border-color: #9ca3af;
  box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.1);
}

/* Style the dropdown options */
.model-selector option,
.model-selector select option,
.model-select option {
  padding: 10px 14px;
  background-color: white;
  color: #333;
  border: none;
  font-size: 14px;
}

.model-selector option:hover,
.model-selector select option:hover,
.model-select option:hover {
  background-color: #f0f9ff;
  color: #26B4B4;
}

.model-selector option:checked,
.model-selector select option:checked,
.model-select option:checked {
  background-color: #26B4B4;
  color: white;
}

.query-input-container {
  display: flex;
  gap: 10px;
}

.query-input {
  flex: 1 1;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
}

/* Buttons */
button {
  padding: 10px 20px;
  background-color: #26B4B4;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

button:hover {
  background-color: #149f9f;
}

/* Stop button styling */
.stop-button {
  padding: 0 20px;
  background: #e53935;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.2s;
}

.stop-button:hover {
  background: #c62828;
}

/* Responsive adjustments */
/* Comprehensive Mobile Responsive Styles */
@media (max-width: 768px) {
  /* Chat container adjustments */
  .chat-container-with-sidebar {
    height: calc(100vh - 56px);
  }
  
  .chat-container {
    height: calc(100vh - 56px);
  }

  /* Header adjustments */
  .chat-header {
    padding: 12px 16px;
    height: 56px;
  }

  .chat-header h2 {
    font-size: 16px;
  }

  /* Message styling for mobile */
  .messages-container {
    padding: 12px;
  }

  .message {
    max-width: 85%;
    padding: 0.6em 0.9em;
    font-size: 15px;
    line-height: 1.5;
  }
  
  .message.bot {
    max-width: 95%;
  }

  .message.user {
    font-size: 15px;
  }

  /* Message actions for touch */
  .edit-message-button,
  .copy-message-button {
    padding: 8px;
    font-size: 14px;
    min-width: 36px;
    min-height: 36px;
  }

  /* Form controls */
  .form-controls {
    flex-direction: column;
    gap: 12px;
  }
  
  .model-select {
    width: 100%;
    padding: 12px;
    font-size: 15px;
  }

  /* User info section */
  .user-info {
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
  }

  .user-actions {
    gap: 4px;
  }

  .upload-doc-button, .logout-button, .share-button,
  .manage-documents-button {
    padding: 8px 12px;
    font-size: 15px;
    min-height: 40px;
  }

  /* Authentication forms */
  .auth-container {
    margin: 20px auto;
    padding: 16px;
    max-width: 350px;
  }

  .form-group input {
    padding: 12px;
    font-size: 15px;
  }

  .auth-container button {
    padding: 12px;
    font-size: 15px;
  }

  /* Upload progress adjustments */
  .upload-progress-overlay {
    top: 60px;
    right: 15px;
    left: 15px;
    max-width: none;
  }

  /* Scroll to bottom button */
  .scroll-to-bottom-button {
    bottom: 120px;
    right: 15px;
    width: 44px;
    height: 44px;
    font-size: 22px;
  }

  /* Drag overlay improvements */
  .drag-overlay-content {
    padding: 1.5rem;
    margin: 1rem;
  }

  .drag-overlay-content .drag-icon {
    font-size: 40px;
  }

  .drag-overlay-content h3 {
    font-size: 1.1rem;
  }

  .drag-overlay-content p {
    font-size: 0.9rem;
  }
}

@media (max-width: 640px) {
  /* Further mobile optimizations */
  .chat-container-with-sidebar {
    height: calc(100vh - 52px);
  }
  
  .chat-container {
    height: calc(100vh - 52px);
  }

  .chat-header {
    padding: 10px 12px;
    height: 52px;
  }

  .chat-header h2 {
    font-size: 15px;
  }

  .messages-container {
    padding: 10px;
  }

  .message {
    max-width: 90%;
    padding: 0.5em 0.8em;
    font-size: 14px;
  }
  
  .message.bot {
    max-width: 98%;
  }

  .message.user {
    font-size: 14px;
  }

  /* Smaller touch targets but still accessible */
  .edit-message-button,
  .copy-message-button {
    padding: 6px;
    font-size: 13px;
    min-width: 32px;
    min-height: 32px;
  }

  .model-select {
    padding: 10px;
    font-size: 14px;
  }

  .upload-doc-button, .logout-button, .share-button,
  .manage-documents-button {
    padding: 6px 10px;
    font-size: 14px;
    min-height: 36px;
  }

  .auth-container {
    margin: 15px auto;
    padding: 14px;
    max-width: 320px;
  }

  .form-group input {
    padding: 10px;
    font-size: 14px;
  }

  .auth-container button {
    padding: 10px;
    font-size: 14px;
  }

  .scroll-to-bottom-button {
    bottom: 100px;
    right: 12px;
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .drag-overlay-content {
    padding: 1.2rem;
    margin: 0.8rem;
  }

  .drag-overlay-content .drag-icon {
    font-size: 36px;
  }

  .drag-overlay-content h3 {
    font-size: 1rem;
  }

  .drag-overlay-content p {
    font-size: 0.85rem;
  }

  .chat-disclaimer {
    padding: 18px 12px 22px 12px;
    margin: 10px 0;
  }
}

@media (max-width: 480px) {
  /* Small mobile devices */
  .chat-container-with-sidebar {
    height: calc(100vh - 48px);
  }
  
  .chat-container {
    height: calc(100vh - 48px);
  }

  .chat-header {
    padding: 8px 10px;
    height: 48px;
  }

  .chat-header h2 {
    font-size: 14px;
  }

  .messages-container {
    padding: 8px;
  }

  .message {
    max-width: 95%;
    padding: 0.4em 0.7em;
    font-size: 13px;
    line-height: 1.4;
  }
  
  .message.bot {
    max-width: 100%;
  }

  .message.user {
    font-size: 13px;
  }

  .edit-message-button,
  .copy-message-button {
    padding: 4px;
    font-size: 12px;
    min-width: 28px;
    min-height: 28px;
  }

  .model-select {
    padding: 8px;
    font-size: 13px;
  }

  .upload-doc-button, .logout-button, .share-button,
  .manage-documents-button {
    padding: 4px 8px;
    font-size: 13px;
    min-height: 32px;
  }

  .auth-container {
    margin: 10px auto;
    padding: 12px;
    max-width: 290px;
  }

  .auth-container h2 {
    font-size: 18px;
    margin-bottom: 16px;
  }

  .form-group input {
    padding: 8px;
    font-size: 13px;
  }

  .auth-container button {
    padding: 8px;
    font-size: 13px;
  }

  .scroll-to-bottom-button {
    bottom: 90px;
    right: 10px;
    width: 36px;
    height: 36px;
    font-size: 18px;
  }

  .upload-progress-overlay {
    top: 50px;
    right: 10px;
    left: 10px;
  }

  .upload-progress-content {
    padding: 0.8rem;
  }

  .upload-progress-content h4 {
    font-size: 0.9rem;
  }

  .file-progress-item .file-name {
    font-size: 0.8rem;
  }

  .progress-text {
    font-size: 0.7rem;
  }

  .drag-overlay-content {
    padding: 1rem;
    margin: 0.5rem;
  }

  .drag-overlay-content .drag-icon {
    font-size: 32px;
  }

  .drag-overlay-content h3 {
    font-size: 0.9rem;
  }

  .drag-overlay-content p {
    font-size: 0.8rem;
  }

  /* Typography adjustments */
  .message-text h1, .message-text h2, .message-text h3, .message-text h4 {
    font-size: 1rem;
    margin: 0.5rem 0;
  }

  .message-text p {
    margin: 0.3rem 0;
  }

  .sources {
    font-size: 0.8em;
  }

  .processing-time {
    font-size: 0.7em;
  }

  .model-tag {
    font-size: 0.7em;
    padding: 1px 4px;
  }

  .error-message,
  .success-message {
    font-size: 12px;
    padding: 8px;
    margin-bottom: 10px;
  }

  .upload-status {
    font-size: 0.8rem;
    padding: 0.5rem 0.8rem;
  }

  .chat-disclaimer {
    padding: 16px 15px 20px 15px;
    margin: 8px 0;
    font-size: 11px;
  }
}

@media (max-width: 360px) {
  /* Very small devices */
  .message {
    padding: 0.3em 0.6em;
    font-size: 12px;
  }

  .message.user,
  .message.bot {
    font-size: 12px;
  }

  .edit-message-button,
  .copy-message-button {
    padding: 2px;
    font-size: 10px;
    min-width: 24px;
    min-height: 24px;
  }

  .auth-container {
    margin: 8px auto;
    padding: 10px;
    max-width: 270px;
  }

  .scroll-to-bottom-button {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .drag-overlay-content {
    padding: 0.8rem;
    margin: 0.3rem;
  }

  .drag-overlay-content .drag-icon {
    font-size: 28px;
  }

  .drag-overlay-content h3 {
    font-size: 0.8rem;
  }

  .drag-overlay-content p {
    font-size: 0.75rem;
  }

  .chat-disclaimer {
    padding: 20px 10px 24px 10px;
    margin: 12px 0;
    font-size: 10px;
  }
}

/* Add these styles to your index.css file */

.error-help {
  font-size: 0.8em;
  color: #666;
  margin-top: 5px;
}

.result-container {
  margin-top: 15px;
  padding: 10px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background-color: white;
}

/* Add these styles to your index.css file */

.message-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 0.8em;
  color: #666;
}

.model-tag {
  background-color: #e8f0fe;
  color: #1967d2;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.8em;
  font-weight: 500;
}

.model-select {
  width: 200px; /* Make it wider to accommodate longer model names */
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: white;
}

/* Add provider-specific styling */
.model-tag[data-provider="openai"] {
  background-color: #e7f5ea;
  color: #28a745;
}

.model-tag[data-provider="anthropic"] {
  background-color: #e7eff7;
  color: #0066cc;
}

.model-tag[data-provider="gemini"] {
  background-color: #fce8e6;
  color: #ea4335;
}

.model-tag[data-provider="deepseek"] {
  background-color: #fff0e6;
  color: #ff7324;
}

.model-tag[data-provider="grok"] {
  background-color: #f5e6ff;
  color: #8324ff;
}

.model-tag[data-provider="qwen"] {
  background-color: #e6f9ff;
  color: #00a3cc;
}

.model-tag[data-provider="cohere"] {
  background-color: #e6f0ff;
  color: #0047cc;
}

/* Add styles for authentication components */
.auth-container {
  max-width: 400px;
  margin: 40px auto;
  padding: 20px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.auth-container h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #333;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  background-color: white;
  color: #333;
  box-sizing: border-box;
}

.auth-container button {
  width: 100%;
  padding: 10px;
  background-color: #26B4B4;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  margin-top: 10px;
}

.auth-container button:hover {
  background-color: #357ab8;
}

.auth-container button:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

.auth-toggle {
  margin-top: 20px;
  text-align: center;
}

.auth-toggle button {
  background: none;
  border: none;
  color: #4a90e2;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  margin: 0;
  width: auto;
}

.auth-toggle button:hover {
  text-decoration: underline;
  background: none;
}

.loading-auth {
  text-align: center;
  margin-top: 100px;
  font-size: 18px;
  color: #666;
}

.user-info {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  font-size: 14px;
}

.user-actions {
  display: flex;
  gap: 0;
}

.upload-doc-button, .logout-button, .share-button {
  padding: 6px 8px;
  color: #666;
  background-color: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
  height: 32px;
  margin-right: 12px;
}

.upload-doc-button:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: #333;
}

.share-button:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: #333;
}

.share-button:disabled {
  background-color: transparent;
  color: #ccc;
  cursor: not-allowed;
}

.logout-button:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: #333;
}

/* Typing indicator for loading state */
.typing-indicator {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 10px;
}

.typing-indicator span {
  height: 8px;
  width: 8px;
  background-color: #3498db;
  border-radius: 50%;
  display: inline-block;
  margin-right: 5px;
  animation: typing-bounce 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) {
  animation-delay: 0s;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
  margin-right: 0;
}

@keyframes typing-bounce {
  0%, 80%, 100% {
    transform: scale(0.5);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.manage-documents-button {
  padding: 6px 8px;
  background-color: transparent;
  color: #666;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
  height: 32px;
  margin-right: 16px;
  text-decoration: none;
}

.manage-documents-button:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: #333;
}

/* Drag and Drop Styles */
.chat-container.drag-active {
  background-color: #f0f8ff;
  border: 2px dashed #26B4B4;
  position: relative;
}

.drag-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(38, 180, 180, 0.1);
  -webkit-backdrop-filter: blur(2px);
          backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  pointer-events: none;
}

.drag-overlay-content {
  text-align: center;
  padding: 2rem;
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  border: 2px dashed #26B4B4;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.drag-overlay-content .drag-icon {
  font-size: 48px;
  margin-bottom: 1rem;
  color: #26B4B4;
}

.drag-overlay-content h3 {
  margin: 0 0 0.5rem 0;
  color: #333;
  font-size: 1.2rem;
}

.drag-overlay-content p {
  margin: 0;
  color: #666;
  font-size: 0.9rem;
  max-width: 400px;
}

/* Upload Status Styles */
.upload-status {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin: 0.5rem 0;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
}

.upload-status.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.upload-status.partial {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.upload-status.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Upload Progress Overlay */
.upload-progress-overlay {
  position: fixed;
  top: 80px;
  right: 20px;
  max-width: 400px;
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 1001;
  overflow: hidden;
}

.upload-progress-content {
  padding: 1rem;
}

.upload-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.upload-progress-content h4 {
  margin: 0;
  color: #333;
  font-size: 1rem;
}

.cancel-upload-button {
  background: none;
  border: none;
  font-size: 18px;
  color: #666;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 3px;
  transition: all 0.2s ease;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.cancel-upload-button:hover {
  background-color: #f5f5f5;
  color: #333;
}

.cancel-upload-button:active {
  background-color: #e0e0e0;
}

.file-progress-item {
  margin-bottom: 1rem;
}

.file-progress-item:last-child {
  margin-bottom: 0;
}

.file-progress-item .file-name {
  font-size: 0.85rem;
  color: #333;
  margin-bottom: 0.5rem;
  word-break: break-all;
}

.progress-bar-container {
  position: relative;
  height: 20px;
  background-color: #f0f0f0;
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background-color: #26B4B4;
  border-radius: 10px;
  transition: width 0.3s ease;
  position: relative;
}

.progress-bar-container.success .progress-bar {
  background-color: #28a745;
}

.progress-bar-container.error .progress-bar {
  background-color: #dc3545;
}

.progress-bar-container.cancelled .progress-bar {
  background-color: #6c757d;
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.75rem;
  font-weight: bold;
  color: white;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

.progress-bar-container.success .progress-text {
  color: white;
}

.progress-bar-container.error .progress-text {
  color: white;
}

.error-text {
  font-size: 0.75rem;
  color: #dc3545;
  margin-top: 0.25rem;
  word-break: break-word;
}
/* Reset some default styles */
* {
    box-sizing: border-box;
  }
  
  body, html {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
  }
  
  .App {
    text-align: center;
  }
  
  .App-logo {
    height: 40vmin;
    pointer-events: none;
  }
  
  @media (prefers-reduced-motion: no-preference) {
    .App-logo {
      animation: App-logo-spin infinite 20s linear;
    }
  }
  
  .App-header {
    background-color: #26B4B4;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: calc(10px + 2vmin);
    color: white;
  }
  
  .App-link {
    color: #26B4B4;
  }
  
  @keyframes App-logo-spin {
    from {
      transform: rotate(0deg);
    }
    to {
      transform: rotate(360deg);
    }
  }
  
  .app-container {
    height: 100vh;
    width: 100vw;
    overflow: hidden;
  }
  
  .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #888;
    text-align: center;
    padding: 2rem;
  }
  
  .empty-state.welcome {
    background-color: #f9f9f9;
    border-radius: 10px;
    margin: 2rem;
    padding: 3rem;
  }
  
  .empty-state.welcome h3 {
    margin-bottom: 1rem;
    color: #333;
  }
  
  .empty-state.welcome p {
    margin-bottom: 2rem;
    max-width: 400px;
  }
  
  .start-chat-button {
    background-color: #26B4B4;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
  }
  
  .start-chat-button:hover {
    background-color: #149f9f;
  }
  
  .login-button {
    background-color: #26B4B4; 
    color: white;
    border: none;
  
    border-radius: 4px;
    cursor: pointer;
  }
  
  .logout-button:hover {
    background-color: #149f9f;
  }

  /* Authentication Form Styles */
  .auth-container {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  }

  .auth-container h2 {
    color: #333;
    margin-bottom: 1.5rem;
    text-align: center;
  }

  .form-group {
    margin-bottom: 1rem;
    text-align: left;
  }

  .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
  }

  .form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    background-color: white;
    color: #333;
    transition: border-color 0.2s;
    box-sizing: border-box;
  }

  .form-group input:focus {
    outline: none;
    border-color: #9ca3af;
    box-shadow: 0 0 0 2px rgba(156, 163, 175, 0.2);
  }

  /* Password Requirements Styles */
  .password-requirements {
    margin: 1rem 0;
    padding: 1rem;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
  }

  .password-requirements h4 {
    margin: 0 0 0.75rem 0;
    color: #333;
    font-size: 0.9rem;
    font-weight: 600;
  }

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

  .requirements-list li {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    transition: color 0.2s ease;
  }

  .requirements-list li:last-child {
    margin-bottom: 0;
  }

  .requirement-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 0.5rem;
    text-align: center;
    font-weight: bold;
    font-size: 0.75rem;
    border-radius: 50%;
    line-height: 16px;
  }

  .requirements-list li.valid {
    color: #28a745;
  }

  .requirements-list li.valid .requirement-icon {
    background-color: #28a745;
    color: white;
  }

  .requirements-list li.invalid {
    color: #666;
  }

  .requirements-list li.invalid .requirement-icon {
    background-color: #dc3545;
    color: white;
  }

  /* Password Error Messages */
  .password-errors {
    margin: 1rem 0;
    padding: 1rem;
    background-color: #fff5f5;
    border: 1px solid #feb2b2;
    border-radius: 6px;
  }

  .password-errors h4 {
    margin: 0 0 0.75rem 0;
    color: #c53030;
    font-size: 0.9rem;
    font-weight: 600;
  }

  .password-errors ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .password-error {
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: #c53030;
    position: relative;
    padding-left: 1rem;
  }

  .password-error:before {
    content: "•";
    position: absolute;
    left: 0;
    font-weight: bold;
  }

  .password-error:last-child {
    margin-bottom: 0;
  }

  /* Success and Error Messages */
  .success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 0.75rem;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
  }

  .error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 0.75rem;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
  }

  /* Auth Toggle Section */
  .auth-toggle {
    margin-top: 1.5rem;
    text-align: center;
  }

  .auth-toggle p {
    margin-bottom: 0.75rem;
    color: #666;
    font-size: 0.9rem;
  }
