.yc-picker {
  position: relative;
  padding: 4px 11px 4px 4px;
  background-color: var(--color-fill-2);
  border: 1px solid transparent;
  border-radius: var(--border-radius-small);
  transition: all 0.1s cubic-bezier(0, 0, 1, 1);
  line-height: 1.5715;
  display: inline-flex;
  align-items: center;

  &:not(.yc-picker-disabled):not(.yc-picker-focus):hover {
    background-color: var(--color-fill-3);
    border-color: transparent;
  }
  .yc-picker-has-prefix,
  .yc-picker-input.yc-picker-suffix,
  .yc-picker-separator {
    flex-shrink: 0;
  }
  .yc-picker-prefix {
    margin-right: 4px;
    font-size: 14px;
    color: var(--color-text-2);
  }
  .yc-picker-input {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    input {
      height: 100%;
      width: 100%;
      padding: 0;
      padding-left: 8px;
      background-color: transparent;
      border: none;
      outline: none;
      text-align: left;
      color: var(--color-text-2);
      transition: all 0.1s cubic-bezier(0, 0, 1, 1);
      &::placeholder {
        color: var(--color-text-3);
      }
    }
  }
  .yc-picker-separator {
    min-width: 10px;
    padding: 0 8px;
    color: var(--color-text-3);
  }
  .yc-picker-suffix {
    margin-left: 4px;
    display: flex;
    align-items: center;
    .yc-icon-button {
      display: none;
    }
    .yc-picker-suffix-icon {
      color: var(--color-text-2);
      font-size: 14px;
      display: flex;
      justify-content: center;
      align-items: center;
    }
  }
}
// has-prefix
.yc-picker-has-prefix {
  padding-left: 12px;
}
.yc-picker-allow-clear {
  &:hover .yc-picker-suffix {
    .yc-icon-button {
      display: flex;
    }
    .yc-picker-suffix-icon {
      display: none;
    }
  }
}
// focus
.yc-picker-focus {
  background-color: var(--color-bg-1);
  border-color: rgb(var(--primary-6));
  box-shadow: 0 0 0 0 var(--color-primary-light-2);
}
// range
.yc-picker-range {
  .yc-picker-input-active {
    input {
      background: var(--color-fill-2);
    }
  }
}
// error
.yc-picker-error {
  background-color: var(--color-danger-light-1);
  border-color: transparent;
  &:not(.yc-picker-disabled):not(.yc-picker-focus):hover {
    background-color: var(--color-danger-light-2);
  }
  &.yc-picker-focus {
    background-color: var(--color-bg-2);
    border-color: rgb(var(--danger-6));
    box-shadow: 0 0 0 0 var(--color-danger-light-2);
  }
}
// disabled
.yc-picker-disabled {
  cursor: not-allowed;
  color: var(--color-text-4);
  background-color: var(--color-fill-2);
  border-color: transparent;
  .yc-picker-input {
    input {
      cursor: not-allowed;
      &::placeholder {
        color: var(--color-text-4);
      }
    }
  }
  .yc-picker-suffix {
    .yc-picker-suffix-icon {
      color: var(--color-text-4);
    }
  }
}
// size
@size: {
  mini: 24px;
  small: 28px;
  medium: 32px;
  large: 36px;
};
each(@size, {
  .yc-picker-size-@{key} {
    height: @value;
    input {
      font-size: if((@key = mini), 12px, 14px);
    }
  }
});
