/* VENDOR VARIABLES*/
:root {
  /* Fonts */
  --chat-default-font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;

  /* Spacing Scale */
  --chat-spacing-xs: 0.25rem;
  --chat-spacing-sm: 0.5rem;
  --chat-spacing-md: 1rem;
  --chat-spacing-lg: 1.5rem;
  --chat-spacing-xl: 2rem;

  /* Border Radius */
  --chat-radius-sm: 0.25rem;
  --chat-radius-md: 0.375rem;
  --chat-radius-lg: 0.5rem;
  --chat-radius-xl: 0.75rem;
  --chat-radius-full: 9999px;

  /* Standard Bootstrap-like mappings used in Chat component */
  --chat-bs-border-radius: var(--chat-radius-md);
  --chat-bs-border-radius-lg: var(--chat-radius-lg);

  /* Shadows */
  --chat-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.04);
  --chat-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07);
  --chat-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08);

  /* Transitions */
  --chat-transition-fast: 150ms ease;
  --chat-transition-base: 200ms ease;

  /* Global Colors - Light Mode */
  --chat-background-color: #eeeeef;
  --chat-default-color: #2d3748;
  --chat-heading-color: #1a202c;
  --chat-accent-color: #5b8def;
  --chat-surface-color: #ffffff;
  --chat-contrast-color: #ffffff;
  --chat-muted-color: #718096;
  --chat-light-color: #a0aec0;
  --chat-border-color: #d9dfe6;
  --chat-border-color-light: #edf2f7;

  /* Status colors */
  --chat-success-color: #0a863e;
  --chat-warning-color: #ecc94b;
  --chat-danger-color: #f56565;
  --chat-info-color: #4fd1c5;
}

:root [data-bs-theme=light] {
    --chat-background-color: #0f172a;
    --chat-bs-border-radius-lg: 0.5rem;
    --chat-bs-border-radius: 0.375rem;
}


/* Dark Mode Palette Overrides */
[data-theme=dark] {
  --chat-background-color: #0f172a;
  --chat-default-color: #e2e8f0;
  --chat-heading-color: #f1f5f9;
  --chat-accent-color: #7ba4f7;
  --chat-surface-color: #1e293b;
  --chat-muted-color: #94a3b8;
  --chat-light-color: #64748b;
  --chat-border-color: #2d3a4e;
  --chat-border-color-light: #1e293b;
}

/* BASE UTILITIES REQUIRED FOR CHAT */
body {
  font-family: var(--chat-default-font);
  color: var(--chat-default-color);
}

.form-control {
  border-radius: var(--chat-radius-md);
  border: 1px solid var(--chat-border-color);
  padding: var(--chat-spacing-sm) var(--chat-spacing-md);
  background-color: var(--chat-surface-color);
  color: var(--chat-default-color);
  transition: border-color var(--chat-transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--chat-accent-color);
}

.btn {
  border-radius: var(--chat-radius-md);
  transition: all var(--chat-transition-fast);
  font-weight: 500;
}

.badge {
  font-weight: 600;
  border-radius: var(--chat-radius-sm);
  padding: 0.25em 0.5em;
}

/* Webkit Scrollbar Styling from template */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--chat-background-color);
}
::-webkit-scrollbar-thumb {
  background: var(--chat-light-color);
  border-radius: var(--chat-radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--chat-muted-color);
}

/* VENDOR STYLES (Your extracted Chat styles) */
.chat-container {
  display: flex;
  /* min-height: calc(100vh - 200px); */
  background: var(--chat-surface-color);
  border-radius: var(--chat-bs-border-radius-lg);
  border: 1px solid var(--chat-border-color);
  overflow: hidden;
}

.chat-sidebar {
  width: 320px;
  border-right: 1px solid var(--chat-border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.chat-sidebar-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--chat-border-color);
}

.chat-sidebar-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--chat-heading-color);
  margin-bottom: 1rem;
}

.chat-search {
  position: relative;
}

.chat-search .form-control {
  padding-left: 2.5rem;
  background: var(--chat-background-color);
  border-color: var(--chat-border-color);
}

