.custom-select {
  position: relative;
  width: 300px;
  padding: 14px 0 28px;
  margin: 0 0 44px 0;
  /* &.is-valid {
    .custom-select__button {
      border: 2px solid $color-eucalyptus;

      &:focus,
      &:hover {
        border: 2px solid rgba($color-eucalyptus, 0.5);
      }
    }
  } */
}

.custom-select__label {
  position: absolute;
  top: 50%;
  left: 10px;
  -webkit-transform: translateY(-50%);
  -ms-transform: translateY(-50%);
  transform: translateY(-50%);
  -webkit-transition: opacity 0.3s ease, -webkit-transform 0.3s ease;
  transition: opacity 0.3s ease, -webkit-transform 0.3s ease;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transition: transform 0.3s ease, opacity 0.3s ease, -webkit-transform 0.3s ease;
  pointer-events: none;
}

.custom-select__placeholder {
  position: absolute;
  top: 50%;
  left: 10px;
  -webkit-transform: translateY(-50%);
  -ms-transform: translateY(-50%);
  transform: translateY(-50%);
  -webkit-transition: opacity 0.3s ease, -webkit-transform 0.3s ease;
  transition: opacity 0.3s ease, -webkit-transform 0.3s ease;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transition: transform 0.3s ease, opacity 0.3s ease, -webkit-transform 0.3s ease;
  pointer-events: none;
}

.custom-select select {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
  border: 0;
  clip: rect(0 0 0 0);
  -webkit-clip-path: inset(100%);
  clip-path: inset(100%);
}

.custom-select__button {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  width: 100%;
  height: 48px;
  padding: 5px 10px;
  background-color: rgba(255, 255, 255, 0);
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-radius: 5px;
  outline: none;
  cursor: pointer;
  -webkit-transition: border 0.3s ease;
  transition: border 0.3s ease;
}

.custom-select__button:hover {
  border: 2px solid rgba(0, 0, 0, 0.5);
}

.custom-select__button:focus {
  border: 2px solid rgba(0, 0, 0, 0.8);
}

.custom-select__button:disabled {
  pointer-events: none;
  opacity: 0.3;
}

.custom-select__list {
  position: absolute;
  bottom: 10px;
  z-index: 1;
  width: 100%;
  max-height: 100px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
  background-color: #ffffff;
  border: 2px solid #000000;
  -webkit-transform: translateY(100%);
  -ms-transform: translateY(100%);
  transform: translateY(100%);
  visibility: hidden;
  opacity: 0;
  -webkit-transition: visibility 0.3s ease, opacity 0.3s ease;
  transition: visibility 0.3s ease, opacity 0.3s ease;
}

.custom-select__item {
  padding: 5px;
  outline: none;
  cursor: pointer;
  -webkit-transition: background-color 0.3s ease;
  transition: background-color 0.3s ease;
}

.custom-select__item[aria-selected=true] {
  background-color: rgba(0, 0, 0, 0.2);
}

.custom-select__item[aria-selected=true].focus-visible:focus {
  background-color: rgba(0, 0, 0, 0.2);
}

.custom-select__item.focus-visible:focus {
  background-color: rgba(0, 0, 0, 0.4);
}

.custom-select__error {
  position: absolute;
  bottom: -15px;
  left: 0;
  color: #ff1553;
  opacity: 0;
  -webkit-transition: opacity 0.1s ease;
  transition: opacity 0.1s ease;
}

.custom-select__text {
  font-size: 20px;
  line-height: 24px;
  -ms-flex-negative: 0;
  flex-shrink: 0;
  width: 80%;
  overflow: hidden;
  text-align: left;
  white-space: nowrap;
  text-overflow: ellipsis;
  opacity: 0;
  -webkit-transition: opacity 0.3s ease 0.1s;
  transition: opacity 0.3s ease 0.1s;
}

.custom-select__text br {
  display: none;
}

