.select-container {
  margin-top: 0.25rem;
  color: var(--text-color);
  transition: transform 0.2s ease-in-out;

  &.open .icon-dropdown {
    transform: rotate(180deg);
  }

  > .relative {
    position: relative;

    > span {
      display: inline-block;
      width: 100%;

      > button {
        display: flex;
        align-items: center;
        color: var(--text-color);
        cursor: pointer;
        border: 1px solid transparent;
        position: relative;
        width: -webkit-fill-available;
        width: -moz-available;
        border-radius: 4px;
        background-color: var(--input-background-color, #333645);
        padding: 0 8px;
        text-align: left;

        > div {
          flex-grow: 1;
          display: flex;
          align-items: center;
          height: 40px;
          margin-right: 8px;
          position: relative;

          > .dropdown-input-search {
            background: unset;
            padding: 0;

            &::placeholder {
              color: var(--text-color);
            }
          }

          //> .dropdown-input-search:not([value=""]) + .dropdown-input-placeholder {
          //  opacity: 0;
          //}

          .dropdown-input-placeholder {
            //color: var(--text-color);
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 1;
            white-space: nowrap;
            display: flex;
            align-items: center;
            overflow: hidden;
            text-overflow: ellipsis;

            &.dropdown-open {
              opacity: 0.4;
            }
          }
        }

        > span {
          display: flex;
          align-items: center;
          pointer-events: none;
        }
      }

      > button:focus {
        outline: none;
      }
    }
  }

  &.is-invalid > .relative > span > button {
    border: 1px solid var(--danger);
  }

  &[border] {
    margin-top: 0;
    box-shadow: 0 0 0 1px #d6d6d6;
    border-radius: 4px;
    margin-right: 1px;
    margin-left: 1px;

    &:hover,
    &:focus-within,
    &:active {
      box-shadow: 0 0 0 1px var(--accent);
    }

    > .relative > span > button {
      border: none;
      background: white;
    }
  }
}

.select-area-popover {
  background-color: transparent;
  padding: 0;
  width: unset;
  max-width: unset;
  height: unset;
  margin-top: 0;
  border: 0;

  .arrow {
    display: none !important;
  }

  .popover-body {
    padding: 0;
  }

  .select-popover {
    margin: 8px auto;
    color: var(--text-color);
    outline: 1px solid #d6d6d6;
    box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.1);
    background-color: var(--menu-background-color);
    border-radius: 4px;
    width: 100%;

    .__view {
      width: auto !important;
    }

    ul {
      max-height: 250px;
      list-style-type: none;
      padding-inline-start: unset;
      padding: 8px 0;
      margin: 0;

      li {
        display: flex;
        box-sizing: border-box;
        font-weight: bold;
        font-size: 14px;
        color: var(--secondary-text-color);
        padding: 8px;

        > div {
          display: flex;
          flex-grow: 1;
          overflow: hidden;

          > span {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
          }

          margin-right: 4px;
        }

        //> span {
        //  background: red;
        //  //margin: auto 8px;
        //}
      }

      li + li {
        margin-top: 4px;
      }

      li:focus {
        outline: none !important;
      }

      li.active {
        cursor: pointer;
        color: var(--secondary-text-color);
        font-size: 14px;
        font-weight: normal;
        opacity: 0.8;
        letter-spacing: 0.2px;
      }

      li.disable {
        cursor: not-allowed !important;
        color: var(--text-color);
        opacity: var(--normal-color);
        font-size: 12px;
        font-weight: 400;

        &:hover {
          background-color: unset !important;
        }
      }

      li.active:hover {
        background-color: var(--active-color, #393d4e);
        color: var(--text-color);
      }

      li.active.selected {
        background-color: var(--active-color, #393d4e);
        color: var(--text-color);
      }
    }
  }
}

.disabled {
  cursor: not-allowed !important;
}
