.fm-custom-dropdown {
  position: relative;
  width: 100%;
  font-size: 14px;
  user-select: none;

  .fm-custom-dropdown-selected {
    padding: 8px 12px;
    border: 1px solid rgb(209, 213, 219);
    border-radius: 0px;
    background: #fff;
    color: rgb(55, 65, 81);
    cursor: pointer;
    position: relative;
    transition: border-color 0.2s;
    outline: none;
    display: flex;
    align-items: center;
    min-height: 40px;

    .placeholder {
      color: #aaa;
    }

    & .arrow {
      position: absolute;
      right: 12px;
      top: 50%;
      transform: translateY(-50%) rotate(0deg);
      width: 16px;
      height: 16px;
      pointer-events: none;
      display: inline-block;
      transition: transform 0.2s;
    }

    &.open .arrow {
      transform: translateY(-50%) rotate(180deg);
    }

    &:focus,
    &.open {
      border-color: rgb(237, 129, 49);
    }
  }

  .fm-custom-dropdown-list {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    background: #fff;
    border: 1px solid rgb(209, 213, 219);
    border-radius: 0px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 20;
    margin: 0;
    padding: 4px 0;
    list-style: none;
    max-height: 220px;
    overflow-y: scroll;
    animation: fadeIn 0.15s;

    scrollbar-gutter: stable;

    &::-webkit-scrollbar {
      width: 8px;
    }

    &::-webkit-scrollbar-track {
      background: #f1f1f1;
    }

    &::-webkit-scrollbar-thumb {
      background: #888;
      border-radius: 4px;
    }

    &::-webkit-scrollbar-thumb:hover {
      background: #555;
    }

    li {
      padding: 10px 16px;
      cursor: pointer;
      color: rgb(55, 65, 81);
      transition: background 0.15s;
      &:hover,
      &.selected {
        background: #f5f5f5;
      }
    }
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