.custom-select__icon {
  -ms-flex-negative: 0;
  flex-shrink: 0;
  width: 20px;
  height: 10px;
  margin-left: auto;
  background-color: #000000;
  -webkit-transition: -webkit-transform 0.3s ease;
  transition: -webkit-transform 0.3s ease;
  transition: transform 0.3s ease;
  transition: transform 0.3s ease, -webkit-transform 0.3s ease;
  -webkit-clip-path: polygon(100% 0, 100% 20%, 50% 100%, 0 20%, 0 0, 50% 80%);
  clip-path: polygon(100% 0, 100% 20%, 50% 100%, 0 20%, 0 0, 50% 80%);
}

.custom-select.is-disabled {
  pointer-events: none;
}

.custom-select.is-disabled .custom-select__list {
  display: none;
}

.custom-select.open-up .custom-select__list {
  bottom: auto;
  top: 0;
  -webkit-transform: translateY(calc(-100% + 10px));
  -ms-transform: translateY(calc(-100% + 10px));
  transform: translateY(calc(-100% + 10px));
}

.custom-select.is-open .custom-select__list {
  visibility: visible;
  opacity: 1;
}

.custom-select.is-open .custom-select__icon {
  -webkit-transform: rotate(180deg);
  -ms-transform: rotate(180deg);
  transform: rotate(180deg);
}

.custom-select.is-open .custom-select__label {
  opacity: 0;
}

.custom-select.not-empty .custom-select__text {
  opacity: 1;
}

.custom-select.not-empty .custom-select__label {
  opacity: 0;
}

.custom-select.not-empty .custom-select__placeholder {
  opacity: 0;
}

.custom-select.is-invalid .custom-select__error {
  opacity: 1;
}

.custom-select.is-invalid .custom-select__button {
  border: 2px solid #ff1553;
}

.custom-select.is-invalid .custom-select__button:focus,
.custom-select.is-invalid .custom-select__button:hover {
  border: 2px solid rgba(255, 21, 83, 0.5);
}

.custom-select--placeholder .custom-select__label {
  -webkit-transform: translateY(calc(-50% - 40px));
  -ms-transform: translateY(calc(-50% - 40px));
  transform: translateY(calc(-50% - 40px));
  opacity: 1;
}

.custom-select--placeholder.is-open .custom-select__label {
  opacity: 1;
}

.custom-select--placeholder.not-empty .custom-select__label {
  opacity: 1;
}

.custom-select.slide-up.not-empty .custom-select__label,
.custom-select.slide-up.is-open .custom-select__label {
  -webkit-transform: translateY(calc(-50% - 40px));
  -ms-transform: translateY(calc(-50% - 40px));
  transform: translateY(calc(-50% - 40px));
  opacity: 1;
}

.custom-select.slide-up.not-empty .custom-select__text,
.custom-select.slide-up.is-open .custom-select__text {
  opacity: 1;
}

.custom-select .input-message {
  position: absolute;
  right: 0;
  bottom: -5px;
}

.custom-select .input-message.is-invalid {
  color: #ff0000;
}

.custom-select .input-message.is-valid {
  color: #15ab07;
}

@media screen and (max-width: 767px) {
  .custom-select {
    padding: 4px 0 14px;
    width: 100%;
  }

  .custom-select__label {
    -webkit-transform: translateY(calc(-50% - 5px));
    -ms-transform: translateY(calc(-50% - 5px));
    transform: translateY(calc(-50% - 5px));
  }

  .custom-select__placeholder {
    -webkit-transform: translateY(calc(-50% - 5px));
    -ms-transform: translateY(calc(-50% - 5px));
    transform: translateY(calc(-50% - 5px));
  }
}

@media (hover: hover) {
  .custom-select__item[aria-selected=true]:hover:not(.focus-visible) {
    background-color: rgba(0, 0, 0, 0.2);
  }

  .custom-select__item:hover:not(.focus-visible) {
    background-color: rgba(0, 0, 0, 0.4);
  }
}