.chat-search .form-control:focus {
  background: var(--chat-surface-color);
}

.chat-search-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--chat-muted-color);
}

.chat-tabs {
  display: flex;
  padding: 0.5rem 1.25rem;
  gap: 0.5rem;
  border-bottom: 1px solid var(--chat-border-color);
}

.chat-tab {
  flex: 1;
  padding: 0.5rem;
  border: none;
  background: none;
  color: var(--chat-muted-color);
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: var(--chat-bs-border-radius);
  cursor: pointer;
  transition: all 0.2s;
}

.chat-tab:hover {
  background: var(--chat-background-color);
  color: var(--chat-default-color);
}

.chat-tab.active {
  background: color-mix(in srgb, var(--chat-accent-color), transparent 90%);
  color: var(--chat-accent-color);
}

.chat-tab .badge {
  margin-left: 0.25rem;
  font-size: 0.6875rem;
}

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

.chat-list::-webkit-scrollbar {
  width: 4px;
}

.chat-list::-webkit-scrollbar-thumb {
  background: var(--chat-border-color);
  border-radius: 4px;
}

.chat-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  cursor: pointer;
  transition: background 0.2s;
  border-left: 3px solid transparent;
}

.chat-item:hover {
  background: var(--chat-background-color);
}

.chat-item.active {
  background: color-mix(in srgb, var(--chat-accent-color), transparent 95%);
  border-left-color: var(--chat-accent-color);
}

.chat-item-avatar {
  position: relative;
  flex-shrink: 0;
}

.chat-item-avatar img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  -o-object-fit: cover;
  object-fit: cover;
}

.chat-item-status {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--chat-surface-color);
}

.chat-item-status.online {
  background: var(--chat-success-color);
}

.chat-item-status.away {
  background: var(--chat-warning-color);
}

.chat-item-status.offline {
  background: var(--chat-muted-color);
}

.chat-item-status.busy {
  background: var(--chat-danger-color);
}

.chat-item-content {
  flex: 1;
  min-width: 0;
}

.chat-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.chat-item-name {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--chat-heading-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-item-time {
  font-size: 0.75rem;
  color: var(--chat-muted-color);
  flex-shrink: 0;
}

.chat-item-message {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chat-item-message-text {
  font-size: 0.8125rem;
  color: var(--chat-muted-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.chat-item-unread {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--chat-accent-color);
  color: var(--chat-contrast-color);
  font-size: 0.6875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--chat-border-color);
}

.chat-header-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chat-header-avatar {
  position: relative;
}

.chat-header-avatar img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  -o-object-fit: cover;
  object-fit: cover;
}

.chat-header-info h5 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--chat-heading-color);
  margin: 0 0 0.125rem 0;
}

.chat-header-info span {
  font-size: 0.8125rem;
  color: var(--chat-success-color);
}

.chat-header-actions {
  display: flex;
  gap: 0.5rem;
}

.chat-header-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--chat-background-color);
  color: var(--chat-muted-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.chat-header-btn:hover {
  background: var(--chat-border-color);
  color: var(--chat-default-color);
}

.chat-messages {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: var(--chat-border-color);
  border-radius: 4px;
}

.message-group {
  display: flex;
  gap: 0.75rem;
}

.message-group.sent {
  flex-direction: row-reverse;
}

.message-group.sent .message-content {
  align-items: flex-end;
}

.message-group.sent .message-bubble {
  background: var(--chat-accent-color);
  color: var(--chat-contrast-color);
  border-bottom-right-radius: 0.25rem;
}

.message-group.received .message-bubble {
  border-bottom-left-radius: 0.25rem;
}

.message-avatar img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  -o-object-fit: cover;
  object-fit: cover;
}

.message-content {
  max-width: 70%;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.message-bubble {
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  background: var(--chat-background-color);
  color: var(--chat-default-color);
  font-size: 0.9375rem;
  line-height: 1.5;
  word-wrap: break-word;
}

.message-time {
  font-size: 0.6875rem;
  color: var(--chat-muted-color);
  padding: 0 0.5rem;
}

.message-status {
  font-size: 0.75rem;
  color: var(--chat-muted-color);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.message-status.seen {
  color: var(--chat-accent-color);
}

.message-date-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0.5rem 0;
}

.message-date-divider::before,
.message-date-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--chat-border-color);
}

