/* Small UI atoms shared by every product mock-up on the page: avatars,
 * source chips, status badges and confidence meters. They reproduce the
 * visual language of the Cortex admin (demo-cortex) at landing scale. */

/* Avatars */

.cx-avatar {
  --cx-size: 26px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: var(--cx-size);
  height: var(--cx-size);
  border-radius: var(--r-pill);
  background: var(--nx-bone-3);
  color: var(--nx-ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: calc(var(--cx-size) * .38);
  line-height: 1;
}

.cx-avatar--lg {
  --cx-size: 44px;
}

.cx-avatar--sm {
  --cx-size: 20px;
}

.cx-avatar--bot {
  background: var(--nx-ink);
  color: var(--nx-cortex);
}

.cx-avatar--bot .icon {
  --icon-size: 56%;
}

.cx-avatar--agent {
  background: var(--nx-pulse);
  color: var(--nx-white);
}

.cx-avatar--live::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 28%;
  height: 28%;
  min-width: 6px;
  min-height: 6px;
  border-radius: var(--r-pill);
  background: var(--nx-success);
  border: 1.5px solid var(--nx-white);
}

/* Cortex "AI" glyph inline with text */

.cx-spark {
  --icon-size: 1em;
  color: var(--nx-cortex-ink);
  vertical-align: -.1em;
}

/* Source chip: where Cortex got its answer from */

.cx-source {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  margin-top: 7px;
  padding: 3px 8px;
  border-radius: 5px;
  background: rgba(255, 255, 255, .1);
  color: var(--nx-200);
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.3;
}

.cx-source .icon {
  --icon-size: 10px;
}

.cx-source--light {
  background: var(--nx-bone-3);
  color: var(--nx-700);
}

/* Status pills */

.cx-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  background: var(--nx-bone-3);
  color: var(--nx-700);
}

.cx-pill .icon {
  --icon-size: 10px;
}

.cx-pill--cyan {
  background: var(--nx-cortex-soft);
  color: var(--nx-cortex-ink);
}

.cx-pill--violet {
  background: var(--nx-pulse-soft);
  color: var(--nx-pulse);
}

.cx-pill--ok {
  background: rgba(34, 197, 94, .14);
  color: var(--nx-success-ink);
}

.cx-pill--warn {
  background: rgba(245, 158, 11, .16);
  color: var(--nx-warning-ink);
}

.cx-pill--danger {
  background: rgba(239, 68, 68, .12);
  color: var(--nx-danger-ink);
}

.cx-pill--live {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .1em;
  background: rgba(239, 68, 68, .12);
  color: var(--nx-danger-ink);
}

.cx-pill--live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--nx-danger);
  animation: nxPulse 1.6s ease-in-out infinite;
}

/* Confidence chip (value is colored by how sure Cortex is) */

.cx-conf {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(34, 197, 94, .14);
  color: var(--nx-success-ink);
}

.cx-conf--mid {
  background: rgba(245, 158, 11, .16);
  color: var(--nx-warning-ink);
}

.cx-conf--low {
  background: rgba(239, 68, 68, .12);
  color: var(--nx-danger-ink);
}

/* Mono micro label used all over the admin */

.cx-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .12em;
  color: var(--nx-500);
}
