/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* General Body Styling */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  background-color: #f7f7f7;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  min-width: 1000px;
}


/* ✅ Sidebar */
#chat-sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 220px;
  background: #2c2f35;
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 10px;
}

#chat-sidebar button {
  background: #0084ff;
  border: none;
  color: #fff;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 6px;
  cursor: pointer;
}

#chat-sidebar button:hover {
  background: #006bbf;
}

#chat-list {
  list-style: none;
  flex: 1;
  overflow-y: auto;
}

#chat-list li {
  padding: 8px;
  cursor: pointer;
  border-radius: 4px;
  margin-bottom: 5px;
}

#chat-list li:hover,
#chat-list li.active {
  background: #444;
}

/* ✅ Chat Container */
.chat-container {
  background: #fff;
  flex: 1;                /* fill all space to the right of sidebar */
  height: 100vh;          /* full viewport height */
  display: flex;
  flex-direction: column;
  border-left: 1px solid #ddd;
  overflow: hidden;
  margin-left: 220px;
}


/* Chat Header */
.chat-header {
  background-color: #0084ff;
  color: #fff;
  padding: 20px;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 600;
}

/* Content Type Selector */
.content-type-selector {
  background-color: #f7f9fc;
  padding: 10px;
  border-bottom: 1px solid #ddd;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.content-type-selector label {
  font-size: 14px;
  color: #555;
}

.content-type-selector select {
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 14px;
  background-color: #fff;
  outline: none;
}

.content-type-selector select:focus {
  border-color: #0078d4;
}

/* Dynamic Description Banner */
.content-description {
  background-color: #eef4ff;
  color: #333;
  padding: 8px 12px;
  font-size: 14px;
  border-bottom: 1px solid #ddd;
}

/* Chat Messages Section */
.chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: #f0f2f5;
}

/* Chat Messages Styles */
.chat-messages div {
  margin-bottom: 15px;
  max-width: 80%;
  padding: 12px 18px;
  border-radius: 20px;
  line-height: 1.4;
  word-wrap: break-word;
}

/* User Message */
.user-message {
  margin-left: auto;
  background-color: #0084ff;
  color: #fff;
  border-bottom-right-radius: 0;
}

/* Bot Message */
.bot-message {
  margin-right: auto;
  background-color: #e5e5ea;
  color: #000;
  border-bottom-left-radius: 0;
}

/* Code Block Styling */
pre {
  background-color: #282c34;
  color: #abb2bf;
  padding: 15px;
  border-radius: 6px;
  overflow-x: auto;
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  line-height: 1.5;
  margin: 10px 0;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

code {
  background-color: #282c34;
  color: #abb2bf;
  padding: 2px 4px;
  border-radius: 4px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Chat Input Section */
.chat-input {
  display: flex;
  border-top: 2px solid #e0e0e0;
  background-color: #ffffff;
  padding: 10px;
}

.chat-input textarea {
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  resize: none;
  font-size: 16px;
  margin-right: 10px;
  color: #333;
  background-color: #f9f9f9;
  outline: none;
}

.chat-input textarea:focus {
  border-color: #0078d4;
}

.chat-input button {
  margin-left: 10px;
  padding: 0 20px;
  font-size: 1rem;
  background-color: #0084ff;
  color: #fff;
  border: none;
  border-radius: 25px;
  cursor: pointer;
}

.chat-input button:hover {
  background-color: #006bbf;
}

/* File Upload Section */
.file-upload {
  padding: 10px;
  border-top: 1px solid #ddd;
  text-align: center;
  background-color: #f7f9fc;
}

.file-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

#custom-file-button {
  background-color: #2c2f35;
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

#custom-file-button:hover {
  background-color: #3c4048;
}

#selected-files {
  flex-basis: 100%;
  text-align: center;
  margin-top: 5px;
  background-color: #f0f0f0;
  padding: 8px;
  border-radius: 4px;
  font-size: 0.9em;
}

.export-button {
  background-color: #4CAF50;
  color: white;
  border: none;
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 5px;
}

.export-button:hover {
  background-color: #45a049;
}

#typing-indicator {
  display: none;
  align-items: center;
  gap: 4px;
  margin: 10px 0;
  padding: 8px;
}

.dot {
  width: 8px;
  height: 8px;
  background-color: #555;
  border-radius: 50%;
  animation: blink 1.5s infinite;
}

.dot:nth-child(2) {
  animation-delay: 0.2s;
}

.dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes blink {
  0% { opacity: 0.3; }
  50% { opacity: 1; }
  100% { opacity: 0.3; }
}
