@import "../../../../styles/index.scss";

.table-chat-right-section-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 10px;
  background: $whiteColor;
  width: 641px;
  max-width: 641px;
  // box-shadow: 0 0 var(--Sizes-S-04, 4px) 0 $boxShadowMedium;
  position: relative;

  .clear-chat-button-container {
    position: absolute;
    top: 64px;
    z-index: 999;
    width: 100%;
    background: $whiteColor;
    display: flex;
    justify-content: flex-end;
    padding: 8px 10px;
    cursor: pointer;
  }
}

.table-chat-right-section-container-empty {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 10px;
  background: $whiteColor;
  width: 100%;
  max-width: 640px;
  // box-shadow: 0 0 var(--Sizes-S-04, 4px) 0 $boxShadowMedium;
  position: relative;
}

// Messages Container
.table-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: white;
  margin-bottom: 10px;
  justify-content: flex-start;
}
.empty-state-container {
  justify-content: center;
}

// Message Wrapper
.message-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

// Empty State
.table-chat-empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: $inputInfoColor;
  font-size: $normalFontSize;
  padding: 0 60px;
  flex-direction: column;
  gap: 20px;
  max-width: 641px;

  p {
    margin: 0;
  }
}

.message-text:hover {
  .message-action-container {
    visibility: visible;
  }
}

// Infinite Scroll Styles
.infinite-scroll-trigger {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  min-height: 60px;
}

.infinite-scroll-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.infinite-scroll-placeholder {
  height: 1px;
  width: 100%;
  // This element is invisible but triggers the intersection observer
}

.infinite-scroll-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  color: $errorColor;
  background: rgba($errorColor, 0.1);
  border-radius: 8px;
  margin: 8px 0;

  p {
    margin: 0 0 8px 0;
    font-size: $smallFontSize;
  }
}

.add_member_btn {
  border-radius: 25px !important;
  width: 200px;
  margin: 0 auto;
}

.add_members_modal {
  width: 320px !important;
}

.modal-header-search-input-container {
  margin-bottom: 16px;
  width: 100%;
  display: flex;
  align-items: center;
  width: 100%;
  .menu-header-search-icon {
    width: 20px;
    margin-top: 4px;
  }
}
