/* Portaled Mantine selects must render above the global embedded window layer (z-index: 700). */
.mantine-MultiSelect-dropdown,
.mantine-Select-dropdown { z-index: 1000 !important; }

/* Recipient selection: readable removable tags in compact embedded windows. */
.an-compose:not(.an-compose--reply) .an-compose-form > .mantine-MultiSelect-root {
  grid-column: 1 / -1;
  grid-row: 1;
}
.an-compose:not(.an-compose--reply) .an-compose-form > .mantine-TextInput-root {
  grid-column: 1;
  grid-row: 2;
}
.an-compose:not(.an-compose--reply) .an-compose-form > .mantine-Select-root {
  grid-column: 2;
  grid-row: 2;
}
.an-compose .mantine-MultiSelect-input { padding-inline-end: 38px; }
.an-compose .mantine-MultiSelect-pillsList {
  width: 100%;
  min-width: 0;
  padding-inline-end: 0 !important;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.an-compose .mantine-MultiSelect-pill {
  flex: 0 0 auto;
  width: auto;
  max-width: 100%;
  padding-inline-start: 8px;
  border: 1px solid var(--mantine-color-blue-2, #cde0ff);
  border-radius: 8px;
  background: var(--mantine-color-blue-0, #eff6ff);
  color: var(--mantine-color-blue-9, #24477b);
}
.an-compose .mantine-MultiSelect-pill .mantine-Pill-label {
  flex: 0 1 auto;
  width: auto;
  min-width: 0;
  max-width: none;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  font-weight: 600;
  color: inherit;
}
.an-compose .mantine-MultiSelect-pill .mantine-Pill-remove {
  flex: 0 0 22px;
  width: 22px;
  min-width: 22px;
  color: inherit;
  opacity: .8;
}
.an-compose .mantine-MultiSelect-inputField {
  flex: 1 1 12px;
  min-width: 12px;
  max-width: 100%;
  font-size: 14px;
}
/* Keep chips on one line when idle; expand the search entry when focused. */
.an-compose .mantine-MultiSelect-inputField:focus {
  flex-basis: 120px;
  min-width: 120px;
}
.an-compose .mantine-MultiSelect-pillsList:has(.mantine-MultiSelect-pill) .mantine-MultiSelect-inputField::placeholder {
  color: transparent;
}
.an-compose .mantine-MultiSelect-pillsList:not(:has(.mantine-MultiSelect-pill)) .mantine-MultiSelect-inputField {
  min-width: 130px;
  flex-basis: 130px;
}
