.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: 22px 36px minmax(0, 1fr) auto 14px;
  align-items: center;
  gap: 9px;
  text-align: left;
}

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

.model-badge-trigger > i,
.model-badge-menu button > i {
  min-width: 54px;
  min-height: 22px;
  padding: 5px 10px;
  border: 0;
  border-radius: 999px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.28);
  font-size: 10.5px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  text-align: center;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.22);
}

.model-seedance-logo {
  display: block;
  width: 22px;
  height: 22px;
  padding: 1px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.34);
  object-fit: contain;
}

.model-seedance-logo.is-empty {
  visibility: hidden;
}

.model-billing-mode {
  display: inline-flex;
  min-width: 34px;
  height: 20px;
  padding: 0 6px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.model-billing-mode.is-fixed {
  border-color: rgba(255, 204, 111, 0.62);
  background: rgba(155, 94, 19, 0.36);
  color: #ffd68a;
}

.model-billing-mode.is-second {
  border-color: rgba(91, 201, 255, 0.62);
  background: rgba(20, 103, 152, 0.38);
  color: #a6e2ff;
}

.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%, 520px);
  max-height: none;
  padding: 5px;
  overflow: visible;
  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: 22px 36px 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 > .model-badge-name {
  overflow: hidden;
  color: inherit !important;
  font-size: 12px !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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