.custom-select {
  position: relative;
  display: inline-block;
  width: 100%;
  min-width: 0;
}

.custom-select,
.custom-select *,
.custom-select__menu,
.custom-select__trigger,
.custom-select__option {
  box-sizing: border-box;
}

.custom-select > select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
}

.custom-select__trigger {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 40px 10px 14px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px;
  background: #0f172a;
  color: rgba(255,255,255,.92);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
  cursor: pointer;
  position: relative;
  text-align: left;
}

.custom-select__trigger::after {
  content: "▾";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,.66);
  font-size: 12px;
  pointer-events: none;
}

.custom-select__label {
  display: block;
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.custom-select__trigger:hover {
  border-color: rgba(255,255,255,.22);
  background: #162036;
}

.custom-select__trigger:focus-visible,
.custom-select.is-open .custom-select__trigger {
  outline: none;
  border-color: rgba(96,165,250,.42);
  box-shadow: 0 0 0 4px rgba(96,165,250,.16);
}

.custom-select.is-open .custom-select__trigger {
  box-shadow: 0 0 0 4px rgba(96,165,250,.16);
}

.custom-select__trigger:disabled {
  opacity: .62;
  cursor: not-allowed;
}

.custom-select__menu {
  position: absolute;
  top: calc(100% - 1px);
  left: 0;
  right: 0;
  z-index: 100;
  max-height: 260px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  touch-action: pan-y;
  pointer-events: auto;
  padding: 0;
  border: 1px solid rgba(255,255,255,.14);
  border-top: 0;
  border-radius: 0 0 14px 14px;
  background:
    linear-gradient(180deg, #0f172a, #091120);
  box-shadow: 0 18px 34px rgba(0,0,0,.34);
  margin: 0;
}

body > .custom-select__menu {
  z-index: 1400;
}

body > .custom-select__menu.custom-select__menu--floating {
  border-top: 1px solid rgba(255,255,255,.14);
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
  box-shadow: 0 20px 38px rgba(0,0,0,.36);
}

body > .custom-select__menu.custom-select__menu--floating .custom-select__option:first-child{
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

body > .custom-select__menu.custom-select__menu--floating.custom-select__menu--open-upwards {
  border-top: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
}

body > .custom-select__menu.custom-select__menu--floating.custom-select__menu--open-upwards .custom-select__option:first-child{
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
}

body > .custom-select__menu.custom-select__menu--floating.custom-select__menu--open-upwards .custom-select__option:last-child{
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
}

.custom-select__menu[hidden] {
  display: none !important;
}

.custom-select__option {
  width: 100%;
  min-height: 40px;
  padding: 11px 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255,255,255,.92);
  cursor: pointer;
  text-align: left;
  display:block;
}

.custom-select__option:hover {
  background: rgba(255,255,255,.08);
}

.custom-select__option.is-selected {
  background: rgba(96,165,250,.18);
  color: rgba(255,255,255,.98);
}

.custom-select__option:first-child{
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.custom-select__option:last-child{
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
}

.custom-select__option.is-disabled {
  opacity: .48;
  cursor: not-allowed;
}

.custom-select__option + .custom-select__option {
  border-top: 1px solid rgba(255,255,255,.06);
}
