@import '../../core/variables.less';

.common-select-active {
  span {
    color: @primary;
  }
}

.common-select {
  cursor: pointer;
  .ant-dropdown-link{
//  padding-top: 5px;
  }
 
  &.border {
    flex: 1;
    height: 32px;
    line-height: 32px;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    .ant-dropdown-link {
      padding: 0 8px;
      width: 100%;
      .title {
        width: calc(~'100% - 18px');
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        padding-right: 5px;
      }
      .icon {
        float: right;
        color: rgba(0, 0, 0, 0.25);
      }
    }
  }
  .ant-dropdown-link {
    .title {
      max-width: 180px;
      overflow:hidden; 
      white-space:nowrap;
      text-overflow:ellipsis;
      padding-right: 5px;
    }
    &:hover {
      span {
        color: @xm-color-text-select-primary;
      }
    }
    span {
      float: left;
      line-height: 30px !important;
    }
  }

  .selected-list{
    .selected-list-item {
      text-align: center;
      min-width: 60px;
    }
    .icon {
      position: relative;

      .close {
        position: absolute;
        top: -5px;
        right: 5px;
        display: none;
      } 
      &:hover {
        .close {
          display: block;
        }
      }
    }

    .icon-tip {
      width: 100%;
      text-align: center;
      position: absolute;
      bottom: 9px;
      line-height: 10px;
      span {
        font-size: 8px;
        line-height: 10px;
        background-color: @primary;
        padding: 1px 5px;
        color: white;
        border-radius: 5px;
      }
    }

    .name {
      font-size: 12px;
      line-height: 15px;
    }
  }
}

.common-select-menu {
  .header {
    .ant-dropdown-link {
      margin-left: 10px;
    }
  }

  .footer {
    padding-bottom: 0px;
    line-height: 30px;
  }

  .list {
    max-height: 250px;
    overflow-y: auto;
    .student {
      padding: 5px 10px;
    }

    .name {
      display: block;
      text-overflow: ellipsis;
      overflow: hidden;
      white-space: nowrap;
    }

    .student {
      .user-name {
        padding: 0px 10px;
        color: @xm-main-text-color;
        width:150px;
        overflow:hidden; 
        white-space:nowrap;
        text-overflow:ellipsis;
        line-height: 32px;
      }
    }

    .common-select-menu-item {
      line-height: 100%;
      margin: 10px 0;
      .icon {
        position: relative;
      }
      .icon-tip {
        width: 100%;
        text-align: center;
        position: absolute;
        bottom: 0px;
        line-height: 10px;
        span {
          font-size: 6px;
          line-height: 10px;
          background-color: @primary;
          padding: 5px;
          color: white;
          border-radius: 15px;
        }
      }
    }
    

    .common-select-menu-item:hover {
      background-color: @xm-select-item-hover;
    }


    .ant-spin-container:hover {
      background-color: white;
    }

    list:hover {
      background-color: white;
    }

    .class-info {
      .name .teacher-name{
        width:150px;
        overflow:hidden; 
        white-space:nowrap;
        text-overflow:ellipsis
      }
    }

    .teacher-info {
      .teacher-name, .subject-name {
        width:150px;
        overflow:hidden; 
        white-space:nowrap;
        text-overflow:ellipsis
      }
    }
    
  }

  // 下拉框颜色
  .ant-dropdown-menu-item-active.ant-dropdown-menu-item.list:hover {
    background-color: white !important;
  }
  .ant-dropdown-menu-item-active.ant-dropdown-menu-item:hover {
    background-color: @xm-select-item-hover!important;
  }
  .ant-dropdown-menu-item-active.ant-dropdown-menu-item.header:hover {
    background-color: #fff !important;
  }
  .ant-dropdown-menu-item-active.ant-dropdown-menu-item.footer:hover {
    background-color: #fff !important;
  }

  .ant-dropdown-menu-item:hover {
    background-color: white !important;
  }

  .ant-dropdown-menu-item-selected {
    color: white;
  }

}