.custom-multiselect {
  position: relative;
  width: 100%;
  z-index: 2;
}

.custom-multiselect__trigger {
  box-sizing: border-box;
  width: 100%;
  height: 60px;
  padding: 18px 18px 18px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #586876;
  background: #2b3b4b;
  border: 2px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: -0.3px;
  text-align: left;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.custom-multiselect__trigger:hover {
  background: #344857;
}

.custom-multiselect__trigger:focus-visible,
.custom-multiselect.is-open .custom-multiselect__trigger {
  outline: none;
  background: #2b3b4b;
  border-color: #fedc00;
}

.custom-multiselect.has-value .custom-multiselect__trigger {
  color: #fff;
}

.custom-multiselect.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.custom-multiselect.is-disabled .custom-multiselect__trigger {
  cursor: not-allowed;
}

.custom-multiselect.is-error .custom-multiselect__trigger {
  border-color: #ff8585;
}

.custom-multiselect__value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-multiselect__arrow {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  display: block;
  object-fit: contain;
  opacity: 0.87;
  transition: transform 0.2s ease;
}

.custom-multiselect.is-open .custom-multiselect__arrow {
  transform: rotate(180deg);
}

.custom-multiselect__menu {
  position: fixed;
  z-index: 10000;
  max-height: min(240px, calc(100vh - 32px));
  overflow-y: auto;
  overscroll-behavior: none;
  color: #fff;
  background: #2b3b4b;
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(8, 14, 22, 0.45);
  scrollbar-color: #586876 #243444;
  scrollbar-width: thin;
}

.custom-multiselect__menu[hidden] {
  display: none;
}

.custom-multiselect__menu::-webkit-scrollbar {
  width: 8px;
}

.custom-multiselect__menu::-webkit-scrollbar-track {
  background: #243444;
  border-radius: 0 8px 8px 0;
}

.custom-multiselect__menu::-webkit-scrollbar-thumb {
  background: #586876;
  border: 2px solid #243444;
  border-radius: 10px;
}

.custom-multiselect__option {
  min-height: 48px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: #2b3b4b;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.custom-multiselect__option:hover,
.custom-multiselect__option:focus-within {
  background: #344857;
}

.custom-multiselect__name {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
}

.custom-multiselect__option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.custom-multiselect__check {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #91a1af;
  border-radius: 3px;
  background: transparent;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}

.custom-multiselect__check img {
  width: 10px;
  height: 10px;
  opacity: 0;
  filter: brightness(0);
  transition: opacity 0.15s ease;
}

.custom-multiselect__option input:checked ~ .custom-multiselect__check {
  background: #fedc00;
  border-color: #fedc00;
}

.custom-multiselect__option input:checked ~ .custom-multiselect__check img {
  opacity: 1;
}

.custom-multiselect__option input:focus-visible ~ .custom-multiselect__check {
  outline: 2px solid #fedc00;
  outline-offset: 2px;
}

@media (max-width: 680px) {
  .custom-multiselect__option {
    min-height: 48px;
    padding: 14px 16px;
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .custom-multiselect__trigger,
  .custom-multiselect__arrow,
  .custom-multiselect__option,
  .custom-multiselect__check,
  .custom-multiselect__check img {
    transition: none;
  }
}
