.model-select-with-badge {
  position: relative;
}

.model-select-with-badge select {
  padding-right: 112px;
}

.backend-model-badge {
  position: absolute;
  top: 50%;
  right: 29px;
  max-width: 84px;
  min-height: 20px;
  padding: 5px 10px;
  overflow: hidden;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22), 0 3px 10px rgba(0, 0, 0, 0.28);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.03em;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
  transform: translateY(-50%);
}

.model-badge-picker {
  position: relative;
  width: 100%;
}

.model-badge-trigger {
  display: grid;
  width: 100%;
  height: 44px;
  padding: 0 9px 0 11px;
  border: 1px solid #343638;
  border-radius: 7px;
  background: #151719;
  color: #e1ddd4;
  grid-template-columns: minmax(0, 1fr) auto 14px;
  align-items: center;
  gap: 9px;
  text-align: left;
}

.model-badge-trigger > span {
  overflow: hidden;
  color: #e1ddd4 !important;
  font-size: 11px !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-badge-trigger > i,
.model-badge-menu button > i {
  min-height: 20px;
  padding: 5px 10px;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.model-badge-trigger > b {
  color: #d7d2c8;
  font-size: 12px;
  font-weight: 700;
  transition: transform 0.18s ease;
}

.model-badge-picker.is-open .model-badge-trigger > b {
  transform: rotate(180deg);
}

.model-badge-menu {
  position: absolute;
  z-index: 90;
  top: auto;
  bottom: calc(100% + 5px);
  left: 0;
  width: max(100%, 440px);
  max-height: 310px;
  padding: 5px;
  overflow-y: auto;
  border: 1px solid #55585b;
  border-radius: 7px;
  background: #121416;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.62);
}

.model-badge-menu button {
  display: grid;
  width: 100%;
  min-height: 38px;
  padding: 6px 9px 6px 11px;
  border-radius: 5px;
  background: transparent;
  color: #e7e2d9;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  text-align: left;
}

.model-badge-menu button:hover,
.model-badge-menu button.is-selected {
  background: #777b80;
  color: #fff;
}

.model-badge-menu button > span {
  overflow: hidden;
  color: inherit !important;
  font-size: 11px !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .model-badge-menu {
    width: 100%;
  }
}