.message-date-divider span {
  font-size: 0.75rem;
  color: var(--chat-muted-color);
  white-space: nowrap;
}

.message-image {
  max-width: 280px;
  border-radius: 0.75rem;
  overflow: hidden;
  margin-top: 0.25rem;
}

.message-image img {
  width: 100%;
  display: block;
}

.message-file {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--chat-background-color);
  border-radius: 0.75rem;
  margin-top: 0.25rem;
  border: 1px solid var(--chat-border-color);
}

.message-file-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--chat-bs-border-radius);
  background: color-mix(in srgb, var(--chat-accent-color), transparent 90%);
  color: var(--chat-accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.message-file-info {
  flex: 1;
}

.message-file-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--chat-heading-color);
}

.message-file-size {
  font-size: 0.75rem;
  color: var(--chat-muted-color);
}

.message-file-download {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--chat-surface-color);
  border: 1px solid var(--chat-border-color);
  color: var(--chat-muted-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.message-file-download:hover {
  background: var(--chat-accent-color);
  border-color: var(--chat-accent-color);
  color: var(--chat-contrast-color);
}

.typing-indicator {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
}

.typing-indicator img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.typing-dots {
  display: flex;
  gap: 4px;
  padding: 0.75rem 1rem;
  background: var(--chat-background-color);
  border-radius: 1rem;
  border-bottom-left-radius: 0.25rem;
}

.typing-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--chat-muted-color);
  animation: typingBounce 1.4s infinite ease-in-out both;
}

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

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

@keyframes typingBounce {

  0%,
  80%,
  100% {
    transform: scale(0.6);
    opacity: 0.5;
  }

  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.chat-input {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--chat-border-color);
  background: var(--chat-surface-color);
}

.chat-input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  background: var(--chat-background-color);
  border-radius: var(--chat-bs-border-radius-lg);
  padding: 0.5rem;
}

.chat-input-actions {
  display: flex;
  gap: 0.25rem;
}

.chat-input-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: none;
  color: var(--chat-muted-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.chat-input-btn:hover {
  background: var(--chat-border-color);
  color: var(--chat-default-color);
}

.chat-input-field {
  flex: 1;
}

.chat-input-field textarea {
  width: 100%;
  border: none;
  background: none;
  resize: none;
  padding: 0.5rem;
  font-size: 0.9375rem;
  color: var(--chat-default-color);
  max-height: 120px;
  line-height: 1.5;
}

.chat-input-field textarea:focus {
  outline: none;
}

.chat-input-field textarea::-moz-placeholder {
  color: var(--chat-muted-color);
}

.chat-input-field textarea::placeholder {
  color: var(--chat-muted-color);
}

.chat-send-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--chat-accent-color);
  color: var(--chat-contrast-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
transition: all 0.2s;
}

.chat-send-btn:hover {
  background: color-mix(in srgb, var(--chat-accent-color), black 15%);
}

.chat-send-btn:disabled {
  background: var(--chat-border-color);
  color: var(--chat-muted-color);
  cursor: not-allowed;
}

.chat-info {
  width: 300px;
  border-left: 1px solid var(--chat-border-color);
  display: none;
  flex-direction: column;
}

.chat-info.show {
  display: flex;
}

.chat-info-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--chat-border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-info-header h6 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--chat-heading-color);
  margin: 0;
}

.chat-info-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: none;
  color: var(--chat-muted-color);
  cursor: pointer;
  transition: all 0.2s;
}

.chat-info-close:hover {
  background: var(--chat-background-color);
  color: var(--chat-default-color);
}

.chat-info-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
}

.chat-info-profile {
  text-align: center;
  margin-bottom: 1.5rem;
}

.chat-info-profile img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  -o-object-fit: cover;
  object-fit: cover;
  margin-bottom: 0.75rem;
}

