/* Chat Container */
.chat-container {
  display: flex;
  flex-direction: column;
  /* No fixed height */
}

/* Chat History */
.app-chat-history {
  display: flex;
  flex-direction: column;
  /* Remove flex-grow */
}

/* Chat Header */
.chat-history-header {
  /* Existing styles */
}

/* Chat Body */
.chat-history-body {
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1rem;
  max-height: 400px; /* Adjust as needed */
}

/* Chat Footer */
.chat-history-footer {
  /* Existing styles */
}

/* Message Styles */
.chat-message {
  margin-bottom: 1rem;
}

.chat-message-left .chat-message-wrapper {
  text-align: left;
}

.chat-message-right .chat-message-wrapper {
  text-align: right;
}

.chat-message-sender {
  font-weight: bold;
  margin-bottom: 0.25rem;
}

.chat-message-text {
  padding: 0.5rem;
  border-radius: 0.5rem;
  display: inline-block;
  max-width: 80%;
  word-wrap: break-word;
  font-size: 1rem;
  line-height: 1.5;
}

/* Left-side messages */
.chat-message-left .chat-message-text {
  background-color: #f1f1f1;
  color: #000;
}

.chat-message-left .chat-message-text a {
  background-color: #f1f1f1;
  color: #000;
}

.chat-message-left .chat-message-text a:hover {
  background-color: #f1f1f1;
  color: #000;
  text-decoration: underline;
}

/* Right-side messages */
.chat-message-right .chat-message-text {
  background-color: #d1e7dd;
  color: #fff;
}


/* Custom styles for chat message links */
.chat-message-text a {
  color: #ffffff; /* Bootstrap's primary color */
  text-decoration: none;
}

.chat-message-text a:hover {
  color: #ffffff; /* Darker shade on hover */
  text-decoration: underline;
}

.chat-message-text a i {
  margin-right: 5px; /* Space between icon and text */
  color: inherit; /* Icon inherits the link color */
}

/* Ensure the paragraph wrapping the link has proper margins */
.chat-message-text p {
  margin-bottom: 0.5rem;
}

/* styles.css */

/* File Preview Container */
.file-preview {
  display: flex;
  align-items: center;
  background-color: #f8f9fa; /* Light gray background */
  border: 1px solid #ced4da; /* Gray border */
  padding: 5px 10px;
  border-radius: 4px;
  margin-bottom: 5px;
}

.file-preview.hidden {
  display: none;
}

#file-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9em;
}

.remove-file-button {
  background: none;
  border: none;
  cursor: pointer;
  color: #dc3545; /* Bootstrap's danger color */
  font-size: 1em;
}

.remove-file-button:hover {
  color: #bd2130;
}

/* Attachment Button Styling */
.attach-button {
  cursor: pointer;
  color: #6c757d; /* Bootstrap's secondary color */
  font-size: 1.2em;
}

.attach-button:hover {
  color: #495057; /* Darker gray on hover */
}

/* Message Input Styling */
.message-input {
  border: none;
  box-shadow: none;
  outline: none;
}

/* Send Button Styling */
.send-msg-btn {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Optional: Adjust the height of the input group to match desired aesthetics */
.input-group .form-control {
  height: 40px;
}

.input-group .btn {
  height: 40px;
}

.file-preview {
  background-color: #f8f9fa;
  transition: all 0.3s ease;
  padding: 8px 12px;
  margin-bottom: 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.file-preview.hidden {
  display: none;
}
.file-preview #file-name {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 8px;
}
.remove-file-button {
  background: none;
  border: none;
  color: #dc3545;
  cursor: pointer;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}
.remove-file-button:hover {
  color: #bb2d3b;
}
