.soft-select {
  position: relative;
  width: 100%;
  min-width: 0;
}

.soft-select__native {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  opacity: 0;
  pointer-events: none;
}

.soft-select__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 11px 14px 11px 16px;
  border: 0;
  border-radius: var(--soft-radius-control, 16px);
  background: var(--soft-surface-muted, #f5f7fa);
  color: var(--soft-ink, #2d3345);
  box-shadow: inset 0 1px 3px rgb(88 101 126 / 7%), 0 3px 10px rgb(81 94 117 / 4%);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
  transition: background-color 200ms ease-in-out, box-shadow 200ms ease-in-out, color 200ms ease-in-out;
}

.soft-select__value-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.soft-select__value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.soft-select__value-thumbnail {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 1px solid rgb(99 102 241 / 14%);
  border-radius: 6px;
  background: #eef1f5;
  object-fit: contain;
  object-position: center;
}

.soft-select__value-thumbnail[hidden] {
  display: none;
}

.soft-select__chevron {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  opacity: .62;
  transition: transform 200ms ease-in-out, opacity 200ms ease-in-out;
}

.soft-select__trigger:hover:not(:disabled) {
  background: #f0f2f7;
  box-shadow: inset 0 1px 3px rgb(88 101 126 / 6%), 0 8px 20px rgb(99 102 241 / 10%);
}

.soft-select__trigger:focus-visible,
.soft-select[data-open="true"] .soft-select__trigger,
.soft-select__native:focus + .soft-select__trigger {
  outline: 0;
  background: var(--soft-surface, #fff);
  box-shadow: 0 0 0 5px var(--soft-primary-halo, rgb(99 102 241 / 20%)), 0 12px 28px rgb(99 102 241 / 12%);
}

.soft-select[data-open="true"] .soft-select__chevron {
  transform: rotate(180deg);
  opacity: .9;
}

.soft-select__trigger.is-placeholder {
  color: var(--soft-muted, #687286);
  font-weight: 500;
}

.soft-select__trigger:disabled {
  background: #eceff3;
  color: #8f97a7;
  box-shadow: inset 0 1px 3px rgb(88 101 126 / 5%);
  cursor: not-allowed;
  opacity: .72;
}

.soft-select__trigger[aria-invalid="true"] {
  background: var(--soft-danger-soft, #fff0f2);
  box-shadow: 0 0 0 3px rgb(201 76 93 / 17%);
}

.soft-select__menu {
  position: fixed;
  z-index: 10000;
  display: grid;
  gap: 4px;
  padding: 8px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 0;
  border-radius: 18px;
  background: var(--soft-surface, #fff);
  box-shadow: 0 22px 54px rgb(88 101 126 / 18%), 0 6px 18px rgb(99 102 241 / 12%);
  opacity: 0;
  transform: translateY(-5px) scale(.985);
  transform-origin: top center;
  transition: opacity 140ms ease-out, transform 180ms ease-out;
}

.soft-select__menu[data-placement="top"] {
  transform: translateY(5px) scale(.985);
  transform-origin: bottom center;
}

.soft-select__menu.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.soft-select__menu[hidden] {
  display: none;
}

.soft-select__group {
  padding: 8px 10px 4px;
  color: var(--soft-muted, #687286);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.soft-select__option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--soft-ink, #2d3345);
  font: inherit;
  font-size: 14px;
  font-weight: 550;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
  transition: background-color 160ms ease-in-out, color 160ms ease-in-out, box-shadow 160ms ease-in-out;
}

.soft-select__option-content {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.soft-select__option-label {
  min-width: 0;
  overflow-wrap: anywhere;
}

.soft-select__option-thumbnail {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 1px solid rgb(99 102 241 / 12%);
  border-radius: 7px;
  background: #eef1f5;
  object-fit: contain;
  object-position: center;
}

.soft-select__option-thumbnail[hidden] {
  display: none;
}

.soft-select__check {
  width: 18px;
  height: 18px;
  opacity: 0;
  transform: scale(.8);
  transition: opacity 160ms ease-in-out, transform 160ms ease-in-out;
}

.soft-select__option:hover:not(:disabled),
.soft-select__option.is-active:not(:disabled) {
  background: #f4f5ff;
  color: var(--soft-primary-strong, #4f46e5);
  box-shadow: inset 0 0 0 1px rgb(99 102 241 / 8%);
}

.soft-select__option[aria-selected="true"] {
  background: var(--soft-primary-soft, #eef0ff);
  color: var(--soft-primary-strong, #4f46e5);
  font-weight: 700;
}

.soft-select__option[aria-selected="true"] .soft-select__check {
  opacity: 1;
  transform: scale(1);
}

.soft-select__option[data-placeholder="true"] {
  color: var(--soft-muted, #687286);
}

.soft-select__option:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px var(--soft-primary-halo, rgb(99 102 241 / 20%));
}

.soft-select__option:disabled {
  color: #9ba2b0;
  cursor: not-allowed;
  opacity: .58;
}

.soft-select__empty {
  padding: 14px 12px;
  color: var(--soft-muted, #687286);
  font-size: 14px;
  text-align: center;
}

.script-shooting-mode .soft-select {
  max-width: 280px;
}

@media (max-width: 640px) {
  .soft-select__trigger,
  .soft-select__option {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .soft-select__trigger,
  .soft-select__chevron,
  .soft-select__menu,
  .soft-select__option,
  .soft-select__check {
    transition: none;
  }
}
