/* Official popupSelect shell card: menu-surface tokens (same family as
 * ui-primitives Menu.module.css — figma MenuDropdown r12 / hairline /
 * shadow-lv3), anchored by the conversation.input.overlay slot. */

.card {
  /* The overlay anchor is a zero-height strip on the composer card's top
     edge; entries float themselves above it (same rule as MenuView). */
  position: absolute;
  bottom: calc(100% + 4px);
  left: 0;
  z-index: 100;
  padding: 4px;
  display: flex;
  flex-direction: column;
  min-width: 220px;
  max-height: 320px;
  overflow-y: auto;
  /* Elevated surface: the scrollbar thumb takes the l2 elevation tokens
     (see ui-theme styles/scrollbar.css for the rebinding contract). */
  --dsh-scrollbar-thumb: var(--dsw-alias-scrollbar-bg-l2);
  --dsh-scrollbar-thumb-hover: var(--dsw-alias-scrollbar-hover-l2);
  border: 1px solid var(--dsw-alias-border-inverted);
  border-radius: 12px;
  background: var(--dsw-specific-menu);
  box-shadow: var(--dsw-shadow-lv3);
  outline: none;
}

.row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--dsw-alias-text-primary);
}

.rowActive {
  background: var(--dsw-alias-fill-hover);
}

.label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail {
  font-size: 12px;
  color: var(--dsw-alias-text-tertiary);
  white-space: nowrap;
}

.check {
  display: inline-flex;
  color: var(--dsw-alias-text-secondary);
}

.status {
  padding: 8px;
  font-size: 12px;
  color: var(--dsw-alias-text-tertiary);
}

.search {
  margin: 2px 2px 4px;
  padding: 6px 8px;
  border: 1px solid var(--dsw-alias-border-inverted);
  border-radius: 8px;
  background: transparent;
  font-size: 13px;
  color: var(--dsw-alias-text-primary);
  outline: none;
}

.error {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  font-size: 12px;
  color: var(--dsw-alias-state-error-primary);
}

.errorText {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.retry {
  padding: 2px 8px;
  border: 1px solid var(--dsw-alias-border-inverted);
  border-radius: 6px;
  background: transparent;
  font-size: 12px;
  color: var(--dsw-alias-text-primary);
  cursor: pointer;
}