.chat-info-profile h5 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--chat-heading-color);
  margin: 0 0 0.25rem 0;
}

.chat-info-profile span {
  font-size: 0.875rem;
  color: var(--chat-muted-color);
}

.chat-info-section {
  margin-bottom: 1.5rem;
}

.chat-info-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--chat-muted-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.chat-info-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
}

.chat-info-item i {
  width: 20px;
  color: var(--chat-muted-color);
  text-align: center;
}

.chat-info-item span {
  font-size: 0.875rem;
  color: var(--chat-default-color);
}

.chat-info-media {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.chat-info-media img {
  width: 100%;
  aspect-ratio: 1;
  -o-object-fit: cover;
  object-fit: cover;
  border-radius: var(--chat-bs-border-radius);
  cursor: pointer;
  transition: opacity 0.2s;
}

.chat-info-media img:hover {
  opacity: 0.8;
}

.chat-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--chat-muted-color);
  padding: 2rem;
  text-align: center;
}

.chat-empty-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--chat-background-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1rem;
}

.chat-empty h5 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--chat-heading-color);
  margin: 0 0 0.5rem 0;
}

.chat-empty p {
  font-size: 0.875rem;
  margin: 0;
}

.chat-sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--chat-background-color);
  border: none;
  border-radius: 50%;
  color: var(--chat-muted-color);
  font-size: 1.125rem;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.chat-sidebar-toggle:hover {
  background: var(--chat-border-color);
  color: var(--chat-default-color);
}

.chat-sidebar-close {
  display: none;
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 44px;
  height: 44px;
  padding: 0;
  background: color-mix(in srgb, var(--chat-default-color), transparent 95%);
  border: none;
  border-radius: var(--chat-bs-border-radius);
  color: var(--chat-muted-color);
  cursor: pointer;
  transition: all 0.2s;
  z-index: 10;
}

.chat-sidebar-close:hover {
  background: color-mix(in srgb, var(--chat-danger-color), transparent 85%);
  color: var(--chat-danger-color);
}

.chat-sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1040;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.chat-sidebar-overlay.show {
  opacity: 1;
}

[data-theme=dark] .chat-sidebar-overlay {
  background: rgba(0, 0, 0, 0.7);
}

@media (max-width: 1279.98px) {
  .chat-sidebar-toggle {
    display: flex;
  }

  .chat-sidebar-overlay {
    display: block;
    pointer-events: none;
  }

  .chat-sidebar-overlay.show {
    pointer-events: auto;
  }

  .chat-sidebar-close {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .chat-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 340px;
    max-width: 90vw;
    height: 100vh;
    height: 100dvh;
    background: var(--chat-surface-color);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-top: 3.5rem;
    box-shadow: 4px 0 16px rgba(0, 0, 0, 0.15);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .chat-sidebar.show {
    transform: translateX(0);
  }

  .chat-sidebar-header {
    flex-shrink: 0;
  }

  .chat-tabs {
    flex-shrink: 0;
  }

  .chat-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    max-height: none;
    scrollbar-width: thin;
  }

  .chat-list::-webkit-scrollbar {
    width: 4px;
  }

  .chat-list::-webkit-scrollbar-track {
    background: var(--chat-background-color);
  }

  .chat-list::-webkit-scrollbar-thumb {
    background: var(--chat-border-color);
    border-radius: 2px;
  }

  .chat-list::-webkit-scrollbar-thumb:hover {
    background: var(--chat-muted-color);
  }

  body.chat-sidebar-open {
    overflow: hidden;
  }

  .chat-info {
    display: none !important;
  }
}

@media (max-width: 991.98px) {
  .chat-info {
    display: none !important;
  }
}

@media (max-width: 767.98px) {
  .chat-container {
    /* min-height: calc(100vh - 180px); */
  }

  .message-content {
    max-width: 80%;
  }

  .chat-messages {
    padding: 1rem;
    gap: 1rem;
  }

  .chat-input {
    padding: 0.75rem 1rem;
  }

  .chat-input-wrapper {
    padding: 0.375rem;
  }
}

