.sage-ai-mention-dropdown {
  position: absolute;
  background-color: var(--jp-layout-color1);
  border: 1px solid var(--jp-inverse-border-color);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgb(0 0 0 / 15%);
  z-index: 150000 !important;
  max-height: 200px;
  overflow: hidden;
  width: auto;
  display: none;
  flex-direction: column;
  min-width: 65%;
}

[data-jp-theme-light='false'] .sage-ai-mention-dropdown {
  background-color: var(--jp-layout-color1);
}

.sage-ai-mention-dropdown.visible {
  display: flex;
}

/* Search container with icon and input */
.sage-ai-mention-search-container {
  display: flex;
  padding: 4px 8px;
  border-radius: 8px;
  align-items: center;
  gap: 8px;
  align-self: stretch;
  border: 0.8px solid var(--jp-border-color3);
  background-color: var(--jp-layout-color0);
}

.sage-ai-mention-search-icon {
  width: 16px;
  height: 16px;
  color: var(--jp-ui-font-color2);
  flex-shrink: 0;
}

.sage-ai-mention-search-input {
  flex: 1;
  outline: none;
  background: transparent;
  color: var(--jp-ui-font-color1);
  font-size: 12px;
  padding: 4px 0;
  border: none;
}

.sage-ai-mention-search-input::placeholder {
  color: var(--jp-ui-font-color2);
}

/* Category header container */
.sage-ai-mention-header-container {
  display: flex;
  padding: 8px 10px;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 8px;
  align-self: stretch;
  flex-shrink: 0;
}

/* Content container - scrollable area */
.sage-ai-mention-content {
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
}

/* Category header with back caret */
.sage-ai-mention-category-header {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 0;
  width: 100%;
}

.sage-ai-mention-category-header:hover {
  opacity: 0.8;
}

.sage-ai-mention-back-icon {
  width: 14px;
  height: 15px;
  color: #e7e7e7;
  flex-shrink: 0;
}

.sage-ai-mention-category-title {
  overflow: hidden;
  color: var(--Text-text-primary, #e7e7e7);
  text-overflow: ellipsis;
  font-family: Geist;
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
  line-height: 160%; /* 19.2px */
  flex: 1;
}

.sage-ai-mention-item {
  padding: 8px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;

  /* border-bottom: 1px solid var(--jp-border-color2); */
}

.sage-ai-mention-item:last-child {
  border-bottom: none;
}

.sage-ai-mention-item:hover,
.sage-ai-mention-item.active {
  background-color: var(--jp-layout-color2);
}

[data-jp-theme-light='false'] {
  .sage-ai-mention-content,
  .sage-ai-mention-dropdown {
    background: #111;
  }
}

.sage-ai-mention-item-icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--jp-ui-font-color1);
  font-size: 14px;
}

.sage-ai-mention-item-text {
  font-size: 12px;
  color: var(--jp-ui-font-color1);
  flex: 1;
}

.sage-ai-mention-item-description {
  font-size: var(--jp-ui-font-size0);
  color: var(--jp-ui-font-color2);
  font-style: italic;
}

.sage-ai-mention-category-main {
  color: var(--jp-ui-font-color0);
}

.sage-ai-mention-subcategory {
  padding: 6px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: var(--jp-layout-color0);
}

.sage-ai-mention-subcategory:hover,
.sage-ai-mention-subcategory.active {
  background-color: var(--jp-layout-color2);
}

.sage-ai-mention-empty {
  padding: 12px;
  font-style: italic;
  color: var(--jp-ui-font-color2);
  text-align: center;
}

/* Enhanced keyboard navigation styles */
[data-jp-theme-light='false'] .sage-ai-mention-item.active,
.sage-ai-mention-subcategory.active {
  background-color: rgb(56 56 56 / 30%) !important;

  /* color: var(--jp-ui-inverse-font-color1) !important; */

  /* border-left: 3px solid var(--jp-brand-color0); */
}

.sage-ai-mention-item.active .sage-ai-mention-item-icon,
.sage-ai-mention-subcategory.active .sage-ai-mention-item-icon {
  color: var(--jp-ui-inverse-font-color1) !important;
}

.sage-ai-mention-item.active .sage-ai-mention-item-description,
.sage-ai-mention-subcategory.active .sage-ai-mention-item-description {
  color: var(--jp-ui-font-color2) !important;
}

.sage-ai-mention-separator {
  padding: 4px 12px;
  font-size: 10px;
  font-weight: bold;
  color: var(--jp-ui-font-color2);
  background-color: var(--jp-layout-color2);
  border-top: 1px solid var(--jp-border-color1);
  border-bottom: 1px solid var(--jp-border-color1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
