@use "@tencentcloud/uikit-base-component-react/dist/styles/theme/util" as *;
@use '../../../../styles/mixins/index.scss' as mixins;

// Root container - align with Vue3's mention-suggestion__content
.mention-suggestion__content {
  width: 160px;
  border-radius: 8px;
  overflow: hidden;
  z-index: 9999;
  @include theme() {
    background-color: get(dropdown-color-default);
    box-shadow: 0 4px 12px get(shadow-color);
  }
}

// Listbox container - align with Vue3's mention-suggestion__listbox
.mention-suggestion__listbox {
  max-height: 200px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 0;

  @include mixins.scrollbar-default();
}

// Item - align with Vue3's mention-suggestion__item
.mention-suggestion__item {
  display: flex;
  align-items: center;
  height: 40px;
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px;
  cursor: pointer;
  transition: background-color 0.15s;
  outline: none;

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

// Selected item - align with Vue3's mention-suggestion__item--selected
.mention-suggestion__item--selected {
  @include theme() {
    background-color: get(dropdown-color-active);
  }
}

// Sentinel - align with Vue3's mention-suggestion__sentinel
.mention-suggestion__sentinel {
  display: flex;
  align-items: center;
  justify-content: center;
}

// Loading state - align with Vue3's mention-suggestion__loading
.mention-suggestion__loading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  font-size: 13px;
  width: 100%;
  justify-content: center;
  @include theme() {
    color: get(text-color-primary);
  }
}

// Spinner - align with Vue3's mention-suggestion__spinner
.mention-suggestion__spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0, 122, 255, 0.2);
  border-top-color: rgba(0, 122, 255, 0.8);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

// Empty state - align with Vue3's mention-suggestion__empty
.mention-suggestion__empty {
  padding: 4px 0px;
  text-align: center;
  font-size: 14px;
  @include theme() {
    color: get(text-color-primary);
  }
}

// Avatar - align with Vue3's mention-suggestion__avatar
.mention-suggestion__avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  margin-right: 12px;
  flex-shrink: 0;
  object-fit: cover;
}

// Name - align with Vue3's mention-suggestion__name
.mention-suggestion__name {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  @include theme() {
    color: get(text-color-primary);
  }
}