@media (max-width: 575.98px) {
  .chat-container {
    border-radius: 0;
    border-left: none;
    border-right: none;
    /* min-height: calc(100vh - 160px); */
  }

  .chat-sidebar-header {
    padding: 0.75rem 1rem;
  }

  .chat-sidebar-title {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
  }

  .chat-tabs {
    padding: 0.375rem 0.75rem;
  }

  .chat-tab {
    padding: 0.625rem 0.5rem;
    min-height: 44px;
    font-size: 0.75rem;
  }

  .chat-list {
    max-height: 200px;
  }

  .chat-item {
    padding: 0.75rem 1rem;
    min-height: 64px;
  }

  .chat-item-avatar img {
    width: 44px;
    height: 44px;
  }

  .chat-item-name {
    font-size: 0.875rem;
  }

  .chat-item-message-text {
    font-size: 0.75rem;
  }

  .chat-item-time {
    font-size: 0.6875rem;
  }

  .chat-header {
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .chat-header-user {
    flex: 1;
    min-width: 0;
  }

  .chat-header-avatar img {
    width: 40px;
    height: 40px;
  }

  .chat-header-info {
    min-width: 0;
  }

  .chat-header-info h5 {
    font-size: 0.9375rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .chat-header-info span {
    font-size: 0.75rem;
  }

  .chat-header-actions {
    gap: 0.25rem;
  }

  .chat-header-btn[title="Voice Call"],
  .chat-header-btn[title="Video Call"] {
    display: none;
  }

  .message-content {
    max-width: 85%;
  }

  .message-avatar img {
    width: 32px;
    height: 32px;
  }

  .message-bubble {
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
  }

  .message-time {
    font-size: 0.625rem;
  }

  .message-image {
    max-width: 220px;
  }

  .message-file {
    padding: 0.5rem 0.75rem;
  }

  .message-file-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .message-file-name {
    font-size: 0.8125rem;
  }

  .message-file-download {
    width: 44px;
    height: 44px;
  }

  .chat-input {
    padding: 0.5rem 0.75rem;
  }

  .chat-input-wrapper {
    gap: 0.5rem;
    padding: 0.25rem;
  }

  .chat-input-actions {
    gap: 0;
  }

  .chat-input-btn {
    width: 44px;
    height: 44px;
  }

  .chat-input-field textarea {
    font-size: 0.875rem;
    padding: 0.375rem 0.5rem;
  }

  .chat-send-btn {
    width: 44px;
    height: 44px;
  }

  .typing-indicator img {
    width: 28px;
    height: 28px;
  }

  .typing-dots {
    padding: 0.625rem 0.875rem;
  }

  .typing-dots span {
    width: 6px;
    height: 6px;
  }

  .chat-empty {
    padding: 1.5rem;
  }

  .chat-empty-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }

  .chat-empty h5 {
    font-size: 1rem;
  }

  .chat-empty p {
    font-size: 0.8125rem;
  }
}

/* CUSTOM STYLES */
.chat-wrapper {
  /* max-height: 80vh; */
  overflow: hidden;
  z-index: 1001;
}
.chat-wrapper .logo-wrapper {
  cursor: pointer;
  margin-bottom: 4rem;
  /* max-height: 200px; */
  /* max-width: 200px; */
  /* position: relative; */
  /* pointer-events: auto; */
}
.chat-wrapper .chat-logo {
  display: block;
  height: auto;
  width: 110px;
  transition: transform 0.3s ease;
}
.chat-wrapper .chat-logo:hover {
  transform: scale(1.1);
}
.chat-wrapper .main-content {
  max-width: 100%;
  position: fixed;
  right: 10px;
  bottom: 170px;
  width: 350px;
}
.chat-messages {
  max-height: 50vh;
  min-height: 50vh;
  margin-bottom: 20px;
  padding: 20px;
}
.chat-input {
  position: sticky;
  bottom: 0;
  align-items: center;
  justify-content: space-between;
}

@media (max-width: 575.98px) {
  .chat-wrapper .main-content {
      right: 30px;
      /* bottom: 120px; */
  }
  .chat-main {
    border: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important;
  }
}
