/* Account switcher in the profile menu (AccountSwitcher.tsx): HubSpot's "Account" block and
   "All accounts" list, built from the design's dropdown and account-meta parts and its colour
   tokens. */

.account-switcher__current {
  display: flex;
  align-items: center;
  gap: 10px;
}

.account-badge {
  display: inline-grid;
  place-items: center;
  flex: none;
  border-radius: 8px;
  font-weight: 700;
  line-height: 1;
}
.account-badge--sm {
  width: 24px;
  height: 24px;
  font-size: 12px;
}
.account-badge--md {
  width: 36px;
  height: 36px;
  font-size: 15px;
}
.account-badge--indigo {
  background: var(--indigo-bg);
  color: var(--indigo);
}
.account-badge--teal {
  background: var(--teal-bg);
  color: var(--teal);
}
.account-badge--orange {
  background: var(--orange-bg);
  color: var(--orange);
}
.account-badge--pink {
  background: var(--pink-bg);
  color: var(--pink);
}
.account-badge--cyan {
  background: var(--cyan-bg);
  color: var(--cyan);
}
.account-badge--yellow {
  background: var(--yellow-bg);
  color: var(--yellow);
}

.account-switcher__toggle {
  margin-top: var(--sp-2);
  font-size: 13.5px;
}
.account-switcher__toggle > span:first-child {
  flex: 1;
}
.account-switcher__count {
  min-width: 20px;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  background: var(--surface-3);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.account-switcher__chevron {
  color: var(--text-subtle);
  transition: transform var(--fast) var(--ease);
}
.account-switcher__chevron.is-open {
  transform: rotate(90deg);
}

.account-switcher__panel {
  margin: var(--sp-2) -8px 0;
  padding: var(--sp-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.account-switcher__title {
  padding: 2px 6px 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--brand-ink);
}
.account-switcher__search {
  width: 100%;
  margin-bottom: 6px;
  padding: 7px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
}
.account-switcher__search:focus-visible {
  outline: none;
  border-color: var(--brand);
  box-shadow: var(--focus-ring);
}
.account-switcher__list {
  display: grid;
  gap: 2px;
  max-height: 260px;
  overflow-y: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}
.account-switcher .account-switcher__item {
  margin: 0;
  width: 100%;
  padding: 7px 8px;
  font-size: 13.5px;
}
.account-switcher__item.is-current {
  background: var(--brand-soft);
}
.account-switcher__item:disabled {
  cursor: progress;
  opacity: 0.7;
}
.account-switcher__name {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}
.account-switcher__name > span,
.account-switcher__name > small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-switcher__name > small {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}
.account-switcher .account-switcher__check {
  color: var(--brand);
}
.account-switcher__empty,
.account-switcher__status {
  padding: 8px 6px;
  font-size: 13px;
  color: var(--text-muted);
}

/* The business name next to the avatar in the top bar gets the same coloured initial. */
.account-btn .account-badge {
  margin-right: -2px;
}
