:host(:not(:is([hydrated], .hydrated))) {
  @apply not-hydrated;
}


mds-icon,
mds-text {
  &:not(:is([hydrated], .hydrated)) {
    @apply not-hydrated;
  }
}


/**
 * @prop --mds-mention-icon-size: Sets the size (width and height) of the mention icon.
 */

:host {
  --mds-mention-icon-size: --spacing(600);

  align-items: center;
  background-color: rgb(var(--magma-wash-base, var(--tone-neutral-09, 225 225 225)));
  border-radius: var(--magma-radius-full, var(--radius-full, 1000px));
  color: rgb(var(--magma-text-muted, var(--text-neutral-muted, 73 73 73)));
  cursor: pointer;
  display: inline-flex;
  fill: currentcolor;
  padding: --spacing(25);
  padding-right: --spacing(200);
  vertical-align: middle;
}

mds-icon {
  height: var(--mds-mention-icon-size, --spacing(600));
  width: var(--mds-mention-icon-size, --spacing(600));
}

/* The pill keeps its wide right padding when nothing follows the label; with the remove
  button in place that padding moves onto the button, so the disc is inset like the leading
  icon instead of floating short of the edge. */

:host([deletable]) {
  padding-right: --spacing(25);
}

:host([size='sm']) {
  --mds-mention-icon-size: --spacing(400);
}

:host([size='md']) {
  --mds-mention-icon-size: --spacing(600);
}

.action-remove {
  border-radius: var(--magma-radius-full, var(--radius-full, 1000px));
  corner-shape: round;
  flex-shrink: 0;

  /* Mirror the leading icon: same box on both ends of the pill, so the disc reads as a
     control of the mention and not as the last glyph of the label. */
  height: var(--mds-mention-icon-size, --spacing(600));
  margin-left: --spacing(50);
  min-height: 0;
  min-width: 0;
  padding: 0;
  width: var(--mds-mention-icon-size, --spacing(600));
}

