@use "@tencentcloud/uikit-base-component-react/dist/styles/theme/util" as *;

.chat-header {
  padding: 14px 20px;
  height: 64px;
  display: flex;
  justify-content: center;

  @include theme() {
    background-color: get(bg-color-operate);
  }

  &__container {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  &__left {
    flex: 1 1 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  &__info {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  &__title {
    display: block;
    margin: 0;
    font-size: 16px;
    font-weight: bold;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    @include theme() {
      color: get(text-color-primary);
    }
  }

  &__typing-indicator {
    font-size: 12px;

    @include theme() {
      color: get(text-color-secondary);
    }
  }

  &__live {
    margin-top: 4px;
    font-size: 12px;

    @include theme() {
      color: get(text-color-tertiary);
    }
  }
}

.icon-button {
  flex: 0 0 auto;
  border: none;
  padding: 4px;
  margin: 0;
  background: none;
  // inline-flex: keeps button width snug while aligning icon & text
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background-color 0.2s ease;
  cursor: pointer;

  @include theme() {
    color: get(text-color-link);
    background-color: get(dropdown-color-default);

    &:hover {
      background-color: get(dropdown-color-hover);
    }

    &:active {
      background-color: get(dropdown-color-active);
    }
  }
}
