.soft-select {
  position: relative;
  min-width: 0;
  color: inherit;
  font: inherit;
}

.soft-select > select[data-soft-select-native="true"][hidden] {
  display: none !important;
}

.soft-select__button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 49px;
  border: 1px solid var(--line, #416f70);
  border-radius: var(--radius-control, 5px);
  background: #09130f;
  color: var(--text, #f5f0db);
  padding: 12px 14px;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color var(--motion-control, 800ms) ease,
    background var(--motion-control, 800ms) ease,
    box-shadow var(--motion-control, 800ms) ease;
}

.soft-select__button::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 800ms cubic-bezier(.2, .78, .18, 1);
}

.soft-select.is-open .soft-select__button::after {
  transform: translateY(2px) rotate(225deg);
}

.soft-select__button:focus-visible {
  outline: 3px solid rgba(83, 228, 155, .34);
  outline-offset: 2px;
}

.soft-select__button:disabled {
  cursor: not-allowed;
  opacity: .62;
}

.soft-select__menu {
  position: fixed;
  z-index: 1600;
  top: 0;
  left: 0;
  width: 260px;
  max-width: calc(100vw - 16px);
  max-height: min(360px, calc(100dvh - 16px));
  overflow: auto;
  border: 1px solid var(--line, #416f70);
  border-radius: var(--radius-control, 5px);
  background: var(--surface, #0d1915);
  box-shadow: 10px 12px 0 rgba(16, 47, 52, .2);
  opacity: 0;
  transform: translateY(-8px) scaleY(.94);
  transform-origin: top;
  pointer-events: none;
  scrollbar-width: none;
}

.soft-select__menu.opens-up {
  transform: translateY(8px) scaleY(.94);
  transform-origin: bottom;
}

.soft-select__menu::-webkit-scrollbar {
  display: none;
}

.soft-select__menu.is-open,
.soft-select__menu.is-closing {
  display: block;
}

.soft-select__menu.is-open {
  opacity: 1;
  transform: translateY(0) scaleY(1);
  pointer-events: auto;
}

.soft-select__option {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line, #416f70) 42%, transparent);
  background: transparent;
  color: inherit;
  padding: 11px 13px;
  cursor: pointer;
  font: inherit;
  line-height: 1.35;
  text-align: left;
}

.soft-select__option:last-child {
  border-bottom: 0;
}

.soft-select__option[aria-selected="true"],
.soft-select__option.is-active,
.soft-select__option:hover {
  background: color-mix(in srgb, var(--accent, #f9bc49) 30%, var(--surface, #0d1915));
}

.soft-select__option[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: .55;
}

html[data-design-prototype="autological-v1"] .soft-select__button,
html[data-design-prototype="autological-v1"] .soft-select__menu {
  border-color: var(--proto-line, #416f70);
  background: var(--proto-focus, #fff1cf);
  color: var(--proto-ink, #102f34);
}

html[data-design-prototype="autological-v1"] .soft-select__option[aria-selected="true"],
html[data-design-prototype="autological-v1"] .soft-select__option.is-active,
html[data-design-prototype="autological-v1"] .soft-select__option:hover {
  background: color-mix(in srgb, var(--proto-action, #f9bc49) 38%, var(--proto-focus, #fff1cf));
}

.maios-assistant .soft-select__button,
.soft-select__menu[data-surface="assistant"] {
  border-color: var(--assistant-line);
  border-radius: 5px;
  background: var(--assistant-field);
  color: var(--assistant-ink);
}

.maios-assistant .soft-select__option[aria-selected="true"],
.maios-assistant .soft-select__option.is-active,
.maios-assistant .soft-select__option:hover,
.soft-select__menu[data-surface="assistant"] .soft-select__option[aria-selected="true"],
.soft-select__menu[data-surface="assistant"] .soft-select__option.is-active,
.soft-select__menu[data-surface="assistant"] .soft-select__option:hover {
  background: color-mix(in srgb, var(--assistant-action) 45%, var(--assistant-field));
}

@media (prefers-reduced-motion: no-preference) {
  .soft-select__menu {
    transition: opacity 800ms ease,
      transform 800ms cubic-bezier(.2, .78, .18, 1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .soft-select__button::after,
  .soft-select__menu {
    transition: none;
  }
}